0
0

Hi.

I’m trying to make such a combination working under Linux and i think i’m close to say: !#@% enough! :) so i hope someone will be able to help me.

I’ve a cr*ppy ac97-like integrated sound chip (asus a7n8x-x) and i’m really close to the moment when i’ll stop using it and buy some decent soundcard, but i’m stubborn :) The question is, is it possible to use dmixed sound device in the application using fmod? If it’s possible, can someone point me a HOWTO/FAQ explaining how can i do it? All i want is to add another device to the app (wxMusik) so far all i can see in the sources are some magical numbers (0, 1, 2) and i only guess (i haven’t studied the source long enough) that it may be something related to the way how oss, esd and alsa support is represented in fmod library api. If i’m wrong please correct me.

Cheers,
W.

  • You must to post comments
0
0

The code the poster means is this:
[code:3cpo7821] if ( wxGetApp().Prefs.nSndOutput == 0 )
{
if( FSOUND_SetOutput( FSOUND_OUTPUT_OSS ) == FALSE )
return FMOD_INIT_ERROR_OSS;
}
else if ( wxGetApp().Prefs.nSndOutput == 1 )
{
if ( FSOUND_SetOutput( FSOUND_OUTPUT_ESD ) == FALSE )
return FMOD_INIT_ERROR_ESD;
}
else if ( wxGetApp().Prefs.nSndOutput == 2 )
{
if ( FSOUND_SetOutput( FSOUND_OUTPUT_ALSA ) == FALSE )
return FMOD_INIT_ERROR_ALSA;
}

    if(wxGetApp().Prefs.nSndDevice > 0)
    {
    //---------------------//
    //--- setup device  ---//
    //---------------------//
        if (  FSOUND_SetDriver( wxGetApp().Prefs.nSndDevice ) == FALSE )
            return FMOD_INIT_ERROR_DEVICE_NOT_READY;
    }

[/code:3cpo7821]

0,1,2 are just the values read from the prefs file. the mean OSS,ESD and ALSA. The device is selected from another pref settings.

the prefs dialog loads the possible devices with thios code:
[code:3cpo7821]
for ( int i = 0; i < FSOUND_GetNumDrivers(); i++ )
cmbSndDevice->Append( ConvA2W(FSOUND_GetDriverName( i ) ) );
[/code:3cpo7821]

well i dont know why it is called FSOUND_SetOutput for the driver, and FSOUNDSetDriver for the device 😉

as far as i know alsa+dmix should be transparent to the applications
dmix is a mixer which mixes streams of serveral app together ( what windows always does) if you have a soundcard which has only one channel.

i myself use an audigy2 which has several hardware channels.

regards,
gunnar

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.