flutter-sound-stream
flutter-sound-stream copied to clipboard
Is it possible to change the playback speed?
Can I change the playback speed directly through the library, or should I implement it myself?
Thank you for the help and the great library!
I think you implement it yourself would be a better solution. You can apply multiple filters to the raw audio data before sending it to the player.
Cheers!
Thank you! But I think changing the playback speed is not a raw audio manipulation, but some setting on the underlying Android/iOS player. So maybe it would be a nice feature to have on this library.
What do you think?
I think the easiest way to achieve that without any raw data manipulation is setting the player's frequency higher or lower the recording frequency. However, that would cause a pitch-changed side effect. I'll look into this anyway, hope it wouldn't add too much overhead to the lib 😁
On Android, you can use the setPlaybackParams(PlaybackParams params) method of the Audiotrack to change the speed, without affecting the pitch. I guess something similar exists on iOS too.
Update: On iOS you can use the mAudioEngine.connect(...) method to attach an AVAudioUnitVarispeed.
Hope this helps!