[openal] Make OpenAL use ALSA PLUG:DMIX

rogerx.oss at gmail.com rogerx.oss at gmail.com
Mon Apr 21 02:08:35 EDT 2014


I'm trying to get FlightGear to work around my custom .asoundrc file for which 
intentionally prevents dmix from being used.  FlightGear alongside it's now 
internal FGCom, tends to assume ALSA is using DMix from the start.  If a user 
has a custom ALSA $HOME/.soundrc file, FlightGear's internal FGCom may not work 
at all if the default ALSA dmix is being bypassed, as the sound device is 
already being used by FlightGear.  And with little error output I may mention!

So, I have tried the following without success:

drivers = alsa
device = dmix
device-prefix = plug:

(Prior versions seem to allow "device = plug:dmix", until device-prefix was 
implemented?  Many on the mailing lists seem to have used this plug:dmix in the 
past with success.)

Using the above, and performing the following I can see openal picking up the 
dmix device, but openal/FlightGear does not use the device and still insists on 
using the hardware devices only! (ie. aplay -l)

AL lib: (II) probe_devices: Got device "Xonar STX, Multichannel (CARD=STX,DEV=0)", "plug:CARD=STX,DEV=0"
AL lib: (II) GetConfigValue: Key alsa:device-prefix-STX-1 not found
AL lib: (II) probe_devices: Got device "Xonar STX, Digital (CARD=STX,DEV=1)", "plug:CARD=STX,DEV=1"
AL lib: (II) GetConfigValue: Found alsa:device = "dmix"
AL lib: (II) GetConfigValue: Found alsa:device-prefix = "plug:"
AL lib: (II) alcOpenDevice: Created device 0xc989280, "ALSA Default"

I've also even created a custom pcm.myDMix filter within my asoundrc, and 
tested the pcm.myDMix filter using 'aplay -D "plug:myDMix"', including a hint, 
but still basically a duplicate way of doing 'aplay -D "plug:dmix". And upon 
using the myDMix filter within the .alsoftrc, openal still detects but does not 
use the myDMix within FlightGear.  (Again, only devices listed within "aplay 
-l" are shown within FlightGear > Sound.)

(I'd really dislike having to move the .asoundrc out of the way just for 
running FlightGear.  And I'm not too privy of Pulse Audio, which will only make 
things largely more complicated.)

Another funny thing, specifying "frequency = 44100", openal still insists on 
using 48000 even though this S/PDIF bus do 44100.  Likely this is indicative 
FlightGear is hard-coding some values?  (I'll split this second issue into a 
separate thread if this gets detailed.)


More information about the openal mailing list