Merge branch 'minor-aec-fixups' into 'master'

spa: aec: Add some channel config validation

See merge request pipewire/pipewire!2754
This commit is contained in:
Arun Raghavan 2026-03-17 12:06:30 +00:00
commit fac3a72bd5

View file

@ -39,7 +39,7 @@ struct impl_data {
std::unique_ptr<float *[]> play_buffer, rec_buffer, out_buffer; std::unique_ptr<float *[]> play_buffer, rec_buffer, out_buffer;
}; };
SPA_LOG_TOPIC_DEFINE_STATIC(log_topic, "spa.eac.webrtc"); SPA_LOG_TOPIC_DEFINE_STATIC(log_topic, "spa.aec.webrtc");
#undef SPA_LOG_TOPIC_DEFAULT #undef SPA_LOG_TOPIC_DEFAULT
#define SPA_LOG_TOPIC_DEFAULT &log_topic #define SPA_LOG_TOPIC_DEFAULT &log_topic
@ -221,6 +221,11 @@ static int webrtc_init2(void *object, const struct spa_dict *args,
}}; }};
#endif #endif
if (out_info->channels != 1 && rec_info->channels != out_info->channels) {
spa_log_error(impl->log, "Source channels must be equal to capture channels or 1");
return -EINVAL;
}
#if defined(HAVE_WEBRTC) #if defined(HAVE_WEBRTC)
auto apm = std::unique_ptr<webrtc::AudioProcessing>(webrtc::AudioProcessing::Create(config)); auto apm = std::unique_ptr<webrtc::AudioProcessing>(webrtc::AudioProcessing::Create(config));
#elif defined(HAVE_WEBRTC1) #elif defined(HAVE_WEBRTC1)