New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FrameworkSampleSource: Attached equaliser is not kept after calling seekTo? #252
Comments
|
@ojw28, the code has changed per your suggestion and I moved the EQ setup into the onAudioSession method. The EQ setup looks like this:
When playing the same song again and again, I did notice the EQ is still not activated right away, songs will still play high pitched in their first split second or so. Although, the behaviour is indeed a bit better than before. Regarding the session ID, I can confirm it is the same. All tests are done on Android 4.4 (API19), by the way. |
|
Thanks for the input. I've adapted my implementation to properly release the EQ in I'm testing on a custom MTK tablet running Android 4.4.2. A previous solution, even with out the re-released Equalizer |
This was diagnosed as a platform issue where the effect wasn't being properly included in a reference count associated with the audio session. The issue was fixed in Lollypop, but affected earlier releases of Android. We've added a workaround that you can use to get correct behavior prior to Lollypop, but we've left it disabled by default because attaching effects isn't a common use case, and we'd rather not have the workaround enabled in all cases (it's pretty hacky). To make use of the workaround, you can simply flip this flag to true: |
Given a player is initialised like this:
setupEqualizer()
will set some bands etc.Then the behaviour I noticed is:
seekTo
on themediaPlayer
object, the equaliser is completely disabled. Internally, seekTo is calling "stop" - is it possible that the AudioSession is then discarded as well? If so, would it be sensible to callonAudioSessionId
again to share the new session?Test was conducted using revision a879819.
The text was updated successfully, but these errors were encountered: