[pulseaudio-commits] 2 commits - configure.ac src/pulsecore src/utils
Colin Guthrie
colin at kemper.freedesktop.org
Mon Jun 27 02:18:20 PDT 2011
configure.ac | 2 +-
src/pulsecore/sndfile-util.c | 2 +-
src/utils/pacat.c | 18 +++++++++++-------
3 files changed, 13 insertions(+), 9 deletions(-)
New commits:
commit aa7bc322e25a461a14e922f71103a7ca607482f8
Author: Maarten Bosmans <mkbosmans at gmail.com>
Date: Mon Jun 27 01:19:07 2011 +0200
parecord: Automatically detect file format from extension
And fix a small bug in pa_sndfile_format_from_string.
diff --git a/src/pulsecore/sndfile-util.c b/src/pulsecore/sndfile-util.c
index 85d7a1c..ab6485d 100644
--- a/src/pulsecore/sndfile-util.c
+++ b/src/pulsecore/sndfile-util.c
@@ -446,7 +446,7 @@ int pa_sndfile_format_from_string(const char *name) {
pa_assert_se(sf_command(NULL, SFC_GET_FORMAT_MAJOR, &fi, sizeof(fi)) == 0);
- if (strncasecmp(name, fi.extension, strlen(name)) == 0)
+ if (strncasecmp(name, fi.name, strlen(name)) == 0)
return fi.format;
}
diff --git a/src/utils/pacat.c b/src/utils/pacat.c
index 749593e..323f071 100644
--- a/src/utils/pacat.c
+++ b/src/utils/pacat.c
@@ -926,8 +926,6 @@ int main(int argc, char *argv[]) {
break;
case ARG_FILE_FORMAT:
- raw = FALSE;
-
if (optarg) {
if ((file_format = pa_sndfile_format_from_string(optarg)) < 0) {
pa_log(_("Unknown file format %s."), optarg);
@@ -986,13 +984,19 @@ int main(int argc, char *argv[]) {
goto quit;
}
- /* Transparently upgrade classic .wav to wavex for multichannel audio */
if (file_format <= 0) {
- if ((sample_spec.channels == 2 && (!channel_map_set || (channel_map.map[0] == PA_CHANNEL_POSITION_LEFT &&
- channel_map.map[1] == PA_CHANNEL_POSITION_RIGHT))) ||
- (sample_spec.channels == 1 && (!channel_map_set || (channel_map.map[0] == PA_CHANNEL_POSITION_MONO))))
+ char *extension;
+ if (filename && (extension = strrchr(filename, '.')))
+ file_format = pa_sndfile_format_from_string(extension+1);
+ if (file_format <= 0)
file_format = SF_FORMAT_WAV;
- else
+ /* Transparently upgrade classic .wav to wavex for multichannel audio */
+ if (file_format == SF_FORMAT_WAV &&
+ (sample_spec.channels > 2 ||
+ (channel_map_set &&
+ !(sample_spec.channels == 1 && channel_map.map[0] == PA_CHANNEL_POSITION_MONO) &&
+ !(sample_spec.channels == 2 && channel_map.map[0] == PA_CHANNEL_POSITION_LEFT
+ && channel_map.map[1] == PA_CHANNEL_POSITION_RIGHT))))
file_format = SF_FORMAT_WAVEX;
}
commit ad1e0431fb42086351ccc25b3af47e84604895a1
Author: Henning Heinold <heinold at inf.fu-berlin.de>
Date: Sun May 22 23:02:44 2011 +0200
build-sys: look for function 'backtrace' also in library 'ubacktrace'
Using OpenEmbedded with 'minimal-uclibc' for 'MACHINE = "beagleboard"'
compilation fails with the following error [1].
[â¦]
CCLD pulseaudio
./.libs/libpulsecommon-0.9.22.so: undefined reference to `backtrace_symbols'
./.libs/libpulsecommon-0.9.22.so: undefined reference to `backtrace'
collect2: ld returned 1 exit status
make[3]: *** [pulseaudio] Error 1
Using uClibc 'backtrace' is in the library 'ubacktrace' and needs to be
searched in there. This patch is used successfully in OpenEmbedded[2].
[1] http://lists.linuxtogo.org/pipermail/openembedded-devel/2011-May/032979.html
[2] http://cgit.openembedded.org/cgit.cgi/openembedded/commit/?id=0086e0506eb4939150bb50ec337d7f6787b8ae8a
diff --git a/configure.ac b/configure.ac
index 8afb18c..7f7970b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -448,7 +448,7 @@ AC_SEARCH_LIBS([pthread_setname_np], [pthread])
# BSD
AC_SEARCH_LIBS([connect], [socket])
-AC_SEARCH_LIBS([backtrace], [execinfo])
+AC_SEARCH_LIBS([backtrace], [execinfo ubacktrace])
# Darwin/OS X
if test "x$os_is_darwin" = "x1" ; then
More information about the pulseaudio-commits
mailing list