2
有沒有辦法讓fmod播放基於聲音名稱的聲音?我可以通過使用此代碼迴路出來的聲音名稱:如何在iPhone上將聲音名稱傳遞給Fmod
for (int subsoundindex = 0; subsoundindex < numsubsounds; subsoundindex++)
{
FMOD::Sound *subsound = NULL;
char name[256] = {0};
result = fsb->getSubSound(subsoundindex, &subsound);
ERRCHECK(result);
result = subsound->getName(name, 256);
ERRCHECK(result);
NSLog(@"SOUND NAME %s.", name);
}
但玩它,我想知道在哪裏可以在這樣的代碼注入的聲音名稱:
result = fsb->getSubSound(row, &subsound);
ERRCHECK(result);
result = system->playSound(FMOD_CHANNEL_FREE, subsound, false, &channel);
ERRCHECK(result);