Simulink 无法从输出端口 1 传播可变大小模式

Simulink cannot propagate the variable-size mode from the output port 1

我创建了以下模型:

它接受音频输入并通过降噪算法进行处理,然后将声音输出到扬声器。在没有 ASLA Audio Capture 的情况下取消附加并且仅使用多媒体文件(没有开关)时它工作正常,但是一旦我按照图像所示进行设置,我就会收到以下错误:

Simulink cannot propagate the variable-size mode from the output port 1 of cryreg_v2/Short-Time FFT/x to the input port 1 of 'cryreg_v2/Short-Time FFT/Rebuffer. This input port expects a fixed-size mode. The variable-size mode originates from cryreg_v2/Manual Switch. Examine the configurations of cryreg_v2/Short-Time FFT/Rebuffer for one of the following scenarios: 1) the block does not support variable-size signals; 2) the block supports variable-size signals but needs to be configured for them.

我目前的疑虑是 Rebuffer 不接受麦克风输入(因为它不一致且不固定),所以我需要从 Rebuffer 接收的麦克风创建某种间隔(我不确定如何做)。

我如何真正纠正我的错误,我的怀疑是否正确?

缓冲区块不支持可变大小的输入,这是错误的原因。当您断开音频捕获块时,您的输入不是可变大小,这就是它工作正常的原因。您可以通过删除多媒体文件块和开关并仅使用音频捕获来验证这一点。

您应该通过避免在手动开关的输出端创建可变大小信号来解决此问题。可变大小信号的产生是因为手动开关的输入大小不同。为避免大小可变,您可以将两个源块的输出大小设置为相同,或者通过在其输入之一的手动切换块之前引入一个缓冲块来使大小相同。