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.
  • Loading branch information
Dennis Sheirer committed Oct 27, 2024
1 parent a15ff90 commit a5a55e5
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 a5a55e5

Please sign in to comment.