0
0

Hi there!

I’m developing a cross-platform game, and I’m getting reports from a couple of my Linux testers that they have no audio. I added some logging (albeit without sending testers the logging version of FMOD yet), and I don’t understand what I’m seeing.

During initialization, I make three calls: FMOD::System_Create, FMOD::System::getNumDrivers, and FMOD::System::init. For the affected users, System_Create returns with no errors, but then getNumDrivers returns error 23, FMOD_ERR_FILE_NOTFOUND. init also returns 23 and all subsequent calls fail because the system was not initialized.

I have found one reference to a similar problem in another game, but without any useful explanation: [url:n0bt11wg]http://steamcommunity.com/app/209540/discussions/0/846960628574631163/[/url:n0bt11wg]

Can you provide any insight into why getNumDrivers would return a file not found error? (For reference, I am on version 4.44.22.)

Thanks!

  • You must to post comments
0
0

It looks like our PulseAudio output mode queries the existence of libpulse-simple.so.0, if it cannot find it then it cannot enumerate the available driver count. It should return FMOD_ERR_OUTPUT_INIT telling you that PulseAudio is unavailable, however it is using the more internally correct (yet less useful to you) error code of FMOD_ERR_FILE_NOTFOUND. A good rule of thumb is if System::getNumDrivers returns an error, try a different output mode via System::setOutput.

If you don’t specify an output mode FMOD will use the ‘default’, internally we evaluate PulseAudio, then ALSA, then OSS to determine the best option.

  • You must to post comments
0
0

Thank you! I’ll give that a try.

  • You must to post comments
0
0

Hello again,

I modified my initialization code to try switching to ALSA and then OSS output if getNumDrivers fails (although the previous reply as well as the documentation suggests that this should be unnecessary, as FMOD will default to the best available output option).

I sent the updated build to my testers, and received a log file indicating that (as before) the system defaults to Pulse output and getNumDrivers fails (FMOD_ERR_FILE_NOTFOUND). Then setOutput(ALSA) fails (FMOD_ERR_OUTPUT_INIT) and finally, setOutput(OSS) succeeds but reports no drivers available.

I’m running out of ideas. The testers who observe this bug are capable of playing other games with audio (including games built in Unity, which I understand includes FMOD as its audio system), so I’ve ruled out any user configuration problems.

Here’s my initialization code, stripped of logging and error checking and commented to show the results the affected users are getting.
[code:2818xaj9]
FMOD_RESULT Result;
Result = FMOD::System_Create( &m_FMODSystem );

FMOD_OUTPUTTYPE FMODOutput = FMOD_OUTPUTTYPE_AUTODETECT;
Result = m_FMODSystem->getOutput( &FMODOutput ); // Returns FMOD_OUTPUTTYPE_PULSEAUDIO in FMODOutput

int NumDrivers = 0;
Result = m_FMODSystem->getNumDrivers( &NumDrivers ); // Fails with FMOD_ERR_FILE_NOTFOUND

if( Result != FMOD_OK )
{
    Result = m_FMODSystem->setOutput( FMOD_OUTPUTTYPE_ALSA ); // Fails with FMOD_ERR_OUTPUT_INIT
    Result = m_FMODSystem->getNumDrivers( &NumDrivers );
}

if( Result != FMOD_OK )
{
    Result = m_FMODSystem->setOutput( FMOD_OUTPUTTYPE_OSS ); // Succeeds, but...
    Result = m_FMODSystem->getNumDrivers( &NumDrivers ); // ...returns 0 in NumDrivers
}

if( NumDrivers <= 0 )
{
    Result = m_FMODSystem->setOutput( FMOD_OUTPUTTYPE_NOSOUND );
}

Result = m_FMODSystem->init( MaxChannels, FMOD_INIT_NORMAL, NULL );

[/code:2818xaj9]

  • You must to post comments
0
0

Never mind, I believe I’ve found the answer. At least one tester only has the 64-bit version of libpulse-simple in his path, and my game is a 32-bit binary.

Other games work for him because he’s running them through Steam, which provides the 32- and 64-bit versions of libpulse-simple in a separate location.

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.