Soundpool.fromOptions constructor

Soundpool.fromOptions({
  1. SoundpoolOptions options = SoundpoolOptions.kDefault,
})

Creates the Soundpool instance with stream type setting set.

Implementation

factory Soundpool.fromOptions(
    {SoundpoolOptions options = SoundpoolOptions.kDefault}) {
  return Soundpool._(
    options._platformOptions,
    options.streamType,
    options.maxStreams,
  ).._connect();
}