summaryrefslogtreecommitdiffstats
path: root/src/audio_core/stream.cpp
diff options
context:
space:
mode:
authorDavid Marcec <dmarcecguzman@gmail.com>2018-09-23 14:32:01 +0200
committerDavid Marcec <dmarcecguzman@gmail.com>2018-09-23 14:32:01 +0200
commitc461188f516173302b1aa97bbe4ee358d776b8c8 (patch)
tree2699c6c0d34f56908e950a65d038af2824cc6b13 /src/audio_core/stream.cpp
parentMerge pull request #1378 from lioncash/thread (diff)
downloadyuzu-c461188f516173302b1aa97bbe4ee358d776b8c8.tar
yuzu-c461188f516173302b1aa97bbe4ee358d776b8c8.tar.gz
yuzu-c461188f516173302b1aa97bbe4ee358d776b8c8.tar.bz2
yuzu-c461188f516173302b1aa97bbe4ee358d776b8c8.tar.lz
yuzu-c461188f516173302b1aa97bbe4ee358d776b8c8.tar.xz
yuzu-c461188f516173302b1aa97bbe4ee358d776b8c8.tar.zst
yuzu-c461188f516173302b1aa97bbe4ee358d776b8c8.zip
Diffstat (limited to 'src/audio_core/stream.cpp')
-rw-r--r--src/audio_core/stream.cpp5
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() {
}
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);