alnitak / flutter_soloud

Flutter low-level audio plugin using SoLoud C++ library and FFI
MIT License
209 stars 21 forks source link

feat: Set audio session mode to allow audio to mix with others #86

Open LeeMatthewHiggins opened 4 months ago

LeeMatthewHiggins commented 4 months ago

Description

I have replaced audioplayers package with this one. (soloud is much better for games) audioplayers allowed you to set the audio context. I used this to set the context to mix with others so that users can enjoy their own music while playing my game. This seems missing in soloud.

Requirements

Additional Context

I used a package called audio_context to try and fill the gap, however it seemed not to work. Perhaps soloud is resetting the context internally? I set the context on startup before the soloud init. I have not investigated further (maybe I need to set it after soloud init) It would be good if this was built-in like in audioplayers package.

When using the audio_context package I got a rejection from the app store upload requiring microphone permission explaination, even tho I did not use the mic, something to remember when implementing this, as ideally a package should not require this string if the user is not using that feature.