mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-12 09:22:56 -05:00
Rework audio output, connecting AudioOut into coretiming to fix desync during heavy loads.
This commit is contained in:
@ -106,9 +106,6 @@ void AudioRenderer::Start(AudioRenderer_Mailbox* mailbox_) {
|
||||
|
||||
mailbox = mailbox_;
|
||||
thread = std::thread(&AudioRenderer::ThreadFunc, this);
|
||||
for (auto& stream : streams) {
|
||||
stream->Start();
|
||||
}
|
||||
running = true;
|
||||
}
|
||||
|
||||
@ -130,6 +127,7 @@ void AudioRenderer::CreateSinkStreams() {
|
||||
std::string name{fmt::format("ADSP_RenderStream-{}", i)};
|
||||
streams[i] =
|
||||
sink.AcquireSinkStream(system, channels, name, ::AudioCore::Sink::StreamType::Render);
|
||||
streams[i]->SetRingSize(4);
|
||||
}
|
||||
}
|
||||
|
||||
@ -198,11 +196,6 @@ void AudioRenderer::ThreadFunc() {
|
||||
command_list_processor.Process(index) - start_time;
|
||||
}
|
||||
|
||||
if (index == 0) {
|
||||
auto stream{command_list_processor.GetOutputSinkStream()};
|
||||
system.AudioCore().SetStreamQueue(stream->GetQueueSize());
|
||||
}
|
||||
|
||||
const auto end_time{system.CoreTiming().GetClockTicks()};
|
||||
|
||||
command_buffer.remaining_command_count =
|
||||
|
Reference in New Issue
Block a user