summaryrefslogtreecommitdiff
path: root/src/audio_core/buffer.h
diff options
context:
space:
mode:
authorGravatar Kelebek12022-07-16 23:48:45 +0100
committerGravatar Kelebek12022-07-22 01:11:32 +0100
commit458da8a94877677f086f06cdeecf959ec4283a33 (patch)
tree583166d77602ad90a0d552f37de8729ad80fd6c1 /src/audio_core/buffer.h
parentMerge pull request #8598 from Link4565/recv-dontwait (diff)
downloadyuzu-458da8a94877677f086f06cdeecf959ec4283a33.tar.gz
yuzu-458da8a94877677f086f06cdeecf959ec4283a33.tar.xz
yuzu-458da8a94877677f086f06cdeecf959ec4283a33.zip
Project Andio
Diffstat (limited to 'src/audio_core/buffer.h')
-rw-r--r--src/audio_core/buffer.h44
1 files changed, 0 insertions, 44 deletions
diff --git a/src/audio_core/buffer.h b/src/audio_core/buffer.h
deleted file mode 100644
index ac001629f..000000000
--- a/src/audio_core/buffer.h
+++ /dev/null
@@ -1,44 +0,0 @@
1// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#pragma once
5
6#include <memory>
7#include <vector>
8
9#include "common/common_types.h"
10
11namespace AudioCore {
12
13/**
14 * Represents a buffer of audio samples to be played in an audio stream
15 */
16class Buffer {
17public:
18 using Tag = u64;
19
20 Buffer(Tag tag_, std::vector<s16>&& samples_) : tag{tag_}, samples{std::move(samples_)} {}
21
22 /// Returns the raw audio data for the buffer
23 std::vector<s16>& GetSamples() {
24 return samples;
25 }
26
27 /// Returns the raw audio data for the buffer
28 const std::vector<s16>& GetSamples() const {
29 return samples;
30 }
31
32 /// Returns the buffer tag, this is provided by the game to the audout service
33 Tag GetTag() const {
34 return tag;
35 }
36
37private:
38 Tag tag;
39 std::vector<s16> samples;
40};
41
42using BufferPtr = std::shared_ptr<Buffer>;
43
44} // namespace AudioCore