0
0

I just received a report from a user that my game was crashing unless he executed it with "Run as Administrator". I checked the log file and saw that System::init was failing with return value FMOD_ERR_OUTPUT_INIT. (The crash was later, in my code; I was trying to create a DSP unit, which also failed, and then dereferencing that pointer without checking).

The game was built against FMOD Studio 1.03.00. Unfortunately, I don’t have much more information on the issue yet. I’ll paste my initialization code below, and I’ll update this post after I gather relevant OS and hardware information from the user.

[code:1mktcgpx]

define FMOD_ERROR_CHECK( func ) \

ASSERT( Result == FMOD_OK ); \
if( Result != FMOD_OK ) \
{ \
    PRINTF( "FMOD: " #func ": 0x%08X\n", Result ); \
}

FMOD_RESULT Result;
Result = FMOD::System_Create( &m_FMODSystem );
FMOD_ERROR_CHECK( System_Create );

uint Version = 0;
Result = m_FMODSystem->getVersion( &Version );
FMOD_ERROR_CHECK( getVersion );
ASSERT( Version >= FMOD_VERSION );

FMOD_OUTPUTTYPE FMODOutput = FMOD_OUTPUTTYPE_AUTODETECT;
Result = m_FMODSystem->getOutput( &FMODOutput );
FMOD_ERROR_CHECK( getOutput );
PRINTF( "FMOD: Default output type: 0x%08X\n", FMODOutput );

int NumDrivers = 0;
Result = m_FMODSystem->getNumDrivers( &NumDrivers );
FMOD_ERROR_CHECK( getNumDrivers );

ASSERT( NumDrivers > 0 );
if( NumDrivers <= 0 )
{
PRINTF( "FMOD: No sound drivers available.\n" );
Result = m_FMODSystem->setOutput( FMOD_OUTPUTTYPE_NOSOUND );
FMOD_ERROR_CHECK( setOutput );
}

const int MaxChannels = 1000;
Result = m_FMODSystem->init( MaxChannels, FMOD_INIT_NORMAL, NULL );
FMOD_ERROR_CHECK( init ); // (This is line 85, mentioned in the log file below)
[/code:1mktcgpx]

And the relevant part of the log file states:
[code:1mktcgpx]
FMOD: Default output type: 0x00000008
Assertion failed: "Result == FMOD_OK" ()
in FMODAudioSystem::FMODAudioSystem in .\src\fmodaudiosystem.cpp at line 85
FMOD: init: 0x00000038
[/code:1mktcgpx]

  • You must to post comments
0
0

Are you able reproduce this with the logging version of FMOD? It will output the exact internal error code if you can.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.