2011-01-24 30 views

回答

2

快速谷歌搜索出現了library,可能可以做到這一點。

5

這是the format。您需要打開文件,找到標題的大小,然後刪除所需數量的樣本。您可以在標題中找到每個樣本的位數。採樣率爲44100Hz的16位WAV文件將要求您刪除(16/8) * 44100 * 0.5 = 44100 bytes

1

如果需要以編程方式執行此操作,則需要wav文件解析器。一般算法將是

A) open the file 
b) find the fmt chunk 
c) parse to calculate X = bytes per sample * samples per second. 
d) find the data chunk 
e) remove the first X bytes 
f) adjust the size of the data chunk 
g) adjust the size of the initial RIFF chunk. 
h) write the new file.