summaryrefslogtreecommitdiffstats
path: root/src/audio_core/buffer.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-08-04 06:03:12 +0200
committerbunnei <bunneidev@gmail.com>2018-08-05 00:22:58 +0200
commit1dee8ceda1e5ecd5ebaee464b1450f323e82305f (patch)
tree97275d9a1c055d067053831f50a09ab9628ebf8e /src/audio_core/buffer.h
parentaudio_core: Port codec code from Citra for ADPCM decoding. (diff)
downloadyuzu-1dee8ceda1e5ecd5ebaee464b1450f323e82305f.tar
yuzu-1dee8ceda1e5ecd5ebaee464b1450f323e82305f.tar.gz
yuzu-1dee8ceda1e5ecd5ebaee464b1450f323e82305f.tar.bz2
yuzu-1dee8ceda1e5ecd5ebaee464b1450f323e82305f.tar.lz
yuzu-1dee8ceda1e5ecd5ebaee464b1450f323e82305f.tar.xz
yuzu-1dee8ceda1e5ecd5ebaee464b1450f323e82305f.tar.zst
yuzu-1dee8ceda1e5ecd5ebaee464b1450f323e82305f.zip
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 {
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>;