0
0

Hi
I’m using FMod 3.74 on WinXP with MSVC7.1. I’m experiencing a very strange behaviour. When I compile my application in DEBUG mode every thing works fine and I can hear all sounds. But, when I change to RELEASE mode some sounds are played but the majority of them remain silent. I tried to limit the FPS to 60 in my application but this didn’t change anything.

I guess there are no settings that get executed silently when compiling an application in DEBUG mode, I must be doing some thing wrong then :)

this is my setup code
[code:1obsraba]
FSOUND_SetOutput(FSOUND_OUTPUT_DSOUND);

    FSOUND_SetMinHardwareChannels(128);

    FSOUND_SetMixer(FSOUND_MIXER_AUTODETECT);

    if(FALSE==FSOUND_Init(44100, 128, FSOUND_INIT_GLOBALFOCUS)){
        CLog::GetSingleton().write(LOG_APP,"CSoundServer::start() : Error %s",FMOD_ErrorString(FSOUND_GetError()));
        FSOUND_Close();
        return false;
    }
    FSOUND_3D_SetDistanceFactor(100);
    FSOUND_3D_SetRolloffFactor(0.01f);
    const FSOUND_REVERB_PROPERTIES props=FSOUND_PRESET_MOUNTAINS;

    FSOUND_Reverb_SetProperties(&props);
    FSOUND_Stream_SetBufferSize(1024);
    String sDriver=FSOUND_GetDriverName(FSOUND_GetDriver());
    f32 ver=FSOUND_GetVersion();

    setPan(pan);
    setMasterVolume(mastervolume);
    set3DDistanceFactor(distancefactor);
    setRollOffFactor(rollofffactor);
    setDopplerFactor(dopplerfactor);

[/code:1obsraba]

and this is how i load and play the sounds
[code:1obsraba]

bool CPlayable::loadSample(const String& fn)
{
    unsigned int inputmode=0|FSOUND_HW3D|FSOUND_FORCEMONO | (repeating ?  FSOUND_LOOP_NORMAL:FSOUND_LOOP_OFF) ;
    sample= FSOUND_Sample_Load(FSOUND_FREE,fn.c_str(),inputmode,0,0);
    return sample!=NULL;
}

void CPlayable::play()
{
if(sample){
if(channel==-1)
channel = FSOUND_PlaySoundEx(FSOUND_FREE,sample,NULL,TRUE);
else
channel = FSOUND_PlaySoundEx(channel,sample,NULL,TRUE);
FSOUND_SetVolume(channel,vol);
setAttributes(position,velocity);
FSOUND_SetPaused(channel,FALSE);
}
}
[/code:1obsraba]

Any hints are strongly appreciated

Thanks
Tom

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.