diff options
Diffstat (limited to '')
-rw-r--r-- | src/audio_core/audio_renderer.cpp | 4 | ||||
-rw-r--r-- | src/audio_core/audio_renderer.h | 1 | ||||
-rw-r--r-- | src/audio_core/stream.cpp | 5 | ||||
-rw-r--r-- | src/audio_core/stream.h | 3 |
4 files changed, 13 insertions, 0 deletions
diff --git a/src/audio_core/audio_renderer.cpp b/src/audio_core/audio_renderer.cpp index 83b75e61f..521b19ff7 100644 --- a/src/audio_core/audio_renderer.cpp +++ b/src/audio_core/audio_renderer.cpp @@ -79,6 +79,10 @@ u32 AudioRenderer::GetMixBufferCount() const { return worker_params.mix_buffer_count; } +u32 AudioRenderer::GetState() const { + return stream->GetState(); +} + std::vector<u8> AudioRenderer::UpdateAudioRenderer(const std::vector<u8>& input_params) { // Copy UpdateDataHeader struct UpdateDataHeader config{}; diff --git a/src/audio_core/audio_renderer.h b/src/audio_core/audio_renderer.h index 2c4f5ab75..be923ee65 100644 --- a/src/audio_core/audio_renderer.h +++ b/src/audio_core/audio_renderer.h @@ -170,6 +170,7 @@ public: u32 GetSampleRate() const; u32 GetSampleCount() const; u32 GetMixBufferCount() const; + u32 GetState() const; private: class VoiceState; diff --git a/src/audio_core/stream.cpp b/src/audio_core/stream.cpp index 449db2416..ee4aa98af 100644 --- a/src/audio_core/stream.cpp +++ b/src/audio_core/stream.cpp @@ -49,9 +49,14 @@ void Stream::Play() { } void Stream::Stop() { + state = State::Stopped; ASSERT_MSG(false, "Unimplemented"); } +u32 Stream::GetState() const { + return static_cast<u32>(state); +} + s64 Stream::GetBufferReleaseCycles(const Buffer& buffer) const { const std::size_t num_samples{buffer.GetSamples().size() / GetNumChannels()}; return CoreTiming::usToCycles((static_cast<u64>(num_samples) * 1000000) / sample_rate); diff --git a/src/audio_core/stream.h b/src/audio_core/stream.h index 27db1112f..43eca74e1 100644 --- a/src/audio_core/stream.h +++ b/src/audio_core/stream.h @@ -72,6 +72,9 @@ public: /// Gets the number of channels u32 GetNumChannels() const; + /// Get the state + u32 GetState() const; + private: /// Current state of the stream enum class State { |