diff options
| author | 2018-09-12 18:07:16 +0100 | |
|---|---|---|
| committer | 2018-09-12 18:09:14 +0100 | |
| commit | 957ddab6796cb6f644c60993c3035d8bd9c0a398 (patch) | |
| tree | 17c3d0a96f47959a9c26d4f202003e5c2858fde3 /src/audio_core/time_stretch.cpp | |
| parent | cubeb_sink: Downsample arbitrary number of channels (diff) | |
| download | yuzu-957ddab6796cb6f644c60993c3035d8bd9c0a398.tar.gz yuzu-957ddab6796cb6f644c60993c3035d8bd9c0a398.tar.xz yuzu-957ddab6796cb6f644c60993c3035d8bd9c0a398.zip | |
audio_core: Flush stream when not playing anything
Diffstat (limited to 'src/audio_core/time_stretch.cpp')
| -rw-r--r-- | src/audio_core/time_stretch.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/audio_core/time_stretch.cpp b/src/audio_core/time_stretch.cpp index d2e3391c1..da094c46b 100644 --- a/src/audio_core/time_stretch.cpp +++ b/src/audio_core/time_stretch.cpp | |||
| @@ -22,6 +22,10 @@ void TimeStretcher::Clear() { | |||
| 22 | m_sound_touch.clear(); | 22 | m_sound_touch.clear(); |
| 23 | } | 23 | } |
| 24 | 24 | ||
| 25 | void TimeStretcher::Flush() { | ||
| 26 | m_sound_touch.flush(); | ||
| 27 | } | ||
| 28 | |||
| 25 | size_t TimeStretcher::Process(const s16* in, size_t num_in, s16* out, size_t num_out) { | 29 | size_t TimeStretcher::Process(const s16* in, size_t num_in, s16* out, size_t num_out) { |
| 26 | const double time_delta = static_cast<double>(num_out) / m_sample_rate; // seconds | 30 | const double time_delta = static_cast<double>(num_out) / m_sample_rate; // seconds |
| 27 | 31 | ||