audioout: Do not wait for data within timer. (#3689)

This commit is contained in:
squidbus
2025-10-01 12:20:35 -07:00
committed by GitHub
parent 0e6dea1059
commit 68fca2552f

View File

@@ -301,7 +301,7 @@ static void AudioOutputThread(PortOut* port, const std::stop_token& stop) {
timer.Start();
{
std::unique_lock lock{port->mutex};
if (port->output_cv.wait(lock, stop, [&] { return port->output_ready; })) {
if (port->output_ready) {
port->impl->Output(port->output_buffer);
port->output_ready = false;
}
@@ -413,7 +413,6 @@ s32 PS4_SYSV_ABI sceAudioOutOutput(s32 handle, void* ptr) {
samples_sent = port.buffer_frames * port.format_info.num_channels;
}
}
port.output_cv.notify_one();
return samples_sent;
}