summaryrefslogtreecommitdiff
path: root/src/audio_core/stream.cpp
diff options
context:
space:
mode:
authorGravatar Lioncash2020-07-27 19:00:41 -0400
committerGravatar Lioncash2020-07-27 21:21:01 -0400
commita7af349daee85237384dba07533c9a407cf15592 (patch)
treee337a6e823960cc6b2a7d05c7e33e80cc51a4581 /src/audio_core/stream.cpp
parentMerge pull request #4419 from lioncash/initializer (diff)
downloadyuzu-a7af349daee85237384dba07533c9a407cf15592.tar.gz
yuzu-a7af349daee85237384dba07533c9a407cf15592.tar.xz
yuzu-a7af349daee85237384dba07533c9a407cf15592.zip
core_timing: Make use of uintptr_t to represent user_data
Makes the interface future-proofed for supporting other platforms in the event we ever support platforms with differing pointer sizes. This way, we have a type in place that is always guaranteed to be able to represent a pointer exactly.
Diffstat (limited to 'src/audio_core/stream.cpp')
-rw-r--r--src/audio_core/stream.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/audio_core/stream.cpp b/src/audio_core/stream.cpp
index f80ab92e4..7be5d5087 100644
--- a/src/audio_core/stream.cpp
+++ b/src/audio_core/stream.cpp
@@ -36,9 +36,10 @@ Stream::Stream(Core::Timing::CoreTiming& core_timing, u32 sample_rate, Format fo
36 ReleaseCallback&& release_callback, SinkStream& sink_stream, std::string&& name_) 36 ReleaseCallback&& release_callback, SinkStream& sink_stream, std::string&& name_)
37 : sample_rate{sample_rate}, format{format}, release_callback{std::move(release_callback)}, 37 : sample_rate{sample_rate}, format{format}, release_callback{std::move(release_callback)},
38 sink_stream{sink_stream}, core_timing{core_timing}, name{std::move(name_)} { 38 sink_stream{sink_stream}, core_timing{core_timing}, name{std::move(name_)} {
39 39 release_event =
40 release_event = Core::Timing::CreateEvent( 40 Core::Timing::CreateEvent(name, [this](std::uintptr_t, std::chrono::nanoseconds ns_late) {
41 name, [this](u64, std::chrono::nanoseconds ns_late) { ReleaseActiveBuffer(ns_late); }); 41 ReleaseActiveBuffer(ns_late);
42 });
42} 43}
43 44
44void Stream::Play() { 45void Stream::Play() {