raw_sound 0.1.0+1 copy "raw_sound: ^0.1.0+1" to clipboard
raw_sound: ^0.1.0+1 copied to clipboard

outdated

A flutter plugin for playing raw PCM audio data (16-bit integer and 32-bit float).

raw_sound #

pub package License

A flutter plugin for playing raw PCM audio data (16-bit integer and 32-bit float).

Platform Support #

Android (Kotlin) iOS (Swift)
minSdkVersion 24 platform :ios, '14.0'
✔️ ✔️

Usage #

  • Create an instance of the RawSoundPlayer
  final _player = RawSoundPlayer();
  • Initialize the player instance with parameters of bufferSize, nChannels, sampleRate and pcmType
  await _player.initialize(
    bufferSize: 4096 << 3,
    nChannels: 1,
    sampleRate: 16000,
    pcmType: RawSoundPCMType.PCMI16,
  );
  • Start playing
  await _player.play();
  • Feed the player instance with the raw PCM data
  while (_player.isPlaying) {
    await _player.feed(dataBlock);
  }
  • Pause/Stop the playing
  await _player.pause();
  await _player.stop();
  • Release the player instance
  await _player.release();
15
likes
0
pub points
69%
popularity

Publisher

verified publishercodevalop.com

A flutter plugin for playing raw PCM audio data (16-bit integer and 32-bit float).

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, plugin_platform_interface, synchronized

More

Packages that depend on raw_sound