Open Zayah117 opened 3 years ago
I did implement a helper class that applies Fade to an AudioPlayer
Since was a quicky implementation, it not fill all usecases, but you can change anything to fill your needs. I did use the Howler Fade Custom implementation for the Web as base for this implementation, so it can help you if you'll change something.
Tooltip: you can convert it to Dart extension syntax instead a class if you want.
Anyway, thanks for opening this issue and sharing the Howler package.
I'm looking into this library to implement audio playback for a music app. I'm wondering if audio fade in and fade out is on your roadmap for future features. It would be extremely useful to be able to play a sound with fade in and fade out for volume.
It would be nice if I could pass in a 'fade in' and/or a 'fade-out' duration and volume for any audioplayer. You could, for example, have optional parameters for fading in the constructor:
You could also make the fadeIn/fadeOut properties public so we can update the audioplayer on the fly:
This implementation would require defining some sort of 'Fade' class to pass into the audio player.
Platforms I'm aiming for: Android and iOS, + web support if possible.
There is a small audio library on pub.dev called Howler that seems to implement audio fades: https://pub.dev/packages/howler
I have not tested this yet however.