I need some amount of songs to be played at the same time (simulteneously). My code is:
#define SIZE 9
FMOD_SYSTEM *gSystem = 0;
FMOD_CHANNEL *gChannel[SIZE];
FMOD_SOUND *gSound[SIZE];
const char *tracks[SIZE];
FMOD_RESULT result = FMOD_OK;
result = FMOD_System_Create(&gSystem);
result = FMOD_System_Init(gSystem, 1024, FMOD_INIT_NORMAL, 0);
FMOD_MODE soundParams = FMOD_SOFTWARE | FMOD_2D | FMOD_LOOP_OFF | FMOD_CREATESTREAM
| FMOD_ACCURATETIME;
for (int i = 0; i < tracksSize; i++)
result = FMOD_System_CreateSound(gSystem, tracks[i], soundParams, 0, &gSound[i]);
for (int i=0; i<tracksSize; i++) {
result = FMOD_System_PlaySound(gSystem, FMOD_CHANNEL_FREE, gSound[i], true, &gChannel[i]);
FMOD_Channel_SetMode(gChannel[i], FMOD_LOOP_NORMAL);
FMOD_Channel_SetLoopCount(gChannel[i], -1);
FMOD_Channel_SetPaused(gChannel[i], false);
}
But songs play intermittently. Help me, please.