diff options
author | bunnei <bunneidev@gmail.com> | 2018-08-05 23:35:22 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-05 23:35:22 -0400 |
commit | bb21c2198a35fe714d5d95c49b93a8848933e9b4 (patch) | |
tree | 2a3da0f4203422bce7f999b9e1597e51ea875bf2 /src/audio_core/buffer.h | |
parent | c8e5c740924896810897b3f9090858f307fd313a (diff) | |
parent | b46df98e935552ea48ed86360e8c8b34b294982d (diff) |
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.h | 13 |
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 { public: using Tag = u64; - Buffer(Tag tag, std::vector<u8>&& data) : tag{tag}, data{std::move(data)} {} + Buffer(Tag tag, std::vector<s16>&& samples) : tag{tag}, samples{std::move(samples)} {} /// Returns the raw audio data for the buffer - const std::vector<u8>& GetData() const { - return data; + std::vector<s16>& Samples() { + return samples; + } + + /// Returns the raw audio data for the buffer + const std::vector<s16>& GetSamples() const { + return samples; } /// Returns the buffer tag, this is provided by the game to the audout service @@ -32,7 +37,7 @@ public: private: Tag tag; - std::vector<u8> data; + std::vector<s16> samples; }; using BufferPtr = std::shared_ptr<Buffer>; |