Urban Terror Forums: Make the game use a specific sound card - Urban Terror Forums

Jump to content

 Login | Register 
Advertisement
Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

Make the game use a specific sound card Rate Topic: -----

#1 User is offline   Mazter Icon

  • Account: mazter
  • Country:
  • Joined: 02-March 10
  • Posts: 116

Posted 17 August 2011 - 05:16 AM

Hi,

I bought an USB sound card, well actually it's a wireless transmitter (Audioengine AW1) to be able to output sound to other speakers that are far away from my PC. My other sound card is a SB Audigy 2. Now since I'm using the USB card, alsa is selecting it as the default sound card which is ok, but it means that Urban Terror is using it too and I'm hearing the game far away from where I'm sitting.

Is there a way to tell the game to use a specific sound card so I can tell it to use the old SB Audigy card instead of the default one ?

#2 User is offline   Mazter Icon

  • Account: mazter
  • Country:
  • Joined: 02-March 10
  • Posts: 116

Posted 17 August 2011 - 05:56 AM

I forgot to mention, PulseAudio is out of the question for now as there's a bug with Nexuiz 2.5.2 which makes the game sound stop randomly when pulseAudio is used. It needs to be done using Alsa.

#3 User is offline   undead Icon

  • Account: undead
  • Joined: 06-June 10
  • Posts: 199

Posted 17 August 2011 - 06:31 AM

View PostMazter, on 17 August 2011 - 05:56 AM, said:

I forgot to mention, PulseAudio is out of the question for now as there's a bug with Nexuiz 2.5.2 which makes the game sound stop randomly when pulseAudio is used. It needs to be done using Alsa.

No worries. I would never recommend using pulseaudio anyway :)

Yes, you can do this easily. The easiest method is to use an environment variable that ALSA looks at. You can use ALSA_PCM_CARD to do this. Like you, I have a SB Audigy 2 and I also have USB headphones. My default device is the SB Audigy 2 (card 0). When I run 'aplay -l', it shows the card number for everything.

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Audigy2 [SB Audigy 2
...
card 2: Audio [Plantronics Wireless Audio], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0



To tell ioquake3 to use my wireless headphones instead of my speakers, I simply do this:

env ALSA_PCM_CARD=2 ./ioquake3_r2147.i386 ...


Note that I'm using upstream's ioquake3 version rather than ioUrT. It may be different back in the version that ioUrT uses. Worth a shot anyway.

The output from ioquake3 looks the same:

------ Initializing Sound ------
SDL_Init( SDL_INIT_AUDIO )... OK
SDL audio driver is "alsa".
SDL_AudioSpec:
  Format:   AUDIO_S16LSB
  Freq:     22050
  Samples:  705
  Channels: 2
Starting SDL audio callback...
SDL audio initialized.


http://alsa.opensrc.org/FAQ026

This post has been edited by undead: 17 August 2011 - 06:38 AM


#4 User is offline   Nexu Icon

  •   clan leader   
  • Account: nexu
  • Main tag: |it|
  • Country:
  • Joined: 26-June 07
  • Posts: 4,264

Posted 17 August 2011 - 12:58 PM

View PostMazter, on 17 August 2011 - 05:56 AM, said:

I forgot to mention, PulseAudio is out of the question for now as there's a bug with Nexuiz 2.5.2 which makes the game sound stop randomly when pulseAudio is used. It needs to be done using Alsa.

Frankly, given PulseAudio record on stability and issues with games on Linux (including UrbanTerror). I would say it's more likely the bug is caused by PulseAudio.

#5 User is offline   Mazter Icon

  • Account: mazter
  • Country:
  • Joined: 02-March 10
  • Posts: 116

Posted 17 August 2011 - 08:10 PM

Thanks undead, that worked like a charm :D

bullet_loaderAdvertisement

#6 User is offline   Mazter Icon

  • Account: mazter
  • Country:
  • Joined: 02-March 10
  • Posts: 116

Posted 17 August 2011 - 08:18 PM

View PostNexu, on 17 August 2011 - 12:58 PM, said:

Frankly, given PulseAudio record on stability and issues with games on Linux (including UrbanTerror). I would say it's more likely the bug is caused by PulseAudio.


Probably, althought I haven't had much trouble with PA appart from this, Mandriva's integration is really good.

#7 User is offline   Nexu Icon

  •   clan leader   
  • Account: nexu
  • Main tag: |it|
  • Country:
  • Joined: 26-June 07
  • Posts: 4,264

Posted 18 August 2011 - 02:03 AM

It's not the integration of PulseAudio in the distribution. I was talking about PulseAudio it self.

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users

Advertisement


Copyright © 1999-2019 Frozensand Games Limited  |  All rights reserved  |  Urban Terror™ and FrozenSand™ are trademarks of Frozensand Games Limited

Frozensand Games is a Limited company registered in England and Wales. Company Reg No: 10343942