gauravk95 / audio-visualizer-android

🎵 [Android Library] A light-weight and easy-to-use Audio Visualizer for Android.
Apache License 2.0
844 stars 127 forks source link

How to resume the animation #2

Closed Claudio725 closed 5 years ago

Claudio725 commented 5 years ago

Hi guys! I have apreciatted your plugin, but I need to know how to resume the process after stop the same.

gauravk95 commented 5 years ago

When resuming the process, you can set the Audio Session ID again, i.e reset the visualizer like this

int audioSessionId = mAudioPlayer.getAudioSessionId(); if (audioSessionId != -1) mVisualizer.setAudioSessionId(audioSessionId);

I will add new calls/methods, to make it easier to handle such situations, soon, but for now you may use the following solution. Hope this helps!

gauravk95 commented 5 years ago

I have updated the sample app to show starting and stopping the audio. Hope that helps! Will be closing the issue soon, if no feedback is provided.

gauravk95 commented 5 years ago

Issue closed due to inactivity.