Page 1 of 3 123 LastLast
Results 1 to 10 of 28

Thread: The Power of PulseAudio (for Intrepid)

  1. #1
    Join Date
    Apr 2006
    Beans
    103
    Distro
    Ubuntu

    Talking The Power of PulseAudio (for Intrepid)

    I have been for the longest time trying to record what I hear on my speakers, and could not figure it out.

    I also did not fully grasp what the big deal of PulseAudio was, until now.

    I can now record what I hear on my speakers, as well as use Audacity or mhWaveEdit, or at the same time, simultaneously to work with Pulseaudio.

    All this worked was done on Ubuntu Intrepid, 32-bit edition.

    I did not try it on Hardy, so I do not know if it works on Hardy.

    I have already done this setup on a PC and laptop, and everything works great.


    I - How to setup programs to record through PulseAudio

    First set all devices to PulseAudio Sound Server in:
    System->Preferences->Sound
    Make sure at least the following are installed by running the following line in a terminal:

    sudo apt-get install pavucontrol pavumeter
    After finishing the installation, run the following in Alt+F2:
    pavumeter
    Keep this running, and it might help to choose the option of keeping it always on top.

    Then run the following in Alt+F2:
    pavucontrol
    In pavucontrol (PulseAudio Volume control), go to the following tab:
    Recording
    All programs that can be recorded will show in this tab, and they will not show unless they are running.

    If pavumeter (PulseAudio Volume Meter) is still running, you should see it in the "Recording" tab in Volume Control.

    Play something with Totem or any other program (as long as it uses PulseAudio), and then click on the right arrow next to PulseAudio Volume Meter in the "Recording" Tab.

    A drop down list should come up, choose "Move Stream" then "Monitor Source (something)".
    If you are playing something, then the bar should be moving in PulseAudio Volume Meter.

    If that works, then you know that PulseAudio is monitoring the audio you are playing.

    Now go to:
    Application->Sound and Video->Sound Recorder
    You will notice that "Sound Recorder" will still not show in the "Recording" tab.

    If you press "Record" in "Sound Recorder" though, it will show up in the "Recording" Tab in Volume Control.

    Choose the right arrow next to "Record Stream", then choose "Move Stream" and then "Monitor Source (something)".
    You should now see the record level in "Sound Recorder" change properly.

    This setting will save for "Sound Recorder" every time you run it, and you should be able to record anything you hear on it.

    You will need to do the same for any program you use to record sound, by choosing the sound stream for it in Volume Control recording tab.

    Hope this helps

    Note: Only works for programs that go through PulseAudio


    II - Make Audacity or mhWaveEdit record through PulseAudio

    1) First you need to install the following through the terminal:
    sudo apt-get insall libao-pulse
    Then you need to setup libao to pass through pulseaudio.

    In a terminal:
    echo “default_driver=pulse” >~/.libao
    libao-pulse is needed in order to make Audacity or mhWaveEdit to properly work through Pulseaudio.

    You will need to at least relogin for this step (just to make sure settings are updated for this step).


    2) Change the commands in the Menu Editor or wherever you call the programs to the following:

    For Audacity:
    padsp audacity
    For mhWaveEdit:
    padsp mhwaveedit
    padsp is used to route OSS sound driver requests to PulseAudio.


    3) Now you need to adjust some settings.

    Note: Make sure Firefox is turned off, as it seems to interfere with Audacity.

    For Audacity, run it, and go to:
    Edit -> Preferences -> Choose OSS: /dev/dsp (NOT dsp1) for both Playback and Recording device -> Press OK
    If Firefox is on, you might only see /dev/dsp1 in the options if it interferes.


    For mhWaveEdit, run it, and go to:
    Edit-> Preferences -> Sound -> Choose "Open Sound System" in the "Driver" drop down list. -> Close
    Make sure that when you click on settings of Open sound system it says:
    /dev/dsp

    4) You should now be able to run Audacity, mhWaveEdit, and other programs at the same time (except for Firefox and Audacity).

    Again, make sure that libao-pulse is installed.

    In case you really want to use the above with Firefox, and it seems to clash, then use mhWaveEdit or just use Sound Recorder


    5) Make sure you setup the above programs the same way Sound Recorder was setup using Pulse audio Volume control and so on, as described above in section I.



    III - Side novelty

    If for some reason, you would like to send the sound played from one PC to another, then you can do so using PulseAudio over a network.

    Say you have two computers (PCA and PCB) hooked up to your network through a hub or router, then you can send whatever sound is being played on PCA to PCB, including microphone on PCA to PCB.

    1) Run the following in a terminal:
    sudo apt-get install paprefs

    2) Run it from terminal or in:
    System -> Preferences -> PulseAudio Preferences
    Go to the Multicast/RTP tab, and just to make things simple tick all boxes.

    a) You can choose whether you want to send your mic to from your own PCA to PCB, as well as looping back to your own PCA to record with playing sound.

    b) Or you can choose whether you just want to send sound being played back on PCA to PCB.

    c) You will need to do the same setup in the second computer PCB to receive the sound from PCA.

    You can play around with the settings, and try out some interesting combinations.


    Hope this helps anyone out there.

    I thought I would write the above because I noticed many people had grief, as I did with PulseAudio.

    But it seems it's more of an issue of knowing how to set it up as opposed to it not working.

    Also, Ubuntu should give some of these tools installed here by default, as well as some documentation.


    NOTE FOR ALL SECTIONS: Just to make sure things apply properly, you might need to restart.
    Last edited by Ramaddan; January 17th, 2009 at 03:21 AM. Reason: Updated an inaccurate statement

  2. #2
    Join Date
    Aug 2006
    Location
    India
    Beans
    19
    Distro
    Xubuntu 11.04 Natty Narwhal

    Re: The Power of PulseAudio (for Intrepid)

    Hi...

    Thanks for this amazing post... It helped me setup my recording... And i didn't have issues with firefox and audacity... in fact, i recorded a streaming audio...

    Can anyone route me to some article explaining the internals of linux audio systems and pulseaudio in particular?

    regards...

    borncrusader

  3. #3
    Join Date
    Jan 2007
    Beans
    Hidden!

    Re: The Power of PulseAudio (for Intrepid)

    Thank you very much, I was a bit hesitant to turn on Pulse audio as previously I had seen it cause problems like system not shutting down etc. but it worked out fine and pulse works really good.

  4. #4
    Join Date
    Apr 2008
    Beans
    4,377
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: The Power of PulseAudio (for Intrepid)

    Pulseaudio setup has always been the issue. It did not help that Ubuntu decided to leave all the guis and many other important parts out of the desktop.

    So, padsp audacity works in Intrepid, that is great news for audacity users.

    I have a few questions that maybe you can answer for me.
    Is firefox using pulseaudio when this problem happens?
    Do other apps also cause this problem?
    Does audacity show up properly in pavucontrol?
    How is audacity set up?
    Is it set for OSS?

    I would like to update my guide here and link this thread in if you can give me some more info about this.

    http://ubuntuforums.org/showthread.php?t=843012

    btw, padsp audacity never worked properly in Hardy.

    Anyway, thanks for the great post.
    regards,
    mark

  5. #5
    Join Date
    Sep 2007
    Beans
    4

    Re: The Power of PulseAudio (for Intrepid)

    Massive thanks for this, I've managed to get audacity working for the first time in about nine months. Very, very happy.

  6. #6
    Join Date
    Apr 2006
    Beans
    103
    Distro
    Ubuntu

    Re: The Power of PulseAudio (for Intrepid)

    Hi,

    I'm glad people find this useful.

    To answer your questions:
    Is firefox using pulseaudio when this problem happens?
    I think it is when it uses something relating to flash, but I'm not sure, as I did not extensively test this, but one person pointed out that he did not have this issue.

    I am using Intrepid, after upgrading from Hardy, so I might have left over configurations, after messing up with Hardy settings in the past trying to get this to work.

    Do other apps also cause this problem?
    So far, I did not have issues with other apps, but I do not multitask that much, so I might just not have noticed.

    Does audacity show up properly in pavucontrol?
    Yes, after setting it up as laid out in the howto

    How is audacity set up?
    I'm a bit unclear over this, as the howto points out the steps done.

    Is it set for OSS?
    Yes, as to use padsp, you need to go through OSS.


    Quote Originally Posted by markbuntu View Post
    Pulseaudio setup has always been the issue. It did not help that Ubuntu decided to leave all the guis and many other important parts out of the desktop.

    So, padsp audacity works in Intrepid, that is great news for audacity users.

    I have a few questions that maybe you can answer for me.
    Is firefox using pulseaudio when this problem happens?
    Do other apps also cause this problem?
    Does audacity show up properly in pavucontrol?
    How is audacity set up?
    Is it set for OSS?

    I would like to update my guide here and link this thread in if you can give me some more info about this.

    http://ubuntuforums.org/showthread.php?t=843012

    btw, padsp audacity never worked properly in Hardy.

    Anyway, thanks for the great post.
    regards,
    mark
    Last edited by Ramaddan; January 17th, 2009 at 07:29 AM.

  7. #7
    Join Date
    Sep 2007
    Location
    Vienna
    Beans
    234

    Re: The Power of PulseAudio (for Intrepid)

    thank you for this, just recorded a nice song from youtube

    one question though, it might sound trivial, but: is there a way to set one playback stream (like firefox) to "solo" or something or connect it more directly to the recording application, so, for example, pidgin or mail-notification can not ruin my record by throwing their notification jingles in?

  8. #8
    Join Date
    Mar 2005
    Location
    Sweden, Uppsala
    Beans
    941
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: The Power of PulseAudio (for Intrepid)

    Hey. I have Ubuntu Interpid 32-bit


    When I change from autodetect to PulseAudio Sound Server i get following errors when I test.

    Sound Events
    Sound Playback: audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! gconfaudiosink: Failed to connect: Connection refused

    Music and Movies
    Sound Playback: audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! gconfaudiosink profile=music: Failed to connect: Connection refused

    Audio Conferencing
    Sound playback: audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! gconfaudiosink profile=chat: Failed to connect: Connection refused
    Sound capture: gconfaudiosrc ! audioconvert ! audioresample ! gconfaudiosink profile=chat: Failed to connect: Connection refused

    I run 'sudo apt-get install pavucontrol pavumeter'

    And when i run pavumeter i get; Connection failed: Connection refused

    What's the problem? /Cheers
    /Azyx

    Ubuntu 16.04LTS 64bit, 16.04 Lubuntu 32-bit on eeePCs and OSX on a G4 800MHz iMac (iLamp). I think I have an W7 on one of my Virtualbox machine under 16.04LTS?

  9. #9
    Join Date
    Sep 2006
    Beans
    548

    Re: The Power of PulseAudio (for Intrepid)

    Quote Originally Posted by Azyx View Post
    And when i run pavumeter i get; Connection failed: Connection refused

    What's the problem? /Cheers

    Looks like you don't have pulseaudio running. Open a terminal and run pulseaudio -D

  10. #10
    Join Date
    Mar 2005
    Location
    Sweden, Uppsala
    Beans
    941
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: The Power of PulseAudio (for Intrepid)

    Quote Originally Posted by mocha View Post
    Looks like you don't have pulseaudio running. Open a terminal and run pulseaudio -D
    I get this error when i try to start it:
    Azyx@Computer:~$ pulseaudio
    E: daemon-conf.c: [/home/Azyx/.pulse//daemon.conf:66] Invalid sample channels '5.1'.
    /Azyx

    Ubuntu 16.04LTS 64bit, 16.04 Lubuntu 32-bit on eeePCs and OSX on a G4 800MHz iMac (iLamp). I think I have an W7 on one of my Virtualbox machine under 16.04LTS?

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •