diff options
| author | 2018-09-23 22:32:01 +1000 | |
|---|---|---|
| committer | 2018-09-23 22:32:01 +1000 | |
| commit | c461188f516173302b1aa97bbe4ee358d776b8c8 (patch) | |
| tree | 2699c6c0d34f56908e950a65d038af2824cc6b13 /src/audio_core/stream.cpp | |
| parent | Merge pull request #1378 from lioncash/thread (diff) | |
| download | yuzu-c461188f516173302b1aa97bbe4ee358d776b8c8.tar.gz yuzu-c461188f516173302b1aa97bbe4ee358d776b8c8.tar.xz yuzu-c461188f516173302b1aa97bbe4ee358d776b8c8.zip | |
Added audren:u#GetAudioRendererState
Diffstat (limited to 'src/audio_core/stream.cpp')
| -rw-r--r-- | src/audio_core/stream.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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() { | |||
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | void Stream::Stop() { | 51 | void Stream::Stop() { |
| 52 | state = State::Stopped; | ||
| 52 | ASSERT_MSG(false, "Unimplemented"); | 53 | ASSERT_MSG(false, "Unimplemented"); |
| 53 | } | 54 | } |
| 54 | 55 | ||
| 56 | u32 Stream::GetState() const { | ||
| 57 | return static_cast<u32>(state); | ||
| 58 | } | ||
| 59 | |||
| 55 | s64 Stream::GetBufferReleaseCycles(const Buffer& buffer) const { | 60 | s64 Stream::GetBufferReleaseCycles(const Buffer& buffer) const { |
| 56 | const std::size_t num_samples{buffer.GetSamples().size() / GetNumChannels()}; | 61 | const std::size_t num_samples{buffer.GetSamples().size() / GetNumChannels()}; |
| 57 | return CoreTiming::usToCycles((static_cast<u64>(num_samples) * 1000000) / sample_rate); | 62 | return CoreTiming::usToCycles((static_cast<u64>(num_samples) * 1000000) / sample_rate); |