summaryrefslogtreecommitdiffstats
path: root/src/audio_core
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-06-05 01:52:42 +0200
committerLioncash <mathew1800@gmail.com>2019-06-05 02:31:24 +0200
commit42f5fd0ab32b117901d0cae228103811719606ff (patch)
tree66fed7f7c35ba2448006f1393a9b868ed29632d5 /src/audio_core
parentcore/core_timing_utils: Simplify overload set (diff)
downloadyuzu-42f5fd0ab32b117901d0cae228103811719606ff.tar
yuzu-42f5fd0ab32b117901d0cae228103811719606ff.tar.gz
yuzu-42f5fd0ab32b117901d0cae228103811719606ff.tar.bz2
yuzu-42f5fd0ab32b117901d0cae228103811719606ff.tar.lz
yuzu-42f5fd0ab32b117901d0cae228103811719606ff.tar.xz
yuzu-42f5fd0ab32b117901d0cae228103811719606ff.tar.zst
yuzu-42f5fd0ab32b117901d0cae228103811719606ff.zip
Diffstat (limited to '')
-rw-r--r--src/audio_core/stream.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/audio_core/stream.cpp b/src/audio_core/stream.cpp
index 22a3f8c84..11481a776 100644
--- a/src/audio_core/stream.cpp
+++ b/src/audio_core/stream.cpp
@@ -57,7 +57,9 @@ Stream::State Stream::GetState() const {
s64 Stream::GetBufferReleaseCycles(const Buffer& buffer) const {
const std::size_t num_samples{buffer.GetSamples().size() / GetNumChannels()};
- return Core::Timing::usToCycles((static_cast<u64>(num_samples) * 1000000) / sample_rate);
+ const auto us =
+ std::chrono::microseconds((static_cast<u64>(num_samples) * 1000000) / sample_rate);
+ return Core::Timing::usToCycles(us);
}
static void VolumeAdjustSamples(std::vector<s16>& samples) {