Generating docs for file mainloop-api.h...
/home/pmeerw/src/pa-missing/src/pulse/mainloop-api.h:118: warning: Found unknown command `\pa_threaded_mainloop'
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
I think this makes the code a bit nicer to read and write. This also
reduces the chances of off-by-one errors when checking the bounds of
channel count values.
I think this makes the code a bit nicer to read and write. This also
reduces the chances of off-by-one errors when checking the bounds of
sample rate values.
I think this makes the code a bit nicer to read and write. This also
reduces the chances of off-by-one errors when checking the bounds of
the sample format value.
set_scheduler() assumes that if sys/resource.h was found then we will
find RLIMIT_RTTIME there, but this is a non-POSIX extension on Linux.
Change the check to ensure that RLIMIT_RTTIME is actually defined.
Linux indeed defines this as a macro, and POSIX specifies that the other
RLIMIT_ constants must be macros, so having this as an #ifdef seems
correct.
bootstrap.sh uses some non-POSIX features of bash, so we can't use
/bin/sh. Unlike /bin/sh, bash can be installed anywhere in the path, so
we should use /usr/bin/env to find it.
This helps systems that have bash in /usr/local/bin, for example.
PCM Devices which have the BATCH flag set update the PCM pointer only with
period size granularity. Using timer based scheduling does not have any
advantage in this mode. For one devices which have that flag set usually update
the position pointer in software after getting the period interrupt. So
disabling the period interrupt is not possible for this kind of devices.
Furthermore writing to or reading from the buffer slice for the current period
is not possible since the position inside the buffer is not known. On the other
hand the tsched algorithm seems to get easily confused for this kind of
hardware, which results in garbled audio output. This typically means that timer
based scheduling needs to be manually disabled on systems with such devices.
Auto disabling tsched in this case allows these systems to run with the default
configuration.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
the main intent is to make testing different sample rate resampling
implementations easier; so far there is only global control via
resample-method (command line argument and /etc/pulse/daemon.conf)
module-remap-*'s only purpose is resampling (comprising format conversion,
channel remapping, sample rate adjustment), it can easily be introduced
into any audio pipeline
Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
by using pa_modargs_get_sample_rate() we avoid inconsistant validity
checking of the sample rate in various places
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
buf in struct ffmpeg_data is reset() initially and freed, but never
actually used
when a new block is allocated ffmpeg_data->buf[c].length is used
(which is always 0) to compute the new block size
so, drop buf
Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
When setting attribute foo, or in this case the card profile, in my
opinion the thing passed to the set_foo() function should be of the
type of foo, not a string identifier that can be used to search for
the actual foo in set_foo().
This is mostly a question of taste, but there's at least some small
benefit from passing the actual object: often the profile object is
already available when calling pa_card_set_profile(), so passing the
card name would cause unnecessary searching when pa_card_set_profile()
needs to look up the profile from the hashmap.
Don't call pthread_join() to join a thread from a different
process than the thread was created in. Doing so can lead to
undefined behaviour.
On OpenBSD, the symptom was a pulseaudio process with a single
thread waiting forever for other threads to join. Since that
process also held the autospawn lock, starting new pulseaudio
processes with --start kept failing. The problem was analyzed
with help from Philip Guenther.
This patch adds a pa_thread_free_nojoin() function which can
be used to free resources for a thread without a join, as
suggested by Tanu Kaskinen.
See https://bugs.freedesktop.org/show_bug.cgi?id=71738
f434087e42 introduced the potential to not select a card profile if
all the profiles were marked as unavailable.
While this is very unlikely, it's a theoretical posibility, so if the
initial choice of a profile fails, try harder.