mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-26 17:58:43 -05:00
FreeDV modulator: fixed FreeDV arrays initialization (fixed)
This commit is contained in:
parent
5dbf374d0f
commit
9232f67668
@ -692,18 +692,27 @@ void FreeDVMod::applyFreeDVMode(FreeDVModSettings::FreeDVMode mode)
|
||||
int nNomModemSamples = freedv_get_n_nom_modem_samples(m_freeDV);
|
||||
int Fs = freedv_get_modem_sample_rate(m_freeDV);
|
||||
int Rs = freedv_get_modem_symbol_rate(m_freeDV);
|
||||
if ((m_speechIn) && (nSpeechSamples != m_nSpeechSamples)) {
|
||||
|
||||
if (nSpeechSamples != m_nSpeechSamples)
|
||||
{
|
||||
if (m_speechIn) {
|
||||
delete[] m_speechIn;
|
||||
}
|
||||
|
||||
if ((m_modOut) && (nNomModemSamples != m_nNomModemSamples)) {
|
||||
m_speechIn = new int16_t[nSpeechSamples];
|
||||
m_nSpeechSamples = nSpeechSamples;
|
||||
}
|
||||
|
||||
if (nNomModemSamples != m_nNomModemSamples)
|
||||
{
|
||||
if (m_modOut) {
|
||||
delete[] m_modOut;
|
||||
}
|
||||
|
||||
m_nSpeechSamples = nSpeechSamples;
|
||||
m_modOut = new int16_t[nNomModemSamples];
|
||||
m_nNomModemSamples = nNomModemSamples;
|
||||
m_speechIn = new int16_t[m_nSpeechSamples];
|
||||
m_modOut = new int16_t[m_nNomModemSamples];
|
||||
}
|
||||
|
||||
m_iSpeech = 0;
|
||||
m_iModem = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user