diff options
| author | 2018-08-05 23:35:22 -0400 | |
|---|---|---|
| committer | 2018-08-05 23:35:22 -0400 | |
| commit | bb21c2198a35fe714d5d95c49b93a8848933e9b4 (patch) | |
| tree | 2a3da0f4203422bce7f999b9e1597e51ea875bf2 /src/audio_core/stream.h | |
| parent | Merge pull request #927 from bunnei/fix-texs (diff) | |
| parent | audio_core: Implement audren_u audio playback. (diff) | |
| download | yuzu-bb21c2198a35fe714d5d95c49b93a8848933e9b4.tar.gz yuzu-bb21c2198a35fe714d5d95c49b93a8848933e9b4.tar.xz yuzu-bb21c2198a35fe714d5d95c49b93a8848933e9b4.zip | |
Merge pull request #925 from bunnei/audren
Implement audren audio output
Diffstat (limited to 'src/audio_core/stream.h')
| -rw-r--r-- | src/audio_core/stream.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/audio_core/stream.h b/src/audio_core/stream.h index 35253920e..049b92ca9 100644 --- a/src/audio_core/stream.h +++ b/src/audio_core/stream.h | |||
| @@ -6,6 +6,7 @@ | |||
| 6 | 6 | ||
| 7 | #include <functional> | 7 | #include <functional> |
| 8 | #include <memory> | 8 | #include <memory> |
| 9 | #include <string> | ||
| 9 | #include <vector> | 10 | #include <vector> |
| 10 | #include <queue> | 11 | #include <queue> |
| 11 | 12 | ||
| @@ -33,7 +34,7 @@ public: | |||
| 33 | using ReleaseCallback = std::function<void()>; | 34 | using ReleaseCallback = std::function<void()>; |
| 34 | 35 | ||
| 35 | Stream(u32 sample_rate, Format format, ReleaseCallback&& release_callback, | 36 | Stream(u32 sample_rate, Format format, ReleaseCallback&& release_callback, |
| 36 | SinkStream& sink_stream); | 37 | SinkStream& sink_stream, std::string&& name_); |
| 37 | 38 | ||
| 38 | /// Plays the audio stream | 39 | /// Plays the audio stream |
| 39 | void Play(); | 40 | void Play(); |
| @@ -68,9 +69,6 @@ public: | |||
| 68 | /// Gets the number of channels | 69 | /// Gets the number of channels |
| 69 | u32 GetNumChannels() const; | 70 | u32 GetNumChannels() const; |
| 70 | 71 | ||
| 71 | /// Gets the sample size in bytes | ||
| 72 | u32 GetSampleSize() const; | ||
| 73 | |||
| 74 | private: | 72 | private: |
| 75 | /// Current state of the stream | 73 | /// Current state of the stream |
| 76 | enum class State { | 74 | enum class State { |
| @@ -96,6 +94,7 @@ private: | |||
| 96 | std::queue<BufferPtr> queued_buffers; ///< Buffers queued to be played in the stream | 94 | std::queue<BufferPtr> queued_buffers; ///< Buffers queued to be played in the stream |
| 97 | std::queue<BufferPtr> released_buffers; ///< Buffers recently released from the stream | 95 | std::queue<BufferPtr> released_buffers; ///< Buffers recently released from the stream |
| 98 | SinkStream& sink_stream; ///< Output sink for the stream | 96 | SinkStream& sink_stream; ///< Output sink for the stream |
| 97 | std::string name; ///< Name of the stream, must be unique | ||
| 99 | }; | 98 | }; |
| 100 | 99 | ||
| 101 | using StreamPtr = std::shared_ptr<Stream>; | 100 | using StreamPtr = std::shared_ptr<Stream>; |