Skip to content
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

Bug Cannot initialize effect engine #17

Closed
tolgatasci opened this issue Dec 18, 2020 · 5 comments
Closed

Bug Cannot initialize effect engine #17

tolgatasci opened this issue Dec 18, 2020 · 5 comments

Comments

@tolgatasci
Copy link

tolgatasci commented Dec 18, 2020

my error

2020-12-18 16:25:22.653 24951-24951/com.E/AndroidRuntime: FATAL EXCEPTION: main
	Process: com., PID: 24951
	java.lang.RuntimeException: Cannot initialize effect engine for type: 0bed4300-ddd6-11db-8f34-0002a5d5c51b Error: -3
		at android.media.audiofx.AudioEffect.<init>(AudioEffect.java:468)
		at android.media.audiofx.Equalizer.<init>(Equalizer.java:139)
		at snow.player.ui.equalizer.AndroidAudioEffectManager.attachAudioEffect(AndroidAudioEffectManager.java:72)
		at snow.player.PlayerService.attachAudioEffect(PlayerService.java:517)
		at snow.player.PlayerService$PlayerImp.attachAudioEffect(PlayerService.java:1316)
		at snow.player.AbstractPlayer$4.onPrepared(AbstractPlayer.java:391)
		at snow.player.exo.ExoMusicPlayer$1.onReady(ExoMusicPlayer.java:118)
		at snow.player.exo.ExoMusicPlayer$1.onPlaybackStateChanged(ExoMusicPlayer.java:102)
		at com.google.android.exoplayer2.ExoPlayerImpl$PlaybackInfoUpdate.lambda$run$7$ExoPlayerImpl$PlaybackInfoUpdate(ExoPlayerImpl.java:1447)
		at com.google.android.exoplayer2.-$$Lambda$ExoPlayerImpl$PlaybackInfoUpdate$Kzo2-1gqk6OImqd4IyiYsdO2xc8.invokeListener(Unknown Source:2)
		at com.google.android.exoplayer2.BasePlayer$ListenerHolder.invoke(BasePlayer.java:279)
		at com.google.android.exoplayer2.ExoPlayerImpl.invokeAll(ExoPlayerImpl.java:1496)
		at com.google.android.exoplayer2.ExoPlayerImpl.access$100(ExoPlayerImpl.java:56)
		at com.google.android.exoplayer2.ExoPlayerImpl$PlaybackInfoUpdate.run(ExoPlayerImpl.java:1445)
		at com.google.android.exoplayer2.ExoPlayerImpl.notifyListeners(ExoPlayerImpl.java:1326)
		at com.google.android.exoplayer2.ExoPlayerImpl.updatePlaybackInfo(ExoPlayerImpl.java:954)
		at com.google.android.exoplayer2.ExoPlayerImpl.handlePlaybackInfo(ExoPlayerImpl.java:918)
		at com.google.android.exoplayer2.ExoPlayerImpl.lambda$new$0$ExoPlayerImpl(ExoPlayerImpl.java:162)
		at com.google.android.exoplayer2.-$$Lambda$ExoPlayerImpl$Krt_XK5S7OaAWWQo8WMLuiuwNGE.run(Unknown Source:4)
		at android.os.Handler.handleCallback(Handler.java:883)
		at android.os.Handler.dispatchMessage(Handler.java:100)
		at android.os.Looper.loop(Looper.java:224)
		at android.app.ActivityThread.main(ActivityThread.java:7562)
		at java.lang.reflect.Method.invoke(Native Method)
		at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
		at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)

my service

  @Nullable
	@Override
	protected AudioEffectManager onCreateAudioEffectManager() {
		return new AndroidAudioEffectManager();
	}
@jrfeng
Copy link
Owner

jrfeng commented Dec 18, 2020

OK, I'll check it out.

@tolgatasci
Copy link
Author

every time need stop and start equalyzer

new start music
playerClient.setAudioEffectEnabled(false);

loading finish

playerClient.setAudioEffectEnabled(true);

that is solved

@jrfeng
Copy link
Owner

jrfeng commented Dec 18, 2020

This bug was caused by ExoMusicPlayer, it returned the wrong audio session id. I will try to fix it.

@jrfeng
Copy link
Owner

jrfeng commented Dec 19, 2020

@tolgatasci This bug has been fixed.

@tolgatasci
Copy link
Author

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants