Hi for all
I have some apps that was playing sounds very fine. Yesterday, all of them shows this error:
"Error initializing ouput device".
I working on Ubuntu 7.10.
My code is this:
int numDrivers, minFrequency, maxFrequency;
_fmodSystem->getNumDrivers( &numDrivers );
result = _fmodSystem->getDriverCaps( numDrivers, &_deviceCapabilities, &minFrequency, &maxFrequency, &_speakerMode );
_fmodSystem->getDriver( &numDrivers );
result = _fmodSystem->init( numChannels, initFlags, ( void* )_outputType );
if( result != FMOD_OK )
cout << "Impossible to create the system. Closing." << endl;
cout << "Error: " << FMOD_ErrorString( result ) << endl;
_fmodSystem = NULL;
In the FMOD::getDriverCaps method the error message is this:
"An invalid parameter was passed to this function".
This message wasn’t shown before.
Is there a problem with soundcard? drivers? What can I do?
My code is fine.
- C++FMOD asked 10 years ago
This is probably due to the sharing of hardware resources. When people have problems with multiple applications accessing sound hardware on Linux my recommended solution is switch FMOD to use ASLA if applicable for your product.
ALSA generally has better multiple access to hardware support. If the hardware doesn’t support multiple access under ALSA, you can activate a software mixer by tweaking your asoundrc config file.
If you want to go down that path and have any troubles let me know.
I think your problem is that the number of drivers is one greater than the highest enumerated driver ID. So if you have 3 drivers the driver IDs are 0, 1 and 2, so passing 3 to getDriverCaps will return FMOD_ERR_INVALID_PARAM.
Hope this helps.
- Guest answered 10 years ago
Aha, Pete beat me to the response, just to follow up..
If you don’t know which driver to choose, then it is generally best to choose driver 0, as this will always be the default output for your system.
Also note that getDriverCaps functionality is not available on Linux, so that function call won’t give you any useful results.
Matthew, the documentation of the getDriverCaps says the opposite.
Win32, Win64, Linux, Linux64, Macintosh, Xbox, Xbox360, PlayStation 2, GameCube, PlayStation Portable, PlayStation 3, Wii, Solaris [/quote:2pl05w6v]
Even if I don’t call this function the results are the same.
So what’s going on dudes?
When I said the getDriverCaps functionality isnt available on Linux, I didn’t mean the function will fail or crash, I simply meant that it doesn’t provide "useful" results. What will happen is it will report the speakermode as stereo, and everything else as 0. This is due to Linux not providing much support for getting this info.
I will take a look at trying to support some more info from Linux if you need it, but currently if you call get driver caps with a valid device ID you should not get any error, it should succeed.
Ok, so the docs needs a little correction.
The problem was solved when I close my firefox.
In them I was accessing this site
http://www.devarticles.com/c/a/Cplusplu … -Part-I/4/
It contains sometimes videos of IBM talking about a thing that I can remember and other videos. When this video or others are playing, FMOD shows the error the I’ve mentioned. Closing the firefox the error disappears.
Dudes I have no idea why this occurs, really. But works.
Please login first to submit.