Commit graph

76 commits

Author SHA1 Message Date
Arun Raghavan
d9624e0382 build-sys: Stop using symdef headers for modules
This removes the symdef header generation m4 magic in favour of a
simpler macro method, allowing us to skip one unnecessary build step
while moving to meson, and removing an 11 year old todo!
2017-12-12 12:58:52 +05:30
Colin Leroy
f0dfddead3 cli-command: don't exit on "module already loaded" errors
Some modules may only be loaded once, and trying to load them
twice from default.pa makes PulseAudio startup fail. While that could
be considered a user error, it's nicer to not be so strict. It's not
necessarily easy to figure what went wrong, if for example the user
plays with RAOP and adds module-raop-discover to default.pa, which first
works fine, but suddenly stops working when the user at some point
enables RAOP support in paprefs. Enabling RAOP in paprefs makes
module-gconf load the module too, so the module gets loaded twice.

This patch adds a way to differentiate module load errors, and
make cli-command ignore the error when the module is already
loaded.
2017-09-05 13:46:27 +03:00
Ondrej Holecek
5effc83479 update FSF addresses to FSF web page
FSF addresses used in PA sources are no longer valid and rpmlint
generates numerous warnings during packaging because of this.
This patch changes all FSF addresses to FSF web page according to
the GPL how-to: https://www.gnu.org/licenses/gpl-howto.en.html

Done automatically by sed-ing through sources.
2015-01-14 22:20:40 +02:00
poljar (Damir Jelić)
d806b19714 Remove pa_bool_t and replace it with bool.
commands used for this (executed from the pulseaudio/src directory):
    find . -regex '\(.*\.[hc]\|.*\.cc\|.*\.m4\)' -not -name 'macro.h' \
        -a -not -name 'reserve.[ch]' -a -not -name 'reserve-monitor.[ch]' \
        -a -not -name 'glib-mainloop.c' -a -not -name 'gkt-test.c' \
        -a -not -name 'glib-mainloop.c' -a -not -name 'gkt-test.c' \
        -a -not -name 'poll-win32.c' -a -not -name 'thread-win32.c' \
        -a -not -name 'dllmain.c' -a -not -name 'gconf-helper.c' \
        -exec sed -i -e 's/\bpa_bool_t\b/bool/g' \
        -e 's/\bTRUE\b/true/g' -e 's/\bFALSE\b/false/g' {} \;

and:
    sed -i -e '181,194!s/\bpa_bool_t\b/bool/' \
        -e '181,194!s/\bTRUE\b/true/' -e \
        '181,194!s/\bFALSE\b/false/' pulsecore/macro.h
2013-07-04 12:25:30 +03:00
poljar (Damir Jelić)
97da92d894 Whitespace cleanup: Remove all multiple newlines
This patch removes all occurrences of double and triple
newlines.

Command used for this:
find .  -type d \( -name ffmpeg \) -prune -o \
        -regex '\(.*\.[hc]\|.*\.cc\)' \
        -a -not -name 'adrian-aec.*' -a -not \
        -name reserve.c -a -not -name 'rtkit.*' \
        -exec sed -i -e '/^$/{N;s/^\n$//}' {} \;

Two passes were needed to remove triple newlines.
The excluded files are mirrored files from external sources.
2013-06-24 16:56:24 +03:00
Maarten Bosmans
dd9265ac78 Remove unnecessary #includes 2011-06-22 23:12:20 +01:00
Colin Guthrie
1c6e5d4e81 combine: Fix a crash on shutdown if the module is loaded outside of our control.
By using module indexes rather than module pointers we avoid this posibility.
2011-06-08 20:27:51 +01:00
Colin Guthrie
512baa1a1f combine: Rename module-combine to module-combine-sink.
This also includes a compatibility module that will ultimately be removed in
a future release.
2011-04-30 15:12:45 +01:00
Maarten Bosmans
ecf09f2cd6 Fix up according to Coding Style
Only whitespace changes in here
2011-03-11 11:49:35 +00:00
Maarten Bosmans
8b4cb54595 Limit rate adjustments to small, inaudible jumps
The same logic is applied to the sample rate adjustments in module-rtp-recv,
module-loopback and module-combine:
 - Each time an adjustment is made, the new rate can differ at most 2‰ from the
   old rate.  Such a step is equal to 3.5 cents (a cent is 1/100th of a
   semitone) and as 5 cents is generally considered the smallest observable
   difference in pitch, this results in inaudible adjustments.
 - The sample rate of the stream can only differ from the rate of the
   corresponding sink by 25%.  As these adjustments are meant to account for
   very small clock drifts, any large deviation from the base rate suggests
   something is seriously wrong.
 - If the calculated rate is within 20Hz of the base rate, set it to the base
   rate.  This saves CPU because no resampling is necessary.
