Answered
0
0

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.

  • You must to post comments
Best Answer
0
0

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

  • tianqiujie

    Thank you very much. I will try the Channel::setPosition

  • tianqiujie

    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.

  • tianqiujie

    OK, I soloved it by:
    result = FMOD_Channel_SetPosition(channel, length – 1, FMOD_TIMEUNIT_MS);
    CHECK_RESULT(result, __LINE__);

  • tianqiujie

    OK, I soloved it by:
    result = FMOD_Channel_SetPosition(channel, length – 1, FMOD_TIMEUNIT_MS);
    CHECK_RESULT(result, __LINE__);

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.