Skip to content

Commit

Permalink
#2040 Reset AMBE/IMBE audio codec after each call to prevent carryove…
Browse files Browse the repository at this point in the history
…r of last audio frame from previous call. (#2048)

Co-authored-by: Dennis Sheirer <[email protected]>
  • Loading branch information
DSheirer and Dennis Sheirer authored Oct 27, 2024
1 parent a15ff90 commit 37996d0
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,18 @@ public JmbeAudioModule(UserPreferences userPreferences, AliasList aliasList, int
loadConverter();
}

@Override
protected void closeAudioSegment()
{
super.closeAudioSegment();

//Reset the audio codec to clear any leftover frame data from the previous call.
if(mAudioCodec != null)
{
mAudioCodec.reset();
}
}

@Override
public void dispose()
{
Expand Down

0 comments on commit 37996d0

Please sign in to comment.