Hi, I’m writting this, beacuse I have a problem with FMOD EX. This problem happens sometimes, and only appear when I call this function:
[code:2skevnyx]FMOD_System_Init(system, 32, FMOD_INIT_NORMAL, NULL)[/code:2skevnyx]
Yesterday, I didn’t have any problem, but now, when run the application, it crash here:
[code:2skevnyx]int main(int argc, char *argv)
FMOD_CHANNEL *channel = 0;
cod = FMOD_System_Create(&system); __error(cod); cod = FMOD_System_GetVersion(system, &version); __error(cod); cod = FMOD_System_Init(system, 32, FMOD_INIT_NORMAL, NULL); //<--- HERE __error(cod);
__error function is:
[code:2skevnyx]void __error(FMOD_RESULT _cod_error)
if (_cod_error != FMOD_OK)
printf("Error nr: (%d) says: %s\n", _cod_error, FMOD_ErrorString(_cod_error));
And the error string is: [b:2skevnyx]"Error initializing output device."[/b:2skevnyx]
I don’t know what happens, and it’s strange that error appears sometimes. Help me please, I’m feel disoriented.
Thanks a lot
- Leber asked 10 years ago
I use ALSA to control my sound. But I don’t think that this is the problem. I try to pass this structure in the funcion SystemInit:
[code:2i6kb49b]typedef struct FMOD_LINUX_EXTRADRIVERDATA
const char output_driver_arguments; / ALSA Only – Arguments to apply to the selected output driver /
const char *record_driver_arguments; / ALSA Only – Arguments to apply to the selected input (record) driver */
But also crash when I playing a sound with other application.
If you are using ALSA make sure your applications are using the software mixer device (you may have to create this device in your .asoundrc file if it’s missing).
Also that structure is only needed if you want to pass parameters to a device, for instance if you want to access device hw:0,0 you would choose the device "hw" from FMODs list of devices, then pass in "0,0" for the parameter. You generally don’t need to make use of this.
If you are still having trouble let me know.
I investigate and see that the problem only happens when an other aplication use the sound. For example, while I listen music with firefox(goear.com etc..), the program crach with error "Error initializing output device", but when I close firefox, the program run normally.
I think that there is a solution for this problem, but I don’t find.
Please login first to submit.