Is there a way to get fmod to play a sound based on sound name? I can loop out the sound name by using this code:
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);
}
But to play it I want to know where to inject the sound name in a code like this:
result = fsb->getSubSound(row, &subsound);
ERRCHECK(result);
result = system->playSound(FMOD_CHANNEL_FREE, subsound, false, &channel);
ERRCHECK(result);