Set the maximum number of audio channels to 24 The number of audio channels can be configured in SDP, and can thus be set to arbitrary values. However, the audio code has limitations that prevent a high number of channels from working well in practice. Bug: chromium:1265806 Change-Id: I6f6c3f68a3791bb189a614eece6bd0ed7874f252 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237807 Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Ivo Creusen <ivoc@webrtc.org> Cr-Commit-Position: refs/heads/main@{#35359}
diff --git a/api/audio_codecs/audio_decoder.h b/api/audio_codecs/audio_decoder.h index 51d20c4..336e384 100644 --- a/api/audio_codecs/audio_decoder.h +++ b/api/audio_codecs/audio_decoder.h
@@ -170,6 +170,9 @@ // during the lifetime of the decoder. virtual size_t Channels() const = 0; + // The maximum number of audio channels supported by WebRTC decoders. + static constexpr int kMaxNumberOfChannels = 24; + protected: static SpeechType ConvertSpeechType(int16_t type);