diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/audio_core/adsp/apps/opus/opus_decoder.cpp | 4 | ||||
| -rw-r--r-- | src/audio_core/opus/decoder_manager.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/audio_core/adsp/apps/opus/opus_decoder.cpp b/src/audio_core/adsp/apps/opus/opus_decoder.cpp index 2084de128..75f0fb9ad 100644 --- a/src/audio_core/adsp/apps/opus/opus_decoder.cpp +++ b/src/audio_core/adsp/apps/opus/opus_decoder.cpp | |||
| @@ -30,9 +30,9 @@ bool IsValidMultiStreamChannelCount(u32 channel_count) { | |||
| 30 | return channel_count <= OpusStreamCountMax; | 30 | return channel_count <= OpusStreamCountMax; |
| 31 | } | 31 | } |
| 32 | 32 | ||
| 33 | bool IsValidMultiStreamStreamCounts(s32 total_stream_count, s32 sterero_stream_count) { | 33 | bool IsValidMultiStreamStreamCounts(s32 total_stream_count, s32 stereo_stream_count) { |
| 34 | return IsValidMultiStreamChannelCount(total_stream_count) && total_stream_count > 0 && | 34 | return IsValidMultiStreamChannelCount(total_stream_count) && total_stream_count > 0 && |
| 35 | sterero_stream_count > 0 && sterero_stream_count <= total_stream_count; | 35 | stereo_stream_count >= 0 && stereo_stream_count <= total_stream_count; |
| 36 | } | 36 | } |
| 37 | } // namespace | 37 | } // namespace |
| 38 | 38 | ||
diff --git a/src/audio_core/opus/decoder_manager.cpp b/src/audio_core/opus/decoder_manager.cpp index 4a5382973..fdeccdf50 100644 --- a/src/audio_core/opus/decoder_manager.cpp +++ b/src/audio_core/opus/decoder_manager.cpp | |||
| @@ -24,7 +24,7 @@ bool IsValidSampleRate(u32 sample_rate) { | |||
| 24 | } | 24 | } |
| 25 | 25 | ||
| 26 | bool IsValidStreamCount(u32 channel_count, u32 total_stream_count, u32 stereo_stream_count) { | 26 | bool IsValidStreamCount(u32 channel_count, u32 total_stream_count, u32 stereo_stream_count) { |
| 27 | return total_stream_count > 0 && stereo_stream_count > 0 && | 27 | return total_stream_count > 0 && static_cast<s32>(stereo_stream_count) >= 0 && |
| 28 | stereo_stream_count <= total_stream_count && | 28 | stereo_stream_count <= total_stream_count && |
| 29 | total_stream_count + stereo_stream_count <= channel_count; | 29 | total_stream_count + stereo_stream_count <= channel_count; |
| 30 | } | 30 | } |