0
0

I get a an error sometimes when calling the GetVersion.
I don’t mean the wrong version I mean an exception.
Drwatson log reports an exception. In the log it says it has loaded and it looks like the correct version of fmod dll(size check)

I have linked the library, and it is the beta 3.74(5)

Should I be doing extra stuff before I check for the version to make sure !!

[code:pfhaayvu]
if ( ::FSOUND_GetVersion() < FMOD_VERSION )
{
LOG(PR_ERROR,"Invalid fmod.dll version! %.02f\f", ::FSOUND_GetVersion() );
return E_FAIL;
}
[/code:pfhaayvu]

thx

tekjunkie

  • You must to post comments
0
0

Hi ๐Ÿ˜‰
There is nothing special to do before calling FSOUND_GetVersion(), as i see, you are using C++ so the problem must be outside this piece of code.
Could it be possible to see more ?

  • You must to post comments
0
0

[quote="KarLKoX":28o931ji]Hi ๐Ÿ˜‰
There is nothing special to do before calling FSOUND_GetVersion(), as i see, you are using C++ so the problem must be outside this piece of code. Could it be possible to see more ?[/quote:28o931ji]

Yeah, but I don’t think it will help as this is the first thing I do with FMOD before I do anything else.

I call SoundManager::CreateInstance first.

thx

Tekjunkie

[code:28o931ji]
void SoundManager::CreateInstance(DWORD dwDXVersion, UINT mixRate, UINT maxSoftwareChannels)
{
if (FAILED(Initialize(dwDXVersion, mixRate, maxSoftwareChannels)))
{
LOG(PR_ERROR,"ERROR_AUDIO_NOT_AVAILABLE %s id: %d",FMOD_ErrorString(FSOUND_GetError()), FSOUND_GetError());
}

ASSERT(g_SoundManager == NULL);
g_SoundManager = NEW SoundManager();
g_SoundManager-&gt;AddRef();

DirectSoundInit( GameWindow::Instance()-&gt;GetWindowHandle() );

}

SoundManager* SoundManager::Instance()
{
ASSERT(g_SoundManager);
return g_SoundManager;
}

void SoundManager::RemoveInstance()
{
SAFE_RELEASE(g_SoundManager);
}

//—————————————————————————–
// Name: Initialize()
// Desc: Initializes FMOD
//—————————————————————————–
HRESULT SoundManager::Initialize(DWORD dwDXVersion, UINT mixRate, UINT maxSoftwareChannels)
{
// Init FMOD
if ( ::FSOUND_GetVersion() < FMOD_VERSION )
{
LOG(PR_ERROR,"Invalid fmod.dll version! %.02f\f", ::FSOUND_GetVersion() );
return E_FAIL;
}

FSOUND_SetHWND(NULL);

if (!FSOUND_Init(mixRate, maxSoftwareChannels, FSOUND_INIT_GLOBALFOCUS))
{
    // Then try setting FSOUND_OUTPUT_WINMM as it is the safest output mode.
    LOG(PR_ERROR,&quot;%s id: %d&quot;, FMOD_ErrorString(FSOUND_GetError()), FSOUND_GetError());
    FSOUND_SetOutput(FSOUND_OUTPUT_WINMM);

    if (!FSOUND_Init(mixRate, maxSoftwareChannels, FSOUND_INIT_GLOBALFOCUS))
    {
        LOG(PR_ERROR,&quot;%s id: %d&quot;, FMOD_ErrorString(FSOUND_GetError()), FSOUND_GetError());
        m_bAudioAvailable = false;
        return E_FAIL;
    }
}

LOG(PR_SPECIAL,&quot;Name[%s] Drivers[%d] id: Nr.Channels[%d]\n&quot;,  FSOUND_GetDriverName(0), FSOUND_GetNumDrivers(), FSOUND_GetMaxChannels() );

m_bAudioAvailable = true;
return S_OK;

}

[/code:28o931ji]

  • You must to post comments
0
0

Hi !
I tried with a simple class, create an instance and i can’t reproduce the bug ๐Ÿ˜•
Try with adding “float FMOD_GetVersion() { return FSOUND_GetVersion(); }” as a member of your SoundManager class, hope it helps :)

  • You must to post comments
0
0

Iwas having the same problem but I found out the problem…

Check if you have included the correct library

I added the library to the directory of the source code and entered

pragma comment( lib, “fmodvc.lib” )

on the first line.

Edit: there are other alternative but for the moment, it is the only one I know of. If you know other alternative, please share.

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.