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
|
@ -13,15 +13,13 @@
|
|||
|
||||
namespace AudioCore {
|
||||
|
||||
using StreamPtr = std::shared_ptr<Stream>;
|
||||
|
||||
/**
|
||||
* Represents an audio playback interface, used to open and play audio streams
|
||||
*/
|
||||
class AudioOut {
|
||||
public:
|
||||
/// Opens a new audio stream
|
||||
StreamPtr OpenStream(int sample_rate, int num_channels,
|
||||
StreamPtr OpenStream(u32 sample_rate, u32 num_channels,
|
||||
Stream::ReleaseCallback&& release_callback);
|
||||
|
||||
/// Returns a vector of recently released buffers specified by tag for the specified stream
|
||||
|
@ -37,7 +35,7 @@ public:
|
|||
bool QueueBuffer(StreamPtr stream, Buffer::Tag tag, std::vector<u8>&& data);
|
||||
|
||||
private:
|
||||
/// Active audio streams on the interface
|
||||
SinkPtr sink;
|
||||
std::vector<StreamPtr> streams;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue