diff options
Diffstat (limited to 'src/audio_core/stream.h')
-rw-r--r-- | src/audio_core/stream.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/audio_core/stream.h b/src/audio_core/stream.h index 5f43b0798..5c1005899 100644 --- a/src/audio_core/stream.h +++ b/src/audio_core/stream.h @@ -16,8 +16,6 @@ namespace AudioCore { -using BufferPtr = std::shared_ptr<Buffer>; - /** * Represents an audio stream, which is a sequence of queued buffers, to be outputed by AudioOut */ @@ -60,6 +58,17 @@ public: return queued_buffers.size(); } + /// Gets the sample rate + u32 GetSampleRate() const { + return sample_rate; + } + + /// Gets the number of channels + u32 GetNumChannels() const; + + /// Gets the sample size in bytes + u32 GetSampleSize() const; + private: /// Current state of the stream enum class State { @@ -86,4 +95,6 @@ private: std::queue<BufferPtr> released_buffers; ///< Buffers recently released from the stream }; +using StreamPtr = std::shared_ptr<Stream>; + } // namespace AudioCore |