Allow 0 stereo count

This commit is contained in:
Kelebek1 2023-11-03 11:16:38 -04:00 committed by Liam
parent d19048ab59
commit a32519ce34
2 changed files with 3 additions and 3 deletions

View file

@ -24,7 +24,7 @@ bool IsValidSampleRate(u32 sample_rate) {
}
bool IsValidStreamCount(u32 channel_count, u32 total_stream_count, u32 stereo_stream_count) {
return total_stream_count > 0 && stereo_stream_count > 0 &&
return total_stream_count > 0 && static_cast<s32>(stereo_stream_count) >= 0 &&
stereo_stream_count <= total_stream_count &&
total_stream_count + stereo_stream_count <= channel_count;
}