Skip to content

Audio Playback

Luigi Rosso edited this page Mar 17, 2018 · 2 revisions

Audio Playback

Added audio playback via Platform Messaging and implemented for MacOS only via AVAudioPlayer.

For now we have the following functionality:

  • Load multiple audio files concurrently
  • Play
  • Set volume (so we can fade out music/ambience as needed for sound effects/voices).
  • Set loop (on/off)
  • Pause and Stop

Native extension:

FLEAudioPlayerPlugin.m

Dart Plugin/API:

sound.dart

Example use:

https://github.com/2d-inc/BiggerLogo/blob/70dbfce0364397fb843d1a45454d17b863013f32/monitor/monitor_app/lib/main.dart#L63

Clone this wiki locally