【发布时间】:2017-07-13 13:08:33
【问题描述】:
我在编码wav文件中看到了一个示例,这是示例
对这部分代码有疑问:
/* 对单音进行编码 */
float t, tincr;
t = 0;
tincr = 2 * M_PI * 440.0 / c->sample_rate;
for(i=0; i<2000; i++) {
for(j=0;j<frame_size;j++) {
samples[2*j] = (int)(sin(t) * 10000);
samples[2*j+1] = samples[2*j];
t += tincr;
}
/* encode the samples */
这里的 2000 是多少,根据我们必须给出的值,因为我的编码不正确,任何建议都会有所帮助
【问题讨论】:
标签: objective-c c encoding ffmpeg