Skip to content

Library failing after 30 calls: Need to invoke audioTrack.release();  #8

@eliokhattar

Description

@eliokhattar

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions