diff options
Diffstat (limited to 'src/audio_core/sink.h')
| -rw-r--r-- | src/audio_core/sink.h | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/src/audio_core/sink.h b/src/audio_core/sink.h deleted file mode 100644 index c69cb2c74..000000000 --- a/src/audio_core/sink.h +++ /dev/null | |||
| @@ -1,45 +0,0 @@ | |||
| 1 | // Copyright 2016 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | #include <vector> | ||
| 8 | #include "common/common_types.h" | ||
| 9 | |||
| 10 | namespace AudioCore { | ||
| 11 | |||
| 12 | /** | ||
| 13 | * This class is an interface for an audio sink. An audio sink accepts samples in stereo signed | ||
| 14 | * PCM16 format to be output. Sinks *do not* handle resampling and expect the correct sample rate. | ||
| 15 | * They are dumb outputs. | ||
| 16 | */ | ||
| 17 | class Sink { | ||
| 18 | public: | ||
| 19 | virtual ~Sink() = default; | ||
| 20 | |||
| 21 | /// The native rate of this sink. The sink expects to be fed samples that respect this. (Units: | ||
| 22 | /// samples/sec) | ||
| 23 | virtual unsigned int GetNativeSampleRate() const = 0; | ||
| 24 | |||
| 25 | /** | ||
| 26 | * Feed stereo samples to sink. | ||
| 27 | * @param samples Samples in interleaved stereo PCM16 format. | ||
| 28 | * @param sample_count Number of samples. | ||
| 29 | */ | ||
| 30 | virtual void EnqueueSamples(const s16* samples, size_t sample_count) = 0; | ||
| 31 | |||
| 32 | /// Samples enqueued that have not been played yet. | ||
| 33 | virtual std::size_t SamplesInQueue() const = 0; | ||
| 34 | |||
| 35 | /** | ||
| 36 | * Sets the desired output device. | ||
| 37 | * @param device_id ID of the desired device. | ||
| 38 | */ | ||
| 39 | virtual void SetDevice(int device_id) = 0; | ||
| 40 | |||
| 41 | /// Returns the list of available devices. | ||
| 42 | virtual std::vector<std::string> GetDeviceList() const = 0; | ||
| 43 | }; | ||
| 44 | |||
| 45 | } // namespace | ||