summaryrefslogtreecommitdiff
path: root/src/audio_core/buffer.h
diff options
context:
space:
mode:
authorGravatar bunnei2018-08-05 23:35:22 -0400
committerGravatar GitHub2018-08-05 23:35:22 -0400
commitbb21c2198a35fe714d5d95c49b93a8848933e9b4 (patch)
tree2a3da0f4203422bce7f999b9e1597e51ea875bf2 /src/audio_core/buffer.h
parentMerge pull request #927 from bunnei/fix-texs (diff)
parentaudio_core: Implement audren_u audio playback. (diff)
downloadyuzu-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/buffer.h')
-rw-r--r--src/audio_core/buffer.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/audio_core/buffer.h b/src/audio_core/buffer.h
index 4bf5fd58a..a323b23ec 100644
--- a/src/audio_core/buffer.h
+++ b/src/audio_core/buffer.h
@@ -18,11 +18,16 @@ class Buffer {
18public: 18public:
19 using Tag = u64; 19 using Tag = u64;
20 20
21 Buffer(Tag tag, std::vector<u8>&& data) : tag{tag}, data{std::move(data)} {} 21 Buffer(Tag tag, std::vector<s16>&& samples) : tag{tag}, samples{std::move(samples)} {}
22 22
23 /// Returns the raw audio data for the buffer 23 /// Returns the raw audio data for the buffer
24 const std::vector<u8>& GetData() const { 24 std::vector<s16>& Samples() {
25 return data; 25 return samples;
26 }
27
28 /// Returns the raw audio data for the buffer
29 const std::vector<s16>& GetSamples() const {
30 return samples;
26 } 31 }
27 32
28 /// Returns the buffer tag, this is provided by the game to the audout service 33 /// Returns the buffer tag, this is provided by the game to the audout service
@@ -32,7 +37,7 @@ public:
32 37
33private: 38private:
34 Tag tag; 39 Tag tag;
35 std::vector<u8> data; 40 std::vector<s16> samples;
36}; 41};
37 42
38using BufferPtr = std::shared_ptr<Buffer>; 43using BufferPtr = std::shared_ptr<Buffer>;