ukasz123 / soundpool

Soundpool plugin for Flutter
89 stars 67 forks source link

Feature Request: Pitch Adjustment for Soundpool #128

Open farmerswalker opened 1 year ago

farmerswalker commented 1 year ago

I'm currently working on a project where I use Soundpool extensively for its efficient sound management and ability to play multiple streams simultaneously. It's been a fantastic tool so far.😄

However, I've encountered a limitation regarding the lack of pitch control within the library (not speed rate). The ability to adjust the pitch of audio clips programmatically would be incredibly beneficial for a variety of applications, including musical instrument apps, game sound effects, and more.

I understand that implementing this feature may involve considerable effort, but it would greatly enhance the library's capabilities and open up new possibilities for developers.

Thank you for considering this feature request. I am looking forward to any possibility of its future implementation.

ukasz123 commented 1 year ago

Unfortunately the Android Soundpool API doesn't support pitch control. I think changing the pitch of the audio track without changing the speed would require processing the original stream of bytes in complex way. That means if you want to change the pitch you'd have to update the sound in the pool cache before playing. Therefore I'd rather not do this as it would require some hacking on Android (and probably on iOS too to keep the feature parity).