Search code examples
androidiosflutteraudio-streaming

Is possible to play multiple audio files simultaneously in android / ios / flutter?


I am developing an App for kids learn to compose music similar to a drum pad machine.

Is possible to play multiple audio files simultaneously with the minimum delay possible between each other, like audacity, in android and ios?

I already checked near all the stackoverflow (and google also) related questions. But the posts are very old (2016, 2017, ...), and seemed that it was difficult to play sounds simultaneously. Maybe, now in 2019 is more easy to do it.

As far as I know, it is possible to use audiopool (but is limited to 1mb size and i need more than 1mb) and Mediaplayer. About mediaplayer, I can not found much information and tutorials.

Also, there is the new flutter framework. Is it possible to do it in flutter? Would be great, since with the same code could run on android and ios.

enter image description here


Solution

  • For flutter, you should try this resource: https://pub.dev/packages/audioplayers

    It supports playing multiple audio files, preloading audio files and playing them with minimal delay as possible