0
0

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_SYSTEM *system;
FMOD_SOUND *sound;
FMOD_CHANNEL *channel = 0;
FMOD_RESULT cod;

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);

[/code:2skevnyx]

__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));
exit(-1);
}
}

[/code:2skevnyx]

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

  • You must to post comments
0
0

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.

  • You must to post comments
0
0

Which platform?

  • You must to post comments
0
0

GNU/Linux

  • You must to post comments
0
0

Don’t some of the drivers exclusively control the soundcard?

  • You must to post comments
0
0

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 */
} FMOD_LINUX_EXTRADRIVERDATA;[/code:2i6kb49b]

[code:2i6kb49b]
FMOD_LINUX_EXTRADRIVERDATA *driver_linux

__code=FMOD_System_Init(system,32,FMOD_INIT_NORMAL,driver_linux);[/code:2i6kb49b]

But also crash when I playing a sound with other application.

  • You must to post comments
0
0

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.

  • You must to post comments
0
0

I resolved this problem with initilitze system with an other outputsystem.

Thanks

  • You must to post comments
Showing 7 results
Your Answer

Please first to submit.