mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-27 04:25:12 +00:00
Return the number of samples enqueued in AudioOut (#3324)
This commit is contained in:
parent
d62d65af62
commit
446426224e
@ -398,6 +398,7 @@ s32 PS4_SYSV_ABI sceAudioOutOutput(s32 handle, void* ptr) {
|
||||
return ORBIS_AUDIO_OUT_ERROR_INVALID_PORT;
|
||||
}
|
||||
|
||||
auto samples_sent = 0;
|
||||
auto& port = ports_out.at(handle - 1);
|
||||
{
|
||||
std::unique_lock lock{port.mutex};
|
||||
@ -409,10 +410,11 @@ s32 PS4_SYSV_ABI sceAudioOutOutput(s32 handle, void* ptr) {
|
||||
std::memcpy(port.output_buffer, ptr, port.BufferSize());
|
||||
port.output_ready = true;
|
||||
port.last_output_time = Kernel::sceKernelGetProcessTime();
|
||||
samples_sent = port.buffer_frames * port.format_info.num_channels;
|
||||
}
|
||||
}
|
||||
port.output_cv.notify_one();
|
||||
return ORBIS_OK;
|
||||
return samples_sent;
|
||||
}
|
||||
|
||||
int PS4_SYSV_ABI sceAudioOutOutputs(OrbisAudioOutOutputParam* param, u32 num) {
|
||||
|
Loading…
Reference in New Issue
Block a user