我很难解决一个Matlab问题。我想读取一个wav文件,重新排列数据,使频率翻两番并播放文件。这是我的第一次尝试,我做的是正确的吗?任何帮助将不胜感激。
hfile = 'one.wav';
wavwrite(y, Fs, hfile)
clear y Fs
[y, Fs, nbits, readinfo] = wavread(hfile);
sound(y, Fs); % Play the sound & wait until it finishes
duration = numel(y) / Fs; % Calculate the duration
pause(duration + 2) % Wait that much + 2 seconds
FsQ=Fs*4;
sound(y,FsQ,nbits)