Is pulseaudio needed ?

Asked by Yannick Le Guen

Hello,

I installed Audio-Recorder 1.2 successfully on an ArchLinux system.
In both the README and INSTALL files, it is mentionned that only libpulse is a dependency, not pulseaudio itself. It is also explained in this post : http://ubuntuforums.org/showthread.php?t=2091069&p=12391964#post12391964 .

Compilation went fine but at first audio-recorder didn't start (I had an ALSA-only system).

Then I installed Pulseaudio 4.0 and when I run :
- "pulseaudio --start", Audio-Recorder starts.
If I run :
- "pulseaudio --kill", Audio-Recorder GUI won't show but I have no error ouput on console (and if I check running processes with "ps-aux", I can see that Audio-Recorder is actually running).

I saw that pulseaudio is a dependency for the Ubuntu PPA package.

My question :
Is pulseaudio required or is it kind of a bug ? :-)

By the way, thanks for providing this software, I've been using it since Ubuntu 10.04 when it was still Rec-Applet :-)

Question information

Language:
English Edit question
Status:
Expired
For:
Audio Recorder Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
moma (osmoma) said :
#2

Yes, this program needs PulseAudio.

The Gstreamer-pipelines use the "pulsesrc" element as input for audio.
Ref: http://bazaar.launchpad.net/~osmoma/audio-recorder/trunk/view/head:/src/media-profiles.c

Please search for "pulsesrc" in the source files.
$ grep -R "pulsesrc" src/*

A possible solution:
1) Replace "pulsesrc" with "alsasrc" or with something else.

Basically you could replace "pulsesrc" with "alsasrc" in the src/audio-sources.h file. Please look for
#define DEFAULT_AUDIO_SOURCE "pulsesrc"

2) Remove dependency to libpulse.
You can also remove the libpulse (-lpulse) dependency. Look for
http://bazaar.launchpad.net/~osmoma/audio-recorder/trunk/view/head:/src/audio-sources.c

There is already a preliminary code that replaces PulseAudio dependency. Look for the 2.nd get_audio_devices() function that is commented out. Around line# 808.

Ref: http://bazaar.launchpad.net/~osmoma/audio-recorder/trunk/view/head:/src/audio-sources.c#L807

It reads the device names and IDs from/via GStreamer (and not from/via PulseAudio).

#if 0
static GList *get_audio_devices() {

}
...
#endif

That code is a bit old so it needs to be reviewed and verified.

The current get_audio_devices() function reads the same values from PulseAudio. But GStreamer can provide exactly the same information. There is NO need to use -lpulse anymore !

Please read the comment on line 31.
http://bazaar.launchpad.net/~osmoma/audio-recorder/trunk/view/head:/src/audio-sources.c#L30

By using GStreamer you can completly remove the pulseaudio.[ch] files from the project.
And you can remove the -lpulse dependency too.

Revision history for this message
moma (osmoma) said :
#3

An update:
The API in Gstreamer1.0 has been changed, and some properties like GstPropertyProbe are now deprecated. We have to use the PulseAudio (libpulse) method until a new Device API lands in Gstreamer 1.4.
Please see:
http://lists.freedesktop.org/archives/gstreamer-devel/2013-November/044009.html

Revision history for this message
Launchpad Janitor (janitor) said :
#4

This question was expired because it remained in the 'Open' state without activity for the last 15 days.