audio_core: Misc. improvements to stream/buffer/audio_out.
This commit is contained in:
parent
eaf66b4c9f
commit
0e8a2c7222
5 changed files with 32 additions and 20 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue