-#if PLATFORM_LINUX
- unsigned char rc = 0;
- int output = OPENAL_OUTPUT_ALSA; // Try alsa first...
- if (commandLineOptions[SOUND]) {
- output = commandLineOptions[SOUND].last()->type(); // ...but let user override that.
- }
-
- OPENAL_SetOutput(output);
- if ((rc = OPENAL_Init(44100, 32, 0)) == false) {
- // if we tried ALSA and failed, fall back to OSS.
- if ( (output == OPENAL_OUTPUT_ALSA) && (commandLineOptions[SOUND].last()->type() != OPENAL_OUTPUT_ALSA) ) {
- OPENAL_Close();
- output = OPENAL_OUTPUT_OSS;
- OPENAL_SetOutput(output);
- rc = OPENAL_Init(44100, 32, 0);
- }
- }
-
- if (rc == false) {
- OPENAL_Close();
- output = OPENAL_OUTPUT_NOSOUND; // we tried! just do silence.
- OPENAL_SetOutput(output);
- rc = OPENAL_Init(44100, 32, 0);
- }
-#else