【发布时间】:2009-10-25 11:05:12
【问题描述】:
我正在将两个文件中的原始音频字节写入一个新的 wav 文件以组合这两个文件。创建的结果文件包含两个音频剪辑的内容,但文件中也有很多噪音。
谁能给我一个很好的例子来展示如何将原始音频字节写入文件?这是我遵循的基本逻辑
SInt32 leftSample1 = ReadSampleFromFile1(music_iter1);
leftSample1 = (SInt32)((float) leftSample1 * 0.7071); //to avoid clipping
SInt32 leftStereoSample2 = ReadLeftSample(music_iter2);
leftStereoSample2 += leftSample1;
if (leftStereoSample2 > 32767)
leftStereoSample2 = 32767;
else if (leftStereoSample2 < -32768
leftStereoSample2 = -32768;
// write leftStereoSample2 to the file
//do the same as left sample to right sample also
++music_iter2;
++music_iter1;
谢谢。
【问题讨论】:
-
我已经录制了一个 .wav 文件,我想从那个 .wav 文件中去除背景噪音。我该怎么做?请帮助我..挣扎了一周。
-
我不想去除背景噪音。我可以在 iPhone 中禁用噪音消除吗?
标签: iphone core-audio