mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-21 04:45:31 +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
@@ -32,10 +32,10 @@ namespace BlackSound
|
||||
CBufferedWaveProvider(const QAudioFormat &format, QObject *parent = nullptr);
|
||||
|
||||
//! Add samples
|
||||
void addSamples(const QVector<qint16> &samples);
|
||||
void addSamples(const QVector<float> &samples);
|
||||
|
||||
//! ISampleProvider::readSamples
|
||||
virtual int readSamples(QVector<qint16> &samples, qint64 count) override;
|
||||
virtual int readSamples(QVector<float> &samples, qint64 count) override;
|
||||
|
||||
//! Bytes from buffer
|
||||
int getBufferedBytes() const { return m_audioBuffer.size(); }
|
||||
@@ -44,7 +44,7 @@ namespace BlackSound
|
||||
void clearBuffer();
|
||||
|
||||
private:
|
||||
QVector<qint16> m_audioBuffer;
|
||||
QVector<float> m_audioBuffer;
|
||||
qint32 m_maxBufferSize;
|
||||
};
|
||||
} // ns
|
||||
|
||||
Reference in New Issue
Block a user