mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 12:55:33 +08:00
[AFV] Change output format and processing to 32 bit float
32 bit float is what is used in C# reference and has a much higher dynamic range. 16 bit integer was clipping very often with all the VHF simulation applied.
This commit is contained in:
committed by
Mat Sutcliffe
parent
fbb126370c
commit
240df93406
@@ -13,7 +13,7 @@ namespace BlackSound
|
||||
m_maxBufferSize = format.bytesForDuration(10 * 1000 * 1000);
|
||||
}
|
||||
|
||||
void CBufferedWaveProvider::addSamples(const QVector<qint16> &samples)
|
||||
void CBufferedWaveProvider::addSamples(const QVector<float> &samples)
|
||||
{
|
||||
int delta = m_audioBuffer.size() + samples.size() - m_maxBufferSize;
|
||||
if (delta > 0)
|
||||
@@ -23,7 +23,7 @@ namespace BlackSound
|
||||
m_audioBuffer.append(samples);
|
||||
}
|
||||
|
||||
int CBufferedWaveProvider::readSamples(QVector<qint16> &samples, qint64 count)
|
||||
int CBufferedWaveProvider::readSamples(QVector<float> &samples, qint64 count)
|
||||
{
|
||||
qint64 len = qMin(count, static_cast<qint64>(m_audioBuffer.size()));
|
||||
samples = m_audioBuffer.mid(0, len);
|
||||
|
||||
Reference in New Issue
Block a user