somebody say :
FMOD::Sound objects loaded as FMOD_SOFTWARE. and Channel::setFrequency as negative frequency , the sound will be reversed.
But in the Fmod5 low api, there is no FMOD_SOFTWARE enum, what can i do ?
my code:
result = FMOD_System_CreateSound(gSystem, fileName, FMOD_LOOP_OFF, 0, &gSound);
float freq = 0;
FMOD_Channel_GetFrequency(channel, &freq);
FMOD_Channel_SetFrequency(channel, -freq);
but nothing happen
please help me, thank you.
brett
May 5, 2016, 12:47am
2
FMOD 5 has no FMOD_SOFTWARE because all sounds are FMOD_SOFTWARE in FMOD 5.
The reason nothing happens is you have FMOD_LOOP_OFF, and the sound started at position 0, went backwards then ended immediately. You have to start your sound somewhere that it can go backwards from, ie use Channel::setPosition
FMOD 5 has no FMOD_SOFTWARE because all sounds are FMOD_SOFTWARE in FMOD 5.
The reason nothing happens is you have FMOD_LOOP_OFF, and the sound started at position 0, went backwards then ended immediately. You have to start your sound somewhere that it can go backwards from, ie use Channel::setPosition
Thank you very much. I will try the Channel::setPosition
result = FMOD_System_PlaySound(gSystem, gSound, gMastergroup, true, &channel);
CHECK_RESULT(result, LINE );
float freq = 0;
FMOD_Channel_GetFrequency(channel, &freq);
FMOD_Channel_SetFrequency(channel, -freq);
unsigned int length;
result = FMOD_Sound_GetLength(gSound, &length, FMOD_TIMEUNIT_MS);
CHECK_RESULT(result, __LINE__);
__android_log_print(ANDROID_LOG_ERROR, "FMOD", "%i", length);
result = FMOD_Channel_SetPosition(channel, length, FMOD_TIMEUNIT_MS);
CHECK_RESULT(result, __LINE__);
FMOD_Channel_SetPaused(channel, false);
It not work !!! please help me.
OK, I soloved it by:
result = FMOD_Channel_SetPosition(channel, length - 1, FMOD_TIMEUNIT_MS);
CHECK_RESULT(result, LINE );
OK, I soloved it by:
result = FMOD_Channel_SetPosition(channel, length - 1, FMOD_TIMEUNIT_MS);
CHECK_RESULT(result, LINE );