尝试把44.1kHz的信号转换成96kHz的信号。
把L/M=320/147 分解成 (8/7)(4/3)(10/7)的形式,可以知道截至频率应该等于
π/max(L,M)。
但是具体每个滤波器应该怎么设计呢?
还有我看了下matlab的resample函数的处理方法,不太明白这一段:
% Need to delay output so that downsampling by q hits center tap of filter.
nz = floor(q-mod(Lhalf,q));
z = zeros(1,nz);
h = [z h(:).']; % ensure that h is a row vector.
Lhalf = Lhalf + nz;
% Number of samples removed from beginning of output sequence
% to compensate for delay of linear phase filter:
delay = floor(ceil(Lhalf)/q);
% Need to zero-pad so output length is exactly ceil(Lx*p/q).
nz1 = 0;
while ceil( ((Lx-1)*p+length(h)+nz1 )/q ) - delay < ceil(Lx*p/q)
nz1 = nz1+1;
end
h = [h zeros(1,nz1)];