我在android上使用v1.10低级api。我有一个问题,即保存文件太慢了。 当我保存持续时间为20秒的mp3 / wav文件时,花费20s +。
这是我的代码,请帮我找到问题:
//the file size is always 0 when use FMOD_OUTPUTTYPE_WAVWRITER_NRT and while{update;}
result = system->setOutput(FMOD_OUTPUTTYPE_WAVWRITER);
ERRCHECK(result);
result = system->init(16, FMOD_INIT_NORMAL, (void *) outpath);
ERRCHECK(result);
result = system->getMasterChannelGroup(&mastergroup);
ERRCHECK(result);
result = system->createSound(inputpath, FMOD_DEFAULT, NULL, &sound);
ERRCHECK(result);
result = system->playSound(sound, 0, false, &channel);
ERRCHECK(result);
system->createDSPByType(FMOD_DSP_TYPE_TREMOLO, &dsp);
channel->addDSP(0, dsp);
bool playing = true;
while(playing){
result = channel->isPlaying(&playing);
ERRCHECK(result);
sleep(1);
}