#817 Resolves issue with jittery audio playback and recording for MPT1327 channels. (#830)

Co-authored-by: Denny <denny@denny-desktop>
This commit is contained in:
Denny Sheirer
2020-05-24 07:58:59 -04:00
committed by GitHub
parent 3d816c3570
commit 2c3648f8c2
11 changed files with 131 additions and 52 deletions

View File

@@ -109,19 +109,19 @@ public class SingleChannelState extends AbstractChannelState implements IDecoder
mStateMachine.addListener(mSquelchController);
mStateMachine.setChannelType(mChannel.getChannelType());
mStateMachine.setIdentifierUpdateListener(mIdentifierCollection);
mStateMachine.setEndTimeoutBuffer(RESET_TIMEOUT_DELAY);
mStateMachine.setEndTimeoutBufferMilliseconds(RESET_TIMEOUT_DELAY);
if(channel.getChannelType() == ChannelType.STANDARD)
{
mStateMachine.setFadeTimeoutBuffer(FADE_TIMEOUT_DELAY);
mStateMachine.setFadeTimeoutBufferMilliseconds(FADE_TIMEOUT_DELAY);
}
else
{
final DecodeConfiguration decodeConfig = channel.getDecodeConfiguration();
final int fadeTimeoutSeconds = decodeConfig instanceof WithCallTimeout
? ((WithCallTimeout) decodeConfig).getCallTimeout()
? ((WithCallTimeout) decodeConfig).getCallTimeoutSeconds()
: DecodeConfiguration.DEFAULT_CALL_TIMEOUT_DELAY_SECONDS;
mStateMachine.setFadeTimeoutBuffer(fadeTimeoutSeconds * 1000);
mStateMachine.setFadeTimeoutBufferMilliseconds(fadeTimeoutSeconds * 1000);
}
}
@@ -412,7 +412,7 @@ public class SingleChannelState extends AbstractChannelState implements IDecoder
if(event instanceof ChangeChannelTimeoutEvent)
{
ChangeChannelTimeoutEvent timeout = (ChangeChannelTimeoutEvent)event;
mStateMachine.setFadeTimeoutBuffer(timeout.getCallTimeout());
mStateMachine.setFadeTimeoutBufferMilliseconds(timeout.getCallTimeoutMilliseconds());
}
case CONTINUATION:
case DECODE: