summaryrefslogtreecommitdiffstats
path: root/src/audio_core
diff options
context:
space:
mode:
authorDavid Marcec <dmarcecguzman@gmail.com>2020-07-12 14:13:48 +0200
committerDavid Marcec <dmarcecguzman@gmail.com>2020-07-25 04:39:35 +0200
commitd68856ab124adefd0ff52f6c120ecc03aee60365 (patch)
tree5ffeb54569d5598d485521a91bff8d3b89ba96d4 /src/audio_core
parentaudio_core: Apollo Part 1, AudioRenderer refactor (diff)
downloadyuzu-d68856ab124adefd0ff52f6c120ecc03aee60365.tar
yuzu-d68856ab124adefd0ff52f6c120ecc03aee60365.tar.gz
yuzu-d68856ab124adefd0ff52f6c120ecc03aee60365.tar.bz2
yuzu-d68856ab124adefd0ff52f6c120ecc03aee60365.tar.lz
yuzu-d68856ab124adefd0ff52f6c120ecc03aee60365.tar.xz
yuzu-d68856ab124adefd0ff52f6c120ecc03aee60365.tar.zst
yuzu-d68856ab124adefd0ff52f6c120ecc03aee60365.zip
Diffstat (limited to 'src/audio_core')
-rw-r--r--src/audio_core/cubeb_sink.cpp4
-rw-r--r--src/audio_core/stream.cpp6
2 files changed, 4 insertions, 6 deletions
diff --git a/src/audio_core/cubeb_sink.cpp b/src/audio_core/cubeb_sink.cpp
index cbd6c56da..a8315c6f7 100644
--- a/src/audio_core/cubeb_sink.cpp
+++ b/src/audio_core/cubeb_sink.cpp
@@ -203,6 +203,7 @@ long CubebSinkStream::DataCallback(cubeb_stream* stream, void* user_data, const
const std::size_t samples_to_write = num_channels * num_frames;
std::size_t samples_written;
+ /*
if (Settings::values.enable_audio_stretching.GetValue()) {
const std::vector<s16> in{impl->queue.Pop()};
const std::size_t num_in{in.size() / num_channels};
@@ -217,7 +218,8 @@ long CubebSinkStream::DataCallback(cubeb_stream* stream, void* user_data, const
}
} else {
samples_written = impl->queue.Pop(buffer, samples_to_write);
- }
+ }*/
+ samples_written = impl->queue.Pop(buffer, samples_to_write);
if (samples_written >= num_channels) {
std::memcpy(&impl->last_frame[0], buffer + (samples_written - num_channels) * sizeof(s16),
diff --git a/src/audio_core/stream.cpp b/src/audio_core/stream.cpp
index f80ab92e4..c805b9d21 100644
--- a/src/audio_core/stream.cpp
+++ b/src/audio_core/stream.cpp
@@ -103,11 +103,7 @@ void Stream::PlayNextBuffer(std::chrono::nanoseconds ns_late) {
sink_stream.EnqueueSamples(GetNumChannels(), active_buffer->GetSamples());
- const auto time_stretch_delta = Settings::values.enable_audio_stretching.GetValue()
- ? std::chrono::nanoseconds::zero()
- : ns_late;
- const auto future_time = GetBufferReleaseNS(*active_buffer) - time_stretch_delta;
- core_timing.ScheduleEvent(future_time, release_event, {});
+ core_timing.ScheduleEvent(GetBufferReleaseNS(*active_buffer) - ns_late, release_event, {});
}
void Stream::ReleaseActiveBuffer(std::chrono::nanoseconds ns_late) {