2011-01-16 02:14:41 +01:00
Colin Guthrie
71cb35691c combine: Only check if the sink is h/w etc. in automatic mode 2010-11-17 23:56:56 +00:00
Antti-Ville Jansson
b27be51f78 combine: Handle reappearing slave sinks in non-automatic mode.
Earlier, if slave sinks were unlinked in non-automatic mode, their
re-appearance was disregarded. Now they are added back to the list of outputs.

Signed-off-by: Antti-Ville Jansson <antti-ville.jansson@digia.com>
Reviewed-by: Tanu Kaskinen <tanu.kaskinen@digia.com>
2010-11-16 21:17:38 +00:00
Lennart Poettering
cdc2769162 thread: name all threads so that the names appear in /proc/$PID/task/$TID/comm 2010-05-07 23:58:59 +02:00
Lennart Poettering
66cfa72eb4 native: rework handling of seeks that depend on variables the client does not know anything about
All seeks/flushes that depend on the playback buffer read pointer cannot
be accounted for properly in the client since it does not know the
actual read pointer. Due to that the clients do not account for it at
all. We need do the same on the server side. And we did, but a little
bit too extreme. While we properly have not applied the changes to the
"request" counter we still do have to apply it to the "missing" counter.
This patch fixes that.
2010-02-09 22:45:59 +00:00
Lennart Poettering
345547853b core: make sure we always return a valid memblock in sink_input_pop() callbacks
https://bugzilla.redhat.com/show_bug.cgi?id=553607
2010-02-09 22:29:38 +00:00
Lennart Poettering
84eb6614eb core: move 'flags' field into 'pa_sink_input_new_data' structure so that hooks can access it 2009-08-28 23:24:09 +02:00
Lennart Poettering
99d3e6b744 combine: store adjust time in usec 2009-08-26 01:51:29 +02:00
Lennart Poettering
ac05619141 combine: quieten gcc a bit 2009-08-21 03:45:17 +02:00
Maarten Bosmans
61105df13b combine: determine sample parameters of combined sink from underlying sinks
http://pulseaudio.org/ticket/521
2009-08-15 01:38:06 +02:00
Lennart Poettering
1eeddd84d2 combine: warn when the latency of a stream gets too high 2009-08-15 01:16:57 +02:00
Lennart Poettering
e1f3f5e0bf combine: big rework 2009-08-15 01:07:37 +02:00
Lennart Poettering
8947d65515 combine: drop adjust_timestamp variable because it is unused 2009-08-15 01:04:21 +02:00
Lennart Poettering
4eb59fb90e core: move rtpoll to thread_info sub structure 2009-08-15 00:26:00 +02:00
Colin Guthrie
a007d4740f combine: Do not set (and update) description if the user passed one in during load.
Note that this will not turn off auto-description setting if the user were to
update the proplist later, so such a change could be short lived.
2009-06-29 22:52:31 +01:00
Lennart Poettering
fc33f7ee97 Merge most of elmarco/rtclock2
Merge commit 'e4d914c945'
2009-06-22 23:09:46 +02:00
Marc-André Lureau
0955e3d45b Base mainloop on pa_rtclock_now()
Move the mainloop to monotonic based time events.

Introduces 4 helper functions:
pa_{context,core}_rttime_{new,restart}(), that fill correctly a
timeval with the rtclock flag set if the mainloop supports it.

Both mainloop-test and mainloop-test-glib works with rt and timeval
based time events. PulseAudio and clients should be fully functional.

