Revert "Revert back to 20ms frames."

This reverts commit b67313cdef.
ms-macos-dropout-improvement
Mooneer Salem 2025-05-16 05:45:42 -04:00
parent ae28367572
commit 5e40ec7dba
2 changed files with 3 additions and 3 deletions

View File

@ -65,7 +65,7 @@
#define VOX_TONE_FREQ 1000.0 // optional left channel vox tone freq
#define VOX_TONE_AMP 30000 // optional left channel vox tone amp
#define FIFO_SIZE 440 // default fifo size in ms
#define FRAME_DURATION 0.02 // default frame length of 20 mS = 0.02 seconds
#define FRAME_DURATION 0.01 // default frame length of 20 mS = 0.02 seconds
#define MAX_BITS_PER_CODEC_FRAME 64 // 1600 bit/s mode
#define MAX_BYTES_PER_CODEC_FRAME (MAX_BITS_PER_CODEC_FRAME/8)

View File

@ -596,7 +596,7 @@ void TxRxThread::txProcessing_()
codec2_fifo_used(cbData->outfifo1), codec2_fifo_free(cbData->outfifo1), nsam_one_modem_frame);
}
int nsam_in_48 = freedvInterface.getTxNumSpeechSamples() * ((float)inputSampleRate_ / (float)freedvInterface.getTxSpeechSampleRate());
int nsam_in_48 = (int)(inputSampleRate_ * FRAME_DURATION);
assert(nsam_in_48 > 0);
int nout;
@ -704,7 +704,7 @@ void TxRxThread::rxProcessing_()
g_resyncs++;
}
// Attempt to read one processing frame (about 20ms) of receive samples, we
// Attempt to read one processing frame (about 10ms) of receive samples, we
// keep this frame duration constant across modes and sound card sample rates
int nsam = (int)(inputSampleRate_ * FRAME_DURATION);
assert(nsam > 0);