setting audio device

setting audio device

Discuss everything related to running Spring on your chosen distribution of Linux.

Moderator: Moderators

Post Reply
misanthropos
Posts: 2
Joined: 28 Dec 2008, 10:33

setting audio device

Post by misanthropos »

Hello,

I try to figure out how to change the audio device within spring and
can't get information how to do this. What I found out is it is using
openal as sound system. So maybe this question could be rather
an openal question. I tried .openalrc and set my audio device
accordingly, but spring always uses my first audio device, instead of
my second one which i a attached my headset to.

Any ideas?

regards

Misanthropos
HAARP
Posts: 182
Joined: 06 Apr 2006, 07:18

Re: setting audio device

Post by HAARP »

Add something like this to your .asoundrc

Code: Select all

pcm.!default {
        card 0
}
Not sure if that'll work, but it can't be much different. Change card 0 accordingly.
This will change the default card for all apps tho. If Spring supports setting a specific ALSA device, this could also be solved. Dunno about that
misanthropos
Posts: 2
Joined: 28 Dec 2008, 10:33

Re: setting audio device

Post by misanthropos »

[quote="HAARP"]Add something like this to your .asoundrc

Code: Select all

pcm.!default {
        card 0
}
Thanks for that suggestion, but I don't want to change the default device. I rather like to set the audio device just for some applications like games or voip software.

E.g. with SDL you could set
AUDIODEV=hw:1,0

before starting a game with SDL-support

and I understood openal reads ./openalrc but mine is not working (or maybe it works, but its ignored when starting spring):
(define devices '(alsa))
(define speaker-num 2)
(define display-banner #t)
(define source-gain 1.0)
(define alsa-device "hw:1,0")
(define alsa-out-device "hw:1,0")
Post Reply

Return to “Linux”