Thursday, November 19, 2009

How not to configure default settings for sound applications

You're absolutely right, Martin: recordmydesktop did the wrong thing and screwed your sound experience in Ubuntu. Fortunately, it's really straightforward to fix:

--- recordmydesktop-0.3.8.1.orig/src/rmd_types.h
+++ recordmydesktop-0.3.8.1/src/rmd_types.h
@@ -39,7 +39,7 @@
#ifdef HAVE_LIBASOUND
#include

- #define DEFAULT_AUDIO_DEVICE "hw:0,0"
+ #define DEFAULT_AUDIO_DEVICE "default"
#else
#include
#include

5 comments:

  1. You're actually wrong... because this will fail if "another device is using the sound card".

    Interestingly enough, routing it though pulseaudio (ie, setting it to "pulse") and then tinkering with the brainless pavucontrol thing to set the stream to use your proper mic (brainless because it'll randomly forget what did you set it to) worked for me.

    ReplyDelete
  2. ^ but that doesn't mean PA is great, because the broken alsa<->PA layer because someone changed the default latency means that my alsa apps have awful, awful sound. (

    ReplyDelete
  3. Vadim, this is the *correct* fix. In Ubuntu, default has already been overridden to use the pulse alsa-lib plugin. The reason it cannot and should not be set to pulse is that Kubuntu and Xubuntu do not ship PulseAudio, so using pulse as the definition would fail pretty horribly for those users.

    As for your latency issues, as I stated in the other comments, Ubuntu has not changed *any* latency settings for linux, alsa-lib, alsa-plugins, or pulseaudio source packages. We ship completely default upstream settings in that regard. For your purposes, you may wish to build and install Lucid's alsa-lib and alsa-plugins source packages on Karmic to investigate further, but more importantly, I need a real bug report files against alsa-lib demonstrating the regression with measurements.

    ReplyDelete
  4. Well, I followed some youtube video on how to get sound working, and according to it, I had to use hw:1,0 (because I had a onboard sound card and usb headset, and I wanted the headset) and it kept saying can't open sound device. But if I restarted my computer, then it could open it.

    As for the latency... ok, I compiled everything into this report:

    https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/485488

    and going to ask others to contribute it. Maybe we can still fix it and figure out what's wrong.

    ReplyDelete
  5. Reported upstream as https://sourceforge.net/tracker/?func=detail&aid=2901044&group_id=172357&atid=861428

    ReplyDelete