On Wednesday 16 November 2005 02:34, Gerard ROBIN wrote:
> And it seem that   FG (openal) does not share the sound usage.
> Experts could answer.

Ok first of all forget what the others have told you about using sound 
daemons.  :)
You do NOT want to use aRts or ESD or any of those crap sound daemons 
otherwise you'll be pulling your hair out in no time since not all apps like 
to play nicely with each other or the sound daemons.

Firstly the Windows versus Linux scenario.
In Windows the sound is mixed in software by default and since there is only 
one sound API in Windows it's not a problem. All the Windows apps happily use 
the same sound system regardless if Windows is doing the software mixing or 
leaving the mixing up to capable hardware.

Under Linux you have a whole bunch of apps which are compiled for different 
sound systems and don't play nicely together.

Here are a few solutions to get sound mixed under Linux.

1. Use a decent sound card that supports hardware mixing like the Creative 
Labs cards which use the emu10k chipsets (32 source hardware mixing ...)
Onboard AC97 is simply an awful sound chipset - I always disable it and pop in 
another sound card.

2. Use software mixing.
No not aRts, ESD or friends but use the ALSA dmix software mixing plugin.
This will do the mixing at the ALSA level. It doesn't matter if an app is 
compiled for ALSA, SDL, OSS - they will all work since they all end up using 
ALSA.
You can find details of how to write .asoundrc config files on the ALSA 
website.

3. If you have a sound card that supports multiple playback devices then you 
can route the sound around a bit using ALSA and OpenAL config files.
I use a cheap SB PCI 128 card that has two playback devices and 1 capture 
device. I route the OpenAL FG sound through /dev/adsp and use /dev/dsp for 
the other apps like TeamSpeak which require device 0 (capture and playback).
This allows two apps to play sound at the same time. Not perfect but it's all 
I need.

Example .openalrc file that tells OpenAL apps to use hardware device 1 (second 
channel for playback) and the capture device on channel 0 for recording :

(define devices '(alsa))
(define alsa-out-device "hw:0,1")
(define alsa-in-device "hw:0,0")
(define speaker-num 2)

4. Use multiple cards and mix the sound externally or by looping the output on 
one card back into the line input of another card and mixing them that way.

Regards
Paul


_______________________________________________
Flightgear-users mailing list
[email protected]
http://mail.flightgear.org/mailman/listinfo/flightgear-users
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to