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