mirror of
https://github.com/RPCSX/rpcsx.git
synced 2025-12-06 07:12:14 +01:00
cellAudio: avoid buffers count overflow
Some checks failed
Formatting check / formatting-check (push) Has been cancelled
Build RPCS3 Qt UI (Legacy) / RPCS3 Qt UI (Legacy) for Linux ${{ matrix.os }} ${{ matrix.compiler }} (.ci/build-linux-aarch64.sh, clang, ubuntu-24.04-arm) (push) Has been cancelled
Build RPCS3 Qt UI (Legacy) / RPCS3 Qt UI (Legacy) for Linux ${{ matrix.os }} ${{ matrix.compiler }} (.ci/build-linux.sh, clang, ubuntu-24.04) (push) Has been cancelled
Build RPCS3 Qt UI (Legacy) / RPCS3 Qt UI (Legacy) for Linux ${{ matrix.os }} ${{ matrix.compiler }} (.ci/build-linux.sh, gcc, ubuntu-24.04) (push) Has been cancelled
Build RPCS3 Qt UI (Legacy) / RPCS3 Qt UI (Legacy) for Windows (push) Has been cancelled
Build RPCSX / build-linux (push) Has been cancelled
Build RPCSX / build-android (arm64-v8a, armv8-a) (push) Has been cancelled
Build RPCSX / build-android (arm64-v8a, armv8.1-a) (push) Has been cancelled
Build RPCSX / build-android (arm64-v8a, armv8.2-a) (push) Has been cancelled
Build RPCSX / build-android (arm64-v8a, armv8.4-a) (push) Has been cancelled
Build RPCSX / build-android (arm64-v8a, armv8.5-a) (push) Has been cancelled
Build RPCSX / build-android (arm64-v8a, armv9-a) (push) Has been cancelled
Build RPCSX / build-android (arm64-v8a, armv9.1-a) (push) Has been cancelled
Build RPCSX / build-android (x86_64, x86-64) (push) Has been cancelled
Some checks failed
Formatting check / formatting-check (push) Has been cancelled
Build RPCS3 Qt UI (Legacy) / RPCS3 Qt UI (Legacy) for Linux ${{ matrix.os }} ${{ matrix.compiler }} (.ci/build-linux-aarch64.sh, clang, ubuntu-24.04-arm) (push) Has been cancelled
Build RPCS3 Qt UI (Legacy) / RPCS3 Qt UI (Legacy) for Linux ${{ matrix.os }} ${{ matrix.compiler }} (.ci/build-linux.sh, clang, ubuntu-24.04) (push) Has been cancelled
Build RPCS3 Qt UI (Legacy) / RPCS3 Qt UI (Legacy) for Linux ${{ matrix.os }} ${{ matrix.compiler }} (.ci/build-linux.sh, gcc, ubuntu-24.04) (push) Has been cancelled
Build RPCS3 Qt UI (Legacy) / RPCS3 Qt UI (Legacy) for Windows (push) Has been cancelled
Build RPCSX / build-linux (push) Has been cancelled
Build RPCSX / build-android (arm64-v8a, armv8-a) (push) Has been cancelled
Build RPCSX / build-android (arm64-v8a, armv8.1-a) (push) Has been cancelled
Build RPCSX / build-android (arm64-v8a, armv8.2-a) (push) Has been cancelled
Build RPCSX / build-android (arm64-v8a, armv8.4-a) (push) Has been cancelled
Build RPCSX / build-android (arm64-v8a, armv8.5-a) (push) Has been cancelled
Build RPCSX / build-android (arm64-v8a, armv9-a) (push) Has been cancelled
Build RPCSX / build-android (arm64-v8a, armv9.1-a) (push) Has been cancelled
Build RPCSX / build-android (x86_64, x86-64) (push) Has been cancelled
Limit desired buffer count, add logging
This commit is contained in:
parent
b076d680bd
commit
089c388019
|
|
@ -108,6 +108,14 @@ void cell_audio_config::reset(bool backend_changed)
|
|||
maximum_block_period = (6 * audio_block_period) / 5;
|
||||
|
||||
desired_full_buffers = buffering_enabled ? static_cast<u32>(desired_buffer_duration / audio_block_period) + 3 : 2;
|
||||
|
||||
if (desired_full_buffers > MAX_AUDIO_BUFFERS + EXTRA_AUDIO_BUFFERS)
|
||||
{
|
||||
cellAudio.error("%s: desired_full_buffers truncation: value = %d, frame size = %f, output channel count = %d, input channel count = %d, desired buffer duration = %d",
|
||||
backend->GetName(), desired_full_buffers, cb_frame_len, ch_cnt, audio_channels, desired_buffer_duration);
|
||||
desired_full_buffers = MAX_AUDIO_BUFFERS - EXTRA_AUDIO_BUFFERS;
|
||||
}
|
||||
|
||||
num_allocated_buffers = desired_full_buffers + EXTRA_AUDIO_BUFFERS;
|
||||
|
||||
fully_untouched_timeout = static_cast<u64>(audio_block_period) * 2;
|
||||
|
|
|
|||
Loading…
Reference in a new issue