Urban Terror Forums: Pulse Audio Workaround : Script to FORCE ALSA - Urban Terror Forums

Jump to content

 Login | Register 
Advertisement
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Pulse Audio Workaround : Script to FORCE ALSA Rate Topic: -----

#1 User is offline   ericcmi Icon

  • Account: ericcmi
  • Joined: 05-August 12
  • Posts: 4

Posted 07 August 2012 - 04:54 PM

Tardfarmer's Workaround

I have a slower/older system. Pulse Audio uses software mixing which means your sound is dependent on your cpu having free cycles. Maxing the CPU kills audio fidelity with skips and pops.

This is a workaround to FORCE urt to use ALSA. The only reason I installed pulse was that the latest version of flash player requires it and refuses to even load as an extension in firefox or chrome without it.

So, you need a few things.

1) pulse audio installed and working
2) a modified .asoundrc
3) a startup script for urt

.asoundrc : This file can be in a few different locations, but in the root of your home dir is ideal unless multiple users need this. ~/.asoundrc

pcm.!default {
    @func refer
    name { @func concat 
           strings [ "pcm."
                     { @func getenv
                       vars [ ALSA_DEFAULT_PCM ]
                       default "pulse"
                     }
           ]
         }
}

ctl.!default {
    @func refer
    name { @func concat 
           strings [ "ctl."
                     { @func getenv
                       vars [ ALSA_DEFAULT_CTL
                              ALSA_DEFAULT_PCM
                       ]
                       default "pulse"
                     }
           ]
         }
}

pcm.pulse { type pulse }
ctl.pulse { type pulse }
pcm.0 { type hw card 0 }
ctl.0 { type hw card 0 }






You also need a starup script to start urt forcing ALSA
export ALSA_DEFAULT_PCM=0
pasuspender -- /mnt/storage/urt4.2/Quake3-UrT.i386



Easy! Hope this helps. Also, i have not been able to get teamspeak working with this.
-tardfarmer

edit:forgot to add my name, tard out...

This post has been edited by ericcmi: 07 August 2012 - 04:58 PM


#2 User is offline   ericcmi Icon

  • Account: ericcmi
  • Joined: 05-August 12
  • Posts: 4

Posted 09 August 2012 - 10:43 PM

if you get this error when urt is running, you need this fix

ALSA lib pcm.c:7223:(snd_pcm_recover) underrun occured

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

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

Advertisement


Copyright © 1999-2024 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