diff options
Diffstat (limited to 'include-gpl/audio/audiofifo.h')
-rw-r--r-- | include-gpl/audio/audiofifo.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/include-gpl/audio/audiofifo.h b/include-gpl/audio/audiofifo.h index 98f35b8..385f138 100644 --- a/include-gpl/audio/audiofifo.h +++ b/include-gpl/audio/audiofifo.h @@ -36,11 +36,17 @@ public: uint drain(uint numSamples); void clear(); - inline uint flush() { return drain(m_fill); } - inline uint fill() const { return m_fill; } - inline bool isEmpty() const { return m_fill == 0; } - inline bool isFull() const { return m_fill == m_size; } - inline uint size() const { return m_size; } + uint flush() { return drain(m_fill); } + uint fill() const { return m_fill; } + bool isEmpty() const { return m_fill == 0; } + bool isFull() const { return m_fill == m_size; } + uint size() const { return m_size; } + + quint32 getSampleRate() const { return m_sampleRate; } + void setSampleRate(quint32 rate) { m_sampleRate = rate; } + + bool isStopped() const { return m_stopped; } + void setStopped(bool stopped) { m_stopped = stopped; } private: QMutex m_mutex; @@ -59,6 +65,9 @@ private: QWaitCondition m_writeWaitCondition; QWaitCondition m_readWaitCondition; + quint32 m_sampleRate; + bool m_stopped; + bool create(uint sampleSize, uint numSamples); }; |