【发布时间】:2015-09-09 03:03:30
【问题描述】:
我需要在 Wav 文件中分离数据和 Subchunk2Size。
我正在尝试为我的 MATLAB 代码的这一部分使用现成的代码,但我不明白这里发生了什么。
这是我分析 Wav 文件的来源。 enter link description here
在这部分中,我了解到 40bytes 标头存储在header 中。
%first 40 bytes make wav header,store the header
header=fread(fid,40);
Subchunk2Size 是我的问题。它是 4 个字节,但这里我们正在阅读 1。当我使用 4 时,我得到了错误的结果。
%41st byte to 43rd byte,length of wav data samples
data_size=fread(fid,1);
这部分我也看不懂。
%copy the 16 bit wav data samples starting from 44th byte
[dta,count]=fread(fid,inf,'uint16');
【问题讨论】:
标签: matlab audio wav file-format