Merge pull request #9969 from bylaws/master

Audio synchronisation improvements
This commit is contained in:
bunnei 2023-04-01 14:34:59 -07:00 committed by GitHub
commit 6775a6ee02
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 55 additions and 79 deletions

View file

@ -121,8 +121,7 @@ u64 DeviceSession::GetPlayedSampleCount() const {
}
std::optional<std::chrono::nanoseconds> DeviceSession::ThreadFunc() {
// Add 5ms of samples at a 48K sample rate.
played_sample_count += 48'000 * INCREMENT_TIME / 1s;
played_sample_count = stream->GetExpectedPlayedSampleCount();
if (type == Sink::StreamType::Out) {
system.AudioCore().GetAudioManager().SetEvent(Event::Type::AudioOutManager, true);
} else {