How to getAudioSessionId?

In my code I'm using AudioManager for playing songs. I want to add Equalizer to the app. I'm using Equalizer class.

AudioManager manager = (AudioManager) SplashScreen.mApplicationContext.getSystemService(Context.AUDIO_SERVICE);

int audioSessionId = manager.generateAudioSessionId();

EqualizerModel.getInstance().setEqualizer(new Equalizer(0, audioSessionId));

But the problem is that I don't want to generate a new audio session ID, I want to get the current Audio session ID. Do you know how can I achieve it? I saw a few examples with MediaPlayer, but if I will use it, it's mean I need to completely implement from scratch media player and this is not what I want. I'm using the default media player of the phone and I wish to continue working with it.

Show Accepted Answer

Guest Quick Reply (No URL, BBcode or HTML)

Last post by smueller
3 hours ago
Last post by mschneider
4 hours ago
Last post by ray.swaniawski
4 hours ago
Last post by tlabadie
1 hour ago
Last post by jdoyle
49 minutes ago
Last post by leann.kuhic
3 hours ago
Last post by quinten71
1 hour ago
Last post by ddurgan
4 hours ago
Last post by lockman.katarina
3 hours ago