mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2025-06-15 12:07:57 -05:00
audio_core: Misc. improvements to stream/buffer/audio_out.
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user