ukasz123 / soundpool

Soundpool plugin for Flutter
87 stars 64 forks source link

[FeatureRequest] Add soundpool.unload(int soundId) #48

Open NebulaFox opened 3 years ago

NebulaFox commented 3 years ago

Need to be able to unload some sounds that would no longer being needed and didn't want to empty the pool and re-add sound files. Since Android's SoundPool API has unload(int soundId) it would be good if soundpool had it as well.

If this goes against the design decision of soundpool, please let me know so I can find another solution.

ukasz123 commented 3 years ago

@NebulaFox Does preparing multiple pools is a solution for you? I mean you can put long-time lasting sounds in one pool and the short-time ones in another and dispose the second one only.