doublesymmetry / KotlinAudio

KotlinAudio is an Android audio player written in Kotlin, making it simpler to work with audio playback from streams and files.
Apache License 2.0
44 stars 70 forks source link

feat: volume fade in/out #91

Open lovegaoshi opened 1 year ago

lovegaoshi commented 1 year ago

supports the fade in/out feature request in RNTP. Because RN's Animated.Value won't change within Android's HeadlessJsTaskService, a native way to animate volume change to achieve a fading effect is necessary; I added a simple linear scaling that seems to work within the KA example.

scope.async doesn't work as I expected (Deferred.await() doesn't wait for RN's Promise.resolve?) any help is appreciated!