mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-25 09:18:54 -05:00
Compare commits
7 Commits
4ab6cc3a50
...
652a03b366
Author | SHA1 | Date | |
---|---|---|---|
|
652a03b366 | ||
|
fcd43df711 | ||
|
ff7c06311b | ||
|
5888645957 | ||
|
2fddaff6d2 | ||
|
4cf2c0b7c7 | ||
|
efd98785cf |
@ -366,7 +366,7 @@ void DABDemodSink::tii(int tii)
|
||||
}
|
||||
}
|
||||
|
||||
static int16_t scale(int16_t sample, float factor)
|
||||
static int16_t scale(Real sample, float factor)
|
||||
{
|
||||
int32_t prod = (int32_t)(((int32_t)sample) * factor);
|
||||
prod = std::min(prod, 32767);
|
||||
@ -403,7 +403,12 @@ void DABDemodSink::audio(int16_t *buffer, int size, int samplerate, bool stereo)
|
||||
ci.real(0.0f);
|
||||
ci.imag(0.0f);
|
||||
}
|
||||
if (m_audioInterpolatorDistance < 1.0f) // interpolate
|
||||
|
||||
if (m_audioInterpolatorDistance == 1.0f)
|
||||
{
|
||||
processOneAudioSample(ci);
|
||||
}
|
||||
else if (m_audioInterpolatorDistance < 1.0f) // interpolate
|
||||
{
|
||||
while (!m_audioInterpolator.interpolate(&m_audioInterpolatorDistanceRemain, ci, &ca))
|
||||
{
|
||||
|
@ -217,7 +217,6 @@ void AudioOutput::applySettings(const AudioOutputSettings& settings, const QList
|
||||
m_audioDeviceIndex = audioDeviceManager->getOutputDeviceIndex(settings.m_deviceName);
|
||||
//qDebug("AMDemod::applySettings: audioDeviceName: %s audioDeviceIndex: %d", qPrintable(settings.m_audioDeviceName), audioDeviceIndex);
|
||||
audioDeviceManager->removeAudioSink(&m_audioFifo);
|
||||
audioDeviceManager->addAudioSink(&m_audioFifo, getInputMessageQueue(), m_audioDeviceIndex);
|
||||
m_sampleRate = audioDeviceManager->getOutputSampleRate(m_audioDeviceIndex);
|
||||
forwardChange = true;
|
||||
}
|
||||
|
@ -250,7 +250,6 @@ void AudioInput::applySettings(const AudioInputSettings& settings, QList<QString
|
||||
}
|
||||
|
||||
audioDeviceManager->removeAudioSource(&m_fifo);
|
||||
audioDeviceManager->addAudioSource(&m_fifo, getInputMessageQueue(), m_audioDeviceIndex);
|
||||
m_sampleRate = audioDeviceManager->getInputSampleRate(m_audioDeviceIndex);
|
||||
qDebug("AudioInput::applySettings: audioDeviceName: %s audioDeviceIndex: %d sampleRate: %d",
|
||||
qPrintable(settings.m_deviceName), m_audioDeviceIndex, m_sampleRate);
|
||||
|
@ -373,7 +373,7 @@ def main():
|
||||
pass
|
||||
except Exception as ex:
|
||||
tb = traceback.format_exc()
|
||||
print >> sys.stderr, tb
|
||||
print(tb, file=sys.stderr)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
Loading…
Reference in New Issue
Block a user