diff options
author | Christian Daniel <cd@maintech.de> | 2014-08-15 11:37:26 +0200 |
---|---|---|
committer | Christian Daniel <cd@maintech.de> | 2014-08-16 22:32:45 +0200 |
commit | 5864e48bd8d559223bed4a9eabbc4f894dc128ef (patch) | |
tree | e2a6d36abad80e0bcccbd79c48b34b4b4ecf80bc /include-gpl/audio/audiofifo.h | |
parent | 78201046667987b25ade0b4023805a93353133fe (diff) |
major rewrite
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); }; |