summaryrefslogtreecommitdiffstats
path: root/src/audio_core/stream.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/audio_core/stream.cpp')
-rw-r--r--src/audio_core/stream.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/audio_core/stream.cpp b/src/audio_core/stream.cpp
index 8ab5649df..d89ff30b7 100644
--- a/src/audio_core/stream.cpp
+++ b/src/audio_core/stream.cpp
@@ -32,12 +32,12 @@ u32 Stream::GetNumChannels() const {
return {};
}
-Stream::Stream(u32 sample_rate, Format format, ReleaseCallback&& release_callback,
- SinkStream& sink_stream, std::string&& name_)
+Stream::Stream(Core::Timing::CoreTiming& core_timing, u32 sample_rate, Format format,
+ ReleaseCallback&& release_callback, SinkStream& sink_stream, std::string&& name_)
: sample_rate{sample_rate}, format{format}, release_callback{std::move(release_callback)},
- sink_stream{sink_stream}, name{std::move(name_)} {
+ sink_stream{sink_stream}, core_timing{core_timing}, name{std::move(name_)} {
- release_event = Core::Timing::RegisterEvent(
+ release_event = core_timing.RegisterEvent(
name, [this](u64 userdata, int cycles_late) { ReleaseActiveBuffer(); });
}
@@ -99,8 +99,7 @@ void Stream::PlayNextBuffer() {
sink_stream.EnqueueSamples(GetNumChannels(), active_buffer->GetSamples());
- Core::Timing::ScheduleEventThreadsafe(GetBufferReleaseCycles(*active_buffer), release_event,
- {});
+ core_timing.ScheduleEventThreadsafe(GetBufferReleaseCycles(*active_buffer), release_event, {});
}
void Stream::ReleaseActiveBuffer() {