我想補充的高通濾波器(或任何其他過濾器),以該音頻文件,然後將其保存到文檔目錄中。 下面是我的code.Its不給我的結果。你可以請建議我錯在哪裏...
FMOD_RESULT result = FMOD_OK;
char buffer[200] = {0};
unsigned int version = 0;
result = FMOD::System_Create(&system);
ERRCHECK(result);
result = system->getVersion(&version);
ERRCHECK(result);
if (version < FMOD_VERSION)
{
fprintf(stderr, "You are using an old version of FMOD %08x. This program requires %08x\n", version, FMOD_VERSION);
exit(-1);
}
[[NSString stringWithFormat:@"%@/song1.wav", [[NSBundle mainBundle] resourcePath]] getCString:buffer maxLength:200 encoding:NSASCIIStringEncoding];
char cDest[200] = {0};
NSString *fileName=[NSString stringWithFormat:@"%@/recordName.wav", [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]];
[fileName getCString:cDest maxLength:200 encoding:NSASCIIStringEncoding];
result = system->setOutput(FMOD_OUTPUTTYPE_WAVWRITER);
ERRCHECK(result);
result = system->init(32, FMOD_INIT_NORMAL | FMOD_INIT_ENABLE_PROFILE, cDest);
ERRCHECK(result);
result = system->createSound(buffer, FMOD_SOFTWARE, NULL, &sound);
ERRCHECK(result);
result = system->playSound(FMOD_CHANNEL_FREE, sound, false, &channel);
ERRCHECK(result);
result = system->createDSPByType(FMOD_DSP_TYPE_HIGHPASS, &dsphighpass);
ERRCHECK(result);
result = system->addDSP(dsphighpass, NULL);
ERRCHECK(result);
你找到解決方案嗎? 我也面臨這個問題。 – iVipS 2012-10-05 06:53:30
是的我已經修復了這個問題 – 2012-10-05 09:54:00
我在下面發佈了我的解決方案。如果還有問題,請告訴我。希望我艾米幫助你。 – 2012-10-05 09:59:59