Skip to content

Commit 37996d0

Browse files
DSheirerDennis Sheirer
andauthored
#2040 Reset AMBE/IMBE audio codec after each call to prevent carryover of last audio frame from previous call. (#2048)
Co-authored-by: Dennis Sheirer <[email protected]>
1 parent a15ff90 commit 37996d0

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/main/java/io/github/dsheirer/audio/codec/mbe/JmbeAudioModule.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,18 @@ public JmbeAudioModule(UserPreferences userPreferences, AliasList aliasList, int
6262
loadConverter();
6363
}
6464

65+
@Override
66+
protected void closeAudioSegment()
67+
{
68+
super.closeAudioSegment();
69+
70+
//Reset the audio codec to clear any leftover frame data from the previous call.
71+
if(mAudioCodec != null)
72+
{
73+
mAudioCodec.reset();
74+
}
75+
}
76+
6577
@Override
6678
public void dispose()
6779
{

0 commit comments

Comments
 (0)