diff options
| author | 2023-04-01 14:34:59 -0700 | |
|---|---|---|
| committer | 2023-04-01 14:34:59 -0700 | |
| commit | 6775a6ee0260d9d7bedfa3922e32301e452f833f (patch) | |
| tree | 88ffbcf64f99feeefa4ce5f3b12131de2bfe4c11 /src/audio_core/device | |
| parent | Merge pull request #10006 from german77/profile_select (diff) | |
| parent | audio_core: No longer stall when sink queue is full (diff) | |
| download | yuzu-6775a6ee0260d9d7bedfa3922e32301e452f833f.tar.gz yuzu-6775a6ee0260d9d7bedfa3922e32301e452f833f.tar.xz yuzu-6775a6ee0260d9d7bedfa3922e32301e452f833f.zip | |
Merge pull request #9969 from bylaws/master
Audio synchronisation improvements
Diffstat (limited to 'src/audio_core/device')
| -rw-r--r-- | src/audio_core/device/device_session.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/audio_core/device/device_session.cpp b/src/audio_core/device/device_session.cpp index 043ce8875..b5c0ef0e6 100644 --- a/src/audio_core/device/device_session.cpp +++ b/src/audio_core/device/device_session.cpp | |||
| @@ -121,8 +121,7 @@ u64 DeviceSession::GetPlayedSampleCount() const { | |||
| 121 | } | 121 | } |
| 122 | 122 | ||
| 123 | std::optional<std::chrono::nanoseconds> DeviceSession::ThreadFunc() { | 123 | std::optional<std::chrono::nanoseconds> DeviceSession::ThreadFunc() { |
| 124 | // Add 5ms of samples at a 48K sample rate. | 124 | played_sample_count = stream->GetExpectedPlayedSampleCount(); |
| 125 | played_sample_count += 48'000 * INCREMENT_TIME / 1s; | ||
| 126 | if (type == Sink::StreamType::Out) { | 125 | if (type == Sink::StreamType::Out) { |
| 127 | system.AudioCore().GetAudioManager().SetEvent(Event::Type::AudioOutManager, true); | 126 | system.AudioCore().GetAudioManager().SetEvent(Event::Type::AudioOutManager, true); |
| 128 | } else { | 127 | } else { |