mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-09 13:19:00 +00:00
audioout: Do not wait for data within timer. (#3689)
This commit is contained in:
@@ -301,7 +301,7 @@ static void AudioOutputThread(PortOut* port, const std::stop_token& stop) {
|
|||||||
timer.Start();
|
timer.Start();
|
||||||
{
|
{
|
||||||
std::unique_lock lock{port->mutex};
|
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->impl->Output(port->output_buffer);
|
||||||
port->output_ready = false;
|
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;
|
samples_sent = port.buffer_frames * port.format_info.num_channels;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
port.output_cv.notify_one();
|
|
||||||
return samples_sent;
|
return samples_sent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user