mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-04-05 07:15:34 -04:00
spa: aec: Add some channel config validation
This is checked in AudioProcessing, but will fail at processing time rather than in initialisation.
This commit is contained in:
parent
edb074f438
commit
36740e0100
1 changed files with 5 additions and 0 deletions
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue