1 2OpenAL setup for general use (Linux) 3------------------------------------- 4As of the July 2004 release of OpenAL it is best to add at least the 5following line to your ~/.openalrc file on Linux because it wil find out 6what audio backend to use, starting with the most appropriate: 7 8(define devices '(native alsa sdl esd arts null)) 9 10 11 12ALSA surround sound (5.1) setup 13------------------------------------- 14(taken from http://floam.ascorbic.com/how-to/alsa5.1) 15 16Make a ~/.openalrc, we are telling OpenAL that we want surround sound and 17we want to use ALSA instead of OSS. 18 19(define speaker-num 4) 20(define devices '(alsa)) 21(define alsa-out-device "surround40:0,0") 22 23 24 25IRIX surround sound (5.1) setup 26------------------------------------- 27To add 4 channel surround sound on IRIX hardware that supports in 28directly you can just add the following line to your ~/.openalrc file: 29 30(define speaker-num 4) 31 32To add 4 channel surround sound to IRIX systems that have more than one 33stereo output you can add the following section to your ~/.openalrc file 34(for a typical O2 configuration): 35 36(define speaker-num 4) 37(define native-out-device "Analog Out") 38(define native-rear-out-device "Analog Out 2") 39 40or alternatively: 41 42(define speaker-num 4) 43(define native-out-device "A3.Speaker") 44(define native-rear-out-device "A3.LineOut2") 45 46 47 48(Note the following section is obsolete as of the July 2004 release of 49OpenAL, since your could command OpenAL to use ALSA or Arts directly) 50 51ALSA and Arts 52------------------------------------- 53 54I'm using kernel 2.6.5 with alsa, my sound module is snd-intel8x0. When I ran 55fgfs, I'd get quite 'choppy' sound (wasn't smooth, there'd be a couple of 56breaks in the sound every second or so). Running arts, and starting fgfs with 57"artsdsp fgfs" (from the artsdsp website: "When an application is run under 58artsdsp all accesses to the /dev/dsp audio device are intercepted and mapped 59into aRts API calls. While the device emulation is not perfect, most 60applications work this way, albeit with some degradation in performance and 61latency.") would improve the situation, but it seemed to still be choppy. 62 63This command: 64echo "fgfs 0 0 direct" >/proc/asound/card0/pcm0p/oss 65 66(from the alsa kernel OSS emulation website: 67 "The direct option is used, as mentioned above, to bypass the automatic 68 conversion and useful for MMAP-applications") 69 70made my sound work beautifully when fgfs was run with artsdsp. Running without 71artsdsp however (with artsd suspended or killed), would give me no sound at all 72(which I find a bit strange) 73 74The following websites might help people with similar troubles: 75http://www.alsa-project.org/~iwai/OSS-Emulation.html 76http://www.arts-project.org/doc/handbook/artsdsp.html 77 78Computer info: 79 80kernel 2.6.5 81 82flightgear 0.9.4 83simgear 0.3.5 84plib 1.8.3 85 86soundcard is onboard an asus p4p800-e deluxe mobo (using snd-intel8x0), alsa, 87related modules from lsmod: 88Module Size Used by 89snd_pcm_oss 53252 1 90snd_mixer_oss 19968 1 snd_pcm_oss 91snd_intel8x0 33476 1 92snd_ac97_codec 63492 1 snd_intel8x0 93snd_pcm 97408 2 snd_pcm_oss,snd_intel8x0 94snd_timer 26112 1 snd_pcm 95snd_page_alloc 11396 2 snd_intel8x0,snd_pcm 96snd_mpu401_uart 7936 1 snd_intel8x0 97snd_rawmidi 24832 1 snd_mpu401_uart 98snd_seq_device 8324 1 snd_rawmidi 99snd 53892 9 snd_pcm_oss,snd_mixer_oss,snd_intel8x0,snd_ac97_codec,snd_pcm,snd_timer,snd_mpu401_uart,snd_rawmidi,snd_seq_device 100soundcore 10208 2 snd 101