openplayer-android
openplayer-android copied to clipboard
Library failing after 30 calls: Need to invoke audioTrack.release();
Hello The library fails with the below stack trace whenever i try to invoke it 30 times. After investigation, turns out the library code should be modified in a way to release the audio player inside stopAudioTrack in ImplDecodeFeed as below
public void stopAudioTrack() {
//Stop the audio track
if (audioTrack != null) {
Log.d(TAG, "Audiotrack flush");
try {
audioTrack.flush();
audioTrack.stop();
System.out.println("ELIOOOO TODO: audio track release");
audioTrack.release(); //Added by Elio
} catch (Exception ex) {
Log.e(TAG, "Audiotrack stop ex:"+ex.getMessage());
}
audioTrack = null;
}
if (visualizer!=null){
visualizer.setEnabled(false);
visualizer = null;
}
Please if someone with access rights can fix it.