This patch has received several iterations, and this one as been
largely untested.

Signed-off-by: Marc-André Lureau <marca-andre.lureau@nokia.com>
2009-06-20 17:29:31 +03:00
Marc-André Lureau
125c528896 pulse: move pa_rtclock_now in pulsecommon 2009-06-20 17:29:08 +03:00
Lennart Poettering
32e2cd6d32 core: get rid of rt sig/timer handling since modern Linux' ppooll() is finally fixed for granularity 2009-06-19 21:00:06 +02:00
Marc-André Lureau
5dcdd5e358 perl -p -i -e 's/pa_rtclock_usec/pa_rtclock_now/g' find . -name '*.[ch]' 2009-06-19 19:04:04 +03:00
Lennart Poettering
00797b8b6e core: add a suspend cause flags field 2009-06-05 19:05:07 +02:00
Lennart Poettering
1c4393acf0 modules: add {sink|source|card}_properties argument to all modules 2009-05-28 02:39:22 +02:00
Lennart Poettering
d035f4a3f3 Modify smoothing code to make cubic interpolation optional and allow 'quick fixups' on resuming
The primary reason for this change is to allow time graphs that do not
go through the origin and hence smoothing starting from the origin is
not desired. This change will allow passing time data into the smoother
while paused and then abruptly use that data without smoothing using the
'quick fixup' flag when resuming.

Primary use case is allowing recording time graphs where the data
recorded originates from a time before the stream was created. The
resulting graft will be shifted and should not be smoothened to go
through the origin.
2009-04-05 02:26:02 +02:00
Lennart Poettering
b815a1c7eb don't fiddle with latency range because we cannot adjust it dynamically 2009-03-25 00:42:32 +01:00
Lennart Poettering
2f9a784167 set request/rewind sizes only via accessor functions 2009-03-24 21:13:41 +01:00
Colin Guthrie
86dee05aec Use LGPL 2.1 on all files previously using LGPL 2 2009-03-03 20:23:02 +00:00
Colin Guthrie
c08317772b Use pa_assert_se() when the containing code has side effects.
As reported by rantala. Closes #502 and #503
2009-03-02 13:11:29 +00:00
Lennart Poettering
4505bc9cc6 introduce default channel map in addition to the default sample spec 2009-02-21 16:32:42 +01:00
Lennart Poettering
08800c35b0 make a couple of functions return proper error codes 2009-02-03 03:14:20 +01:00
Lennart Poettering
b2ef19acc5 include PA_SINK_INVALID_STATE in all switch/case statements to make gcc shut up 2009-01-22 00:26:34 +01:00
Lennart Poettering
29c7a28817 kill autoload stuff as planned 2009-01-15 20:07:13 +01:00
Lennart Poettering
75119e91cd add new dont_rewind_render flag to allow quick starts of newly created streams 2009-01-15 00:40:06 +01:00
Lennart Poettering
dc9b8dce30 add a few missing casts 2008-08-20 03:33:06 +03:00
Lennart Poettering
b7026bf248 add a few more gcc warning flags and fix quite a few problems found by doing so 2008-08-19 22:39:54 +02:00
Lennart Poettering
34dd4a20f2 fix shutdown when --disallow-module-loading=1 is passed 2008-08-05 23:56:25 +02:00
Lennart Poettering
f0e5cd1613 handle rewind requests 2008-06-27 21:57:44 +02:00
Lennart Poettering
eab1cb8df9 make sure to call process_rewind() under all circumstances before we do the next loop iteration 2008-06-26 02:56:00 +02:00
Lennart Poettering
1514d13835 split pa_memblockq_flush() into two flush commands, one which fixes up the read ptr, and one which fixes up the write ptr 2008-06-26 00:39:31 +02:00
Lennart Poettering
d3c1c920f0 Request a rewrite immediately after we have been linked, so that playback starts immediately 2008-06-20 23:04:12 +02:00
Lennart Poettering
add6c0361a Rework module-combine to work with glitch-free core; add new max_request field to pa_sink 2008-06-20 22:32:41 +02:00
Lennart Poettering
8ae83d618e get rid of svn $ keywords 2008-06-18 23:23:21 +03:00