diff options
| author | 2022-07-16 23:48:45 +0100 | |
|---|---|---|
| committer | 2022-07-22 01:11:32 +0100 | |
| commit | 458da8a94877677f086f06cdeecf959ec4283a33 (patch) | |
| tree | 583166d77602ad90a0d552f37de8729ad80fd6c1 /src/audio_core/buffer.h | |
| parent | Merge pull request #8598 from Link4565/recv-dontwait (diff) | |
| download | yuzu-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.h | 44 |
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 | |||
| 11 | namespace AudioCore { | ||
| 12 | |||
| 13 | /** | ||
| 14 | * Represents a buffer of audio samples to be played in an audio stream | ||
| 15 | */ | ||
| 16 | class Buffer { | ||
| 17 | public: | ||
| 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 | |||
| 37 | private: | ||
| 38 | Tag tag; | ||
| 39 | std::vector<s16> samples; | ||
| 40 | }; | ||
| 41 | |||
| 42 | using BufferPtr = std::shared_ptr<Buffer>; | ||
| 43 | |||
| 44 | } // namespace AudioCore | ||