Showing posts with label Skype. Show all posts
Showing posts with label Skype. Show all posts

Monday, May 9, 2011

Sound not working in Outgun

In Ubuntu 10.04 sound was not working in Outgun. The fix that worked was one I came across when having sound issues with Skype.
  1. "...edit or create the file ~/.pulse/client.conf and add a line containing "autospawn = no" there..."
  2. Restart (maybe log out/in works?)

This fixed the sound problem but created new problems:
  • Audio controls on the keyboard no longer worked
  • Volume slider in the panel no longer worked
  • System > Prefs > Sound no longer worked

After some toying around, I found that pulseaudio could be disabled / enabled without having to restart or log out. I put together a script that disables pulseaudio, runs Outgun, and then restarts pulseaudio after the game is shut down.
 
The script doesn't entirely make sense to me. Creating the client.conf file wouldn't be necessary I would think, especially right before killing pulseaudio. But the sound fix didn't work otherwise.
 
#!/bin/bash
# create client.conf file
cd ~/.pulse
echo "autospawn = no" > client.conf
# kill pulseaudio
pulseaudio -k

# run outgun
cd ~/outgun_1.0.3_r336
./outgun

# remove client.conf file
cd ~/.pulse
rm client.conf

# restart pulseaudio
pulseaudio --start

Sunday, May 8, 2011

Some Skype sounds don't work in Ubuntu 10.04

At one point I had problems with the sounds in Skype on Ubuntu 10.04. Some worked, others did not. I could play them in VLC just fine, but not in Skype. Right now running Skype 2.2.0.25, these problems seem to have disappeared. Below is what I did previously to work around this problem.

Official Skype fix here
  1. "...edit or create the file ~/.pulse/client.conf and add a line containing "autospawn = no" there..."
  2. Restart (maybe log out/in works?)

This solved the Skype sound problem but created new problems:
  • Audio controls on the keyboard no longer worked
  • Volume slider in the panel no longer worked
  • System > Prefs > Sound no longer worked
I tried playing a dvd and some mp3s, and they worked just fine. Overall I didn't like this option because it took away a lot of the control I had over my sound. If you go this route, you can install gnome-alsamixer for sound settings. sudo apt-get install gnome-alsamixer
My workaround
  1. Don't do the fix outlined above
  2. Create bash scripts that play the desired sound using vlc or other software
  3. Go into Skype Options, Notifications, find desired sounds
  4. Disable the sound playing for each
  5. Enable the script for each
CallRingingIn.sh example script #!/bin/bash
# Incoming call, play and quit
vlc --play-and-exit /usr/share/skype/sounds/CallRingingIn.wav

ContactOnline.sh example script #!/bin/bash
# Contact comes online, plays twice and quits
vlc --play-and-exit /usr/share/skype/sounds/ContactOnline.wav vlc --play-and-exit /usr/share/skype/sounds/ContactOnline.wav

Don't forget to change permissions so each script is executable $ chmod +x CallRingingIn.sh