mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-25 17:28:50 -05:00
Add option to AudioFifo to accept any sample size
This commit is contained in:
parent
cb09035fa3
commit
63e41e18ef
@ -63,6 +63,13 @@ bool AudioFifo::setSize(uint32_t numSamples)
|
||||
return create(numSamples);
|
||||
}
|
||||
|
||||
bool AudioFifo::setSampleSize(uint32_t sampleSize, uint32_t numSamples)
|
||||
{
|
||||
QMutexLocker mutexLocker(&m_mutex);
|
||||
m_sampleSize = sampleSize;
|
||||
return create(numSamples);
|
||||
}
|
||||
|
||||
uint32_t AudioFifo::write(const quint8* data, uint32_t numSamples)
|
||||
{
|
||||
uint32_t total;
|
||||
|
@ -34,6 +34,7 @@ public:
|
||||
~AudioFifo();
|
||||
|
||||
bool setSize(uint32_t numSamples);
|
||||
bool setSampleSize(uint32_t sampleSize, uint32_t numSamples);
|
||||
|
||||
uint32_t write(const quint8* data, uint32_t numSamples);
|
||||
uint32_t read(quint8* data, uint32_t numSamples);
|
||||
@ -53,7 +54,7 @@ private:
|
||||
|
||||
qint8* m_fifo;
|
||||
|
||||
const uint32_t m_sampleSize;
|
||||
uint32_t m_sampleSize;
|
||||
|
||||
uint32_t m_size;
|
||||
uint32_t m_fill;
|
||||
|
Loading…
Reference in New Issue
Block a user