mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-23 01:55:48 -05:00
Fixed AudioNetSink stereo handling
This commit is contained in:
parent
609fff1bd6
commit
d97f92dcc3
@ -194,16 +194,19 @@ void AudioNetSink::setDecimationFilters()
|
||||
{
|
||||
case CodecPCMA:
|
||||
case CodecPCMU:
|
||||
m_audioFilter.setDecimFilters(m_sampleRate, decimatedSampleRate, 3300.0, 300.0);
|
||||
m_audioFilterR.setDecimFilters(m_sampleRate, decimatedSampleRate, 3300.0, 300.0);
|
||||
m_audioFilterL.setDecimFilters(m_sampleRate, decimatedSampleRate, 3300.0, 300.0);
|
||||
break;
|
||||
case CodecG722:
|
||||
m_audioFilter.setDecimFilters(m_sampleRate, decimatedSampleRate, 7000.0, 50.0);
|
||||
m_audioFilterR.setDecimFilters(m_sampleRate, decimatedSampleRate, 7000.0, 50.0);
|
||||
m_audioFilterL.setDecimFilters(m_sampleRate, decimatedSampleRate, 7000.0, 50.0);
|
||||
break;
|
||||
case CodecOpus:
|
||||
case CodecL8:
|
||||
case CodecL16:
|
||||
default:
|
||||
m_audioFilter.setDecimFilters(m_sampleRate, decimatedSampleRate, 0.45*decimatedSampleRate, 50.0);
|
||||
m_audioFilterR.setDecimFilters(m_sampleRate, decimatedSampleRate, 0.45*decimatedSampleRate, 50.0);
|
||||
m_audioFilterL.setDecimFilters(m_sampleRate, decimatedSampleRate, 0.45*decimatedSampleRate, 50.0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -214,7 +217,7 @@ void AudioNetSink::write(qint16 isample)
|
||||
|
||||
if (m_decimation > 1)
|
||||
{
|
||||
float lpSample = m_audioFilter.run(sample / 32768.0f);
|
||||
float lpSample = m_audioFilterR.run(sample / 32768.0f);
|
||||
|
||||
if (m_decimationCount >= m_decimation - 1)
|
||||
{
|
||||
@ -367,8 +370,8 @@ void AudioNetSink::write(qint16 ilSample, qint16 irSample)
|
||||
|
||||
if (m_decimation > 1)
|
||||
{
|
||||
float lpLSample = m_audioFilter.runLP(lSample / 32768.0f);
|
||||
float lpRSample = m_audioFilter.runLP(rSample / 32768.0f);
|
||||
float lpLSample = m_audioFilterL.runLP(lSample / 32768.0f);
|
||||
float lpRSample = m_audioFilterR.runLP(rSample / 32768.0f);
|
||||
|
||||
if (m_decimationCount >= m_decimation - 1)
|
||||
{
|
||||
|
@ -88,7 +88,8 @@ protected:
|
||||
AudioCompressor m_audioCompressor;
|
||||
AudioG722 m_g722;
|
||||
AudioOpus m_opus;
|
||||
AudioFilter m_audioFilter;
|
||||
AudioFilter m_audioFilterR;
|
||||
AudioFilter m_audioFilterL;
|
||||
int m_sampleRate;
|
||||
bool m_stereo;
|
||||
uint32_t m_decimation;
|
||||
|
Loading…
Reference in New Issue
Block a user