[DEBUG] correct some crash
This commit is contained in:
parent
adfb75d258
commit
c667f6c327
@ -61,12 +61,18 @@ void drain::Resampler::configurationChange() {
|
|||||||
m_needProcess = false;
|
m_needProcess = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if ( m_input.getFrequency() == 0
|
||||||
|
|| m_output.getFrequency() == 0) {
|
||||||
|
DRAIN_WARNING("Configure IO with 0 frequency ... " << m_input << " to " << m_output);
|
||||||
|
return;
|
||||||
|
}
|
||||||
#ifdef HAVE_SPEEX_DSP_RESAMPLE
|
#ifdef HAVE_SPEEX_DSP_RESAMPLE
|
||||||
if (m_speexResampler != nullptr) {
|
if (m_speexResampler != nullptr) {
|
||||||
speex_resampler_destroy(m_speexResampler);
|
speex_resampler_destroy(m_speexResampler);
|
||||||
m_speexResampler = nullptr;
|
m_speexResampler = nullptr;
|
||||||
}
|
}
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
DRAIN_WARNING("Create resampler for : " << m_input << " to " << m_output);
|
||||||
m_speexResampler = speex_resampler_init(m_output.getMap().size(),
|
m_speexResampler = speex_resampler_init(m_output.getMap().size(),
|
||||||
m_input.getFrequency(),
|
m_input.getFrequency(),
|
||||||
m_output.getFrequency(),
|
m_output.getFrequency(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user