www.gusucode.com > dsp 案例源码程序 matlab代码 > dsp/DoubleTheSampleRateUsingFIRIntepolatorExample.m
%% Double the Sample Rate Using FIR Intepolator % This example shows how to double the sampling rate of an audio signal % from 22.05 kHz to 44.1 kHz, and play the audio. hmfr = dsp.AudioFileReader('OutputDataType',... 'single'); hap = audioDeviceWriter(44100); hfirint = dsp.FIRInterpolator(2, ... firpm(30, [0 0.45 0.55 1], [1 1 0 0])); while ~isDone(hmfr) frame = hmfr(); y = hfirint(frame); hap(y); end pause(1); release(hmfr); release(hap);