fix(audioout): reject zero sample count and frequency in sceAudioOutOpen
A zero frequency was stored and later used as a divisor when computing the output block duration. Return SCE_AUDIO_OUT_ERROR_INVALID_SIZE and SCE_AUDIO_OUT_ERROR_INVALID_SAMPLE_FREQ instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
f8485ce6a6
commit
7ac1198e74
|
|
@ -273,6 +273,12 @@ int APS5_VABI sceAudioOutOpen(int userId, int type, int index, std::uint32_t len
|
|||
if (!portTypeValid(type)) {
|
||||
return -2144993270;
|
||||
}
|
||||
if (len == 0) {
|
||||
return -2144993274;
|
||||
}
|
||||
if (freq == 0) {
|
||||
return -2144993272;
|
||||
}
|
||||
if (index != 0) {
|
||||
throw std::runtime_error("sceAudioOutOpen: index != 0 not supported");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue