rpms/dosemu/F-10 dosemu.spec,1.6,1.7
by Justin Zygmont
Author: solarflow99
Update of /cvs/free/rpms/dosemu/F-10
In directory se02.es.rpmfusion.net:/tmp/cvs-serv2631
Modified Files:
dosemu.spec
Log Message:
* Tue Aug 25 2009 Justin Zygmont <solarflow99[AT]gmail.com>
- 1.4.0-4.1905svn
- added an extra BR and {?dist} to the spec file
Index: dosemu.spec
===================================================================
RCS file: /cvs/free/rpms/dosemu/F-10/dosemu.spec,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- dosemu.spec 26 Aug 2009 14:00:18 -0000 1.6
+++ dosemu.spec 26 Aug 2009 17:42:59 -0000 1.7
@@ -14,6 +14,9 @@
# License info is explained here:
# http://apps.sourceforge.net/mediawiki/freedos/index.php?title=Main_Page#L...
+ExclusiveOS: linux
+ExclusiveArch: i386
+
# Got latest revision from SVN:
# svn co https://dosemu.svn.sourceforge.net/svnroot/dosemu/trunk dosemu-1.4.0
# tar --exclude .svn -czvf dosemu-1.4.0.tgz dosemu-1.4.0
@@ -39,16 +42,15 @@
BuildRequires: desktop-file-utils
BuildRequires: xorg-x11-font-utils
Requires: hicolor-icon-theme
-ExclusiveOS: linux
-%if 0%{?fedora} >= 12
-ExclusiveArch: i686
-%endif
-%if 0%{?fedora} >= 11
-ExclusiveArch: i586
-%else
-ExclusiveArch: i386
-%endif
+#%if 0%{?fedora} >= 12
+#ExclusiveArch: i686
+#%endif
+#%if 0%{?fedora} >= 11
+#ExclusiveArch: i586
+#%else
+#ExclusiveArch: i386
+#%endif
%description
@@ -63,8 +65,6 @@
%build
-echo "SSSSSSSSSSSSSSSS"
-echo '.code16;.text;addr32 pushw 4(%esp)' | as -o dummy.o
%configure --with-fdtarball=%{SOURCE1}
make %{?_smp_mflags}
15 years, 3 months
rpms/buildsys-build-rpmfusion/F-11 buildsys-build-rpmfusion-kerneldevpkgs-current, 1.24, 1.25 buildsys-build-rpmfusion.spec, 1.32, 1.33
by Thorsten Leemhuis
Author: thl
Update of /cvs/free/rpms/buildsys-build-rpmfusion/F-11
In directory se02.es.rpmfusion.net:/tmp/cvs-serv23680
Modified Files:
buildsys-build-rpmfusion-kerneldevpkgs-current
buildsys-build-rpmfusion.spec
Log Message:
* Wed Aug 26 2009 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 10:11-0.21
- rebuild for kernel 2.6.29.6-217.2.16.fc11
Index: buildsys-build-rpmfusion-kerneldevpkgs-current
===================================================================
RCS file: /cvs/free/rpms/buildsys-build-rpmfusion/F-11/buildsys-build-rpmfusion-kerneldevpkgs-current,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- buildsys-build-rpmfusion-kerneldevpkgs-current 23 Aug 2009 07:08:34 -0000 1.24
+++ buildsys-build-rpmfusion-kerneldevpkgs-current 26 Aug 2009 14:17:57 -0000 1.25
@@ -1,3 +1,3 @@
-2.6.30.5-32.fc11
-2.6.30.5-32.fc11smp
-2.6.30.5-32.fc11PAE
+2.6.29.6-217.2.16.fc11
+2.6.29.6-217.2.16.fc11smp
+2.6.29.6-217.2.16.fc11PAE
Index: buildsys-build-rpmfusion.spec
===================================================================
RCS file: /cvs/free/rpms/buildsys-build-rpmfusion/F-11/buildsys-build-rpmfusion.spec,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- buildsys-build-rpmfusion.spec 23 Aug 2009 07:08:34 -0000 1.32
+++ buildsys-build-rpmfusion.spec 26 Aug 2009 14:17:57 -0000 1.33
@@ -3,7 +3,7 @@
Name: buildsys-build-%{repo}
Epoch: 10
Version: 11
-Release: 0.20
+Release: 0.21
Summary: Tools and files used by the %{repo} buildsys
Group: Development/Tools
@@ -90,6 +90,9 @@
%changelog
+* Wed Aug 26 2009 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 10:11-0.21
+- rebuild for kernel 2.6.29.6-217.2.16.fc11
+
* Sun Aug 23 2009 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 10:11-0.20
- rebuild for kernel 2.6.30.5-32.fc11
15 years, 3 months
rpms/dosemu/F-10 dosemu.spec,1.5,1.6
by Justin Zygmont
Author: solarflow99
Update of /cvs/free/rpms/dosemu/F-10
In directory se02.es.rpmfusion.net:/tmp/cvs-serv22529
Modified Files:
dosemu.spec
Log Message:
* Tue Aug 25 2009 Justin Zygmont <solarflow99[AT]gmail.com>
- 1.4.0-4.1905svn
- added an extra BR and {?dist} to the spec file
Index: dosemu.spec
===================================================================
RCS file: /cvs/free/rpms/dosemu/F-10/dosemu.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- dosemu.spec 26 Aug 2009 07:02:20 -0000 1.5
+++ dosemu.spec 26 Aug 2009 14:00:18 -0000 1.6
@@ -27,8 +27,6 @@
Source2: %{name}.desktop
Source3: freedos-source.tar.gz
Group: Applications/Emulator
-ExclusiveOS: linux
-ExclusiveArch: i386
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: bison
BuildRequires: flex
@@ -41,6 +39,16 @@
BuildRequires: desktop-file-utils
BuildRequires: xorg-x11-font-utils
Requires: hicolor-icon-theme
+ExclusiveOS: linux
+
+%if 0%{?fedora} >= 12
+ExclusiveArch: i686
+%endif
+%if 0%{?fedora} >= 11
+ExclusiveArch: i586
+%else
+ExclusiveArch: i386
+%endif
%description
@@ -55,6 +63,7 @@
%build
+echo "SSSSSSSSSSSSSSSS"
echo '.code16;.text;addr32 pushw 4(%esp)' | as -o dummy.o
%configure --with-fdtarball=%{SOURCE1}
make %{?_smp_mflags}
15 years, 3 months
rpms/dosemu/F-10 dosemu.spec,1.4,1.5
by Justin Zygmont
Author: solarflow99
Update of /cvs/free/rpms/dosemu/F-10
In directory se02.es.rpmfusion.net:/tmp/cvs-serv32375
Modified Files:
dosemu.spec
Log Message:
* Tue Aug 25 2009 Justin Zygmont <solarflow99[AT]gmail.com>
- 1.4.0-4.1905svn
- added an extra BR and {?dist} to the spec file
Index: dosemu.spec
===================================================================
RCS file: /cvs/free/rpms/dosemu/F-10/dosemu.spec,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- dosemu.spec 26 Aug 2009 05:14:02 -0000 1.4
+++ dosemu.spec 26 Aug 2009 07:02:20 -0000 1.5
@@ -27,6 +27,8 @@
Source2: %{name}.desktop
Source3: freedos-source.tar.gz
Group: Applications/Emulator
+ExclusiveOS: linux
+ExclusiveArch: i386
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: bison
BuildRequires: flex
15 years, 3 months
rpms/dosemu/F-10 dosemu.spec,1.3,1.4
by Justin Zygmont
Author: solarflow99
Update of /cvs/free/rpms/dosemu/F-10
In directory se02.es.rpmfusion.net:/tmp/cvs-serv25663
Modified Files:
dosemu.spec
Log Message:
* Tue Aug 25 2009 Justin Zygmont <solarflow99[AT]gmail.com>
- 1.4.0-4.1905svn
- added an extra BR and {?dist} to the spec file
Index: dosemu.spec
===================================================================
RCS file: /cvs/free/rpms/dosemu/F-10/dosemu.spec,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- dosemu.spec 25 Aug 2009 16:00:26 -0000 1.3
+++ dosemu.spec 26 Aug 2009 05:14:02 -0000 1.4
@@ -53,6 +53,7 @@
%build
+echo '.code16;.text;addr32 pushw 4(%esp)' | as -o dummy.o
%configure --with-fdtarball=%{SOURCE1}
make %{?_smp_mflags}
15 years, 3 months
rpms/xmms2-nonfree/devel xmms2-nonfree.spec,1.2,1.3
by Orcan Ogetbil
Author: oget
Update of /cvs/nonfree/rpms/xmms2-nonfree/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv19495
Modified Files:
xmms2-nonfree.spec
Log Message:
* Tue Aug 25 2009 John Doe <anonymous(a)american.us> 0.6-2
- Include sid plugin
- Separate plugin subpackages. The main package is made a meta package.
Index: xmms2-nonfree.spec
===================================================================
RCS file: /cvs/nonfree/rpms/xmms2-nonfree/devel/xmms2-nonfree.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- xmms2-nonfree.spec 12 Aug 2009 09:32:45 -0000 1.2
+++ xmms2-nonfree.spec 26 Aug 2009 03:20:18 -0000 1.3
@@ -3,8 +3,8 @@
Name: xmms2-nonfree
Summary: Nonfree plugins for XMMS2
Version: 0.6
-Release: 1%{?dist}
-License: LGPLv2+
+Release: 2%{?dist}
+License: LGPLv2+ and GPLv2+
Group: Applications/Multimedia
# Fedora's xmms2 has to use a sanitized tarball, we don't.
Source0: http://downloads.sourceforge.net/xmms2/xmms2-%{version}%{codename}.tar.bz2
@@ -23,8 +23,11 @@
BuildRequires: python-devel
# RPMFusion only BuildRequires
BuildRequires: mac-devel
+BuildRequires: sidplay-libs-static
+
+Requires: xmms2-mac = %{version}-%{release}
+Requires: xmms2-sid = %{version}-%{release}
-Provides: xmms2-mac = %{version}-%{release}
%description
XMMS2 is an audio framework, but it is not a general multimedia player - it
@@ -37,8 +40,26 @@
to the XMMS2 framework, but most users will want to install a graphical XMMS2
client (such as gxmms2 or esperanza).
+%package mac
+Summary: XMMS2 plugin for APE audio format
+Group: Applications/Multimedia
+License: LGPLv2+
+Requires: xmms2 = %{version}
+
+%description mac
This package contains an XMMS2 Plugin for listening to Monkey's Audio files.
+%package sid
+Summary: XMMS2 plugin for SID audio format
+Group: Applications/Multimedia
+License: GPLv2+
+Requires: xmms2 = %{version}
+
+%description sid
+This package contains an XMMS2 Plugin for listening to C64 mono and stereo file
+formats.
+
+
%prep
%setup -q -n xmms2-%{version}%{codename}
@@ -54,6 +75,10 @@
sed -i 's|/usr/lib|%{_libdir}|g' $i
done
+# For some reasons RPMFusion's sidplay libraries are moved to a
+# non-standard location. xmms2 can't detect this unless:
+sed -i 's|\[builders\]|\["%{_libdir}/sidplay/builders"\]|' src/plugins/sid/wscript
+
%build
export CFLAGS="%{optflags}"
./waf configure --prefix=%{_prefix} \
@@ -149,10 +174,23 @@
%files
%defattr(-,root,root,-)
+%doc COPYING.GPL COPYING.LGPL
+
+%files mac
+%defattr(-,root,root,-)
%doc COPYING.LGPL
%{_libdir}/xmms2/libxmms_mac.so
+%files sid
+%defattr(-,root,root,-)
+%doc COPYING.GPL
+%{_libdir}/xmms2/libxmms_sid.so
+
%changelog
+* Tue Aug 25 2009 John Doe <anonymous(a)american.us> 0.6-2
+- Include sid plugin
+- Separate plugin subpackages. The main package is made a meta package.
+
* Wed Aug 12 2009 John Doe <anonymous(a)american.us> 0.6-1
- Update to 0.6
15 years, 3 months
rpms/sidplay-libs/devel sidplay-libs.spec,1.5,1.6
by Linus Walleij
Author: snirkel
Update of /cvs/nonfree/rpms/sidplay-libs/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv1820
Modified Files:
sidplay-libs.spec
Log Message:
Compile with -fPIC
Index: sidplay-libs.spec
===================================================================
RCS file: /cvs/nonfree/rpms/sidplay-libs/devel/sidplay-libs.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- sidplay-libs.spec 29 Mar 2009 15:16:55 -0000 1.5
+++ sidplay-libs.spec 25 Aug 2009 22:26:15 -0000 1.6
@@ -4,7 +4,7 @@
Name: sidplay-libs
Version: 2.1.1
-Release: 9%{?dist}
+Release: 10%{?dist}
Summary: A software library for playing back C64 SID files
URL: http://sidplay2.sourceforge.net/
Group: System Environment/Libraries
@@ -68,6 +68,8 @@
chmod -x libsidutils/include/sidplay/utils/SidUsage.h
%build
+# Create position-independent code plz
+export CXXFLAGS="$RPM_OPT_FLAGS -fPIC"
# Cannot use --disable-static here, the builder need static
# libraries to work at all.
%configure
@@ -133,6 +135,10 @@
%{_libdir}/sidplay/builders/*.la
%changelog
+* Wed Aug 26 2009 Linus Walleij <triad(a)df.lth.se> 2.1.1-10
+- Make the library position independent with -fPIC at the
+ request of Orcan Ogetbil for XMMS2
+
* Sun Mar 29 2009 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 2.1.1-9
- rebuild for new F11 features
15 years, 3 months
rpms/dosemu/F-10 dosemu.spec,1.2,1.3
by Justin Zygmont
Author: solarflow99
Update of /cvs/free/rpms/dosemu/F-10
In directory se02.es.rpmfusion.net:/tmp/cvs-serv12482
Modified Files:
dosemu.spec
Log Message:
* Tue Aug 25 2009 Justin Zygmont <solarflow99[AT]gmail.com>
- 1.4.0-4.1905svn
- added an extra BR and {?dist} to the spec file
Index: dosemu.spec
===================================================================
RCS file: /cvs/free/rpms/dosemu/F-10/dosemu.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- dosemu.spec 24 Aug 2009 19:39:28 -0000 1.2
+++ dosemu.spec 25 Aug 2009 16:00:26 -0000 1.3
@@ -1,6 +1,6 @@
Name: dosemu
Version: 1.4.0
-Release: 4.1905svn{?dist}
+Release: 4.1905svn%{?dist}
Summary: DOS Emulator for Linux
URL: http://dosemu.sf.net
License: GPLv2+
15 years, 3 months
rpms/qmmp-plugins-freeworld/devel .cvsignore, 1.4, 1.5 qmmp-plugins-freeworld.spec, 1.6, 1.7 sources, 1.4, 1.5
by Karel Volný
Author: kvolny
Update of /cvs/free/rpms/qmmp-plugins-freeworld/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv5942
Modified Files:
.cvsignore qmmp-plugins-freeworld.spec sources
Log Message:
new version 0.3.0, two new plugins
Index: .cvsignore
===================================================================
RCS file: /cvs/free/rpms/qmmp-plugins-freeworld/devel/.cvsignore,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- .cvsignore 8 Dec 2008 12:00:37 -0000 1.4
+++ .cvsignore 25 Aug 2009 13:52:26 -0000 1.5
@@ -1 +1 @@
-qmmp-0.2.3.tar.bz2
+qmmp-0.3.0.tar.bz2
Index: qmmp-plugins-freeworld.spec
===================================================================
RCS file: /cvs/free/rpms/qmmp-plugins-freeworld/devel/qmmp-plugins-freeworld.spec,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- qmmp-plugins-freeworld.spec 29 Mar 2009 13:59:09 -0000 1.6
+++ qmmp-plugins-freeworld.spec 25 Aug 2009 13:52:26 -0000 1.7
@@ -1,6 +1,6 @@
Name: qmmp-plugins-freeworld
-Version: 0.2.3
-Release: 3%{?dist}
+Version: 0.3.0
+Release: 1%{?dist}
Summary: Plugins for qmmp (Qt-based multimedia player)
Group: Applications/Multimedia
@@ -13,7 +13,9 @@
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
-BuildRequires: cmake ffmpeg-devel >= 0.4.9-0.47.20080614 libmad-devel qt-devel >= 4.2
+BuildRequires: cmake ffmpeg-devel >= 0.4.9-0.47.20080614
+BuildRequires: faad2-devel
+BuildRequires: libmad-devel qt-devel >= 4.3
BuildRequires: taglib-devel libcurl-devel
BuildRequires: qmmp = %{version}
Requires: qmmp = %{version}
@@ -21,7 +23,8 @@
%description
Qmmp is an audio-player, written with help of Qt library.
-This package contains plugins needed to play MPEG (.mp3) and WMA files.
+This package contains plugins needed to play AAC, MPEG (.mp3) and WMA files,
+and also the mplayer plugin for video playback.
%prep
@@ -47,28 +50,41 @@
-D USE_MODPLUG:BOOL=FALSE \
-D USE_SNDFILE:BOOL=FALSE \
-D USE_WAVPACK:BOOL=FALSE \
+ -D USE_CUE:BOOL=FALSE \
+ -D USE_CDA:BOOL=FALSE \
-D USE_ALSA:BOOL=FALSE \
-D USE_OSS:BOOL=FALSE \
-D USE_JACK:BOOL=FALSE \
-D USE_PULSE:BOOL=FALSE \
-D USE_SRC:BOOL=FALSE \
+ -D USE_BS2B:BOOL=FALSE \
-D USE_ANALYZER:BOOL=FALSE \
+ -D USE_PROJECTM:BOOL=FALSE \
-D USE_DBUS:BOOL=FALSE \
+ -D USE_MPRIS:BOOL=FALSE \
-D USE_SCROBBLER:BOOL=FALSE \
-D USE_STATICON:BOOL=FALSE \
-D USE_NOTIFIER:BOOL=FALSE \
+ -D USE_LYRICS:BOOL=FALSE \
+ -D USE_HAL:BOOL=FALSE \
+ -D USE_HOTKEY:BOOL=FALSE \
+ -D USE_FILEOPS:BOOL=FALSE \
-D USE_QMMP_DIALOG:BOOL=FALSE \
-D CMAKE_INSTALL_PREFIX=/usr \
-D LIB_DIR=%{_lib} \
./
+make VERBOSE=1 %{?_smp_mflags} -C src/plugins/Input/aac
make VERBOSE=1 %{?_smp_mflags} -C src/plugins/Input/ffmpeg
make VERBOSE=1 %{?_smp_mflags} -C src/plugins/Input/mad
+make VERBOSE=1 %{?_smp_mflags} -C src/plugins/Input/mplayer
%install
rm -rf %{buildroot}
+make DESTDIR=%{buildroot} install -C src/plugins/Input/aac
make DESTDIR=%{buildroot} install -C src/plugins/Input/ffmpeg
make DESTDIR=%{buildroot} install -C src/plugins/Input/mad
+make DESTDIR=%{buildroot} install -C src/plugins/Input/mplayer
%clean
@@ -87,6 +103,11 @@
%changelog
+* Tue Aug 25 2009 Karel Volný <kvolny(a)redhat.com> 0.3.0-1
+- version bump
+- new plugins aac and mplayer
+- BuildRequires faad2-devel for AAC support
+
* Sun Mar 29 2009 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 0.2.3-3
- rebuild for new F11 features
Index: sources
===================================================================
RCS file: /cvs/free/rpms/qmmp-plugins-freeworld/devel/sources,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- sources 8 Dec 2008 12:00:37 -0000 1.4
+++ sources 25 Aug 2009 13:52:26 -0000 1.5
@@ -1 +1 @@
-22c313a04f7d8def529009e437020155 qmmp-0.2.3.tar.bz2
+ba85e2e288a0e6461f95c1928e8946a4 qmmp-0.3.0.tar.bz2
15 years, 3 months
rpms/mpd/devel 6a071efa2794806ad5a2a62f0fcdee4b1843b41f.patch, NONE, 1.1 mpd.git-00503c9251141b427457c17a9677444bf29c3992.patch, NONE, 1.1 mpd.git-9e9d7b73d2165f197eeec12ee953add5f49746b7.patch, NONE, 1.1 mpd.git-f3a5b753ae053eb1a862343b0fd3d62973cacc18.patch, NONE, 1.1 .cvsignore, 1.5, 1.6 mpd.spec, 1.10, 1.11 sources, 1.5, 1.6
by Adrian Reber
Author: adrian
Update of /cvs/free/rpms/mpd/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv32137
Modified Files:
.cvsignore mpd.spec sources
Added Files:
6a071efa2794806ad5a2a62f0fcdee4b1843b41f.patch
mpd.git-00503c9251141b427457c17a9677444bf29c3992.patch
mpd.git-9e9d7b73d2165f197eeec12ee953add5f49746b7.patch
mpd.git-f3a5b753ae053eb1a862343b0fd3d62973cacc18.patch
Log Message:
* Tue Aug 25 2009 Adrian Reber <adrian(a)lisas.de> - 0.15.2
- updated to 0.15.2
- applied patches from David Woodhouse to fix
"mpd fails to play to usb audio device" (#731)
- fix description (#765)
6a071efa2794806ad5a2a62f0fcdee4b1843b41f.patch:
--- NEW FILE 6a071efa2794806ad5a2a62f0fcdee4b1843b41f.patch ---
>From 6a071efa2794806ad5a2a62f0fcdee4b1843b41f Mon Sep 17 00:00:00 2001
From: Max Kellermann<max(a)duempel.org>
Date: Wed, 22 Jul 2009 13:56:36 +0000
Subject: audio_format: initialize reverse_endian in audio_format_init()
This line was missing in the reverse_endian patch, and led to
undefined values and crashes in that attribute.
---
diff --git a/src/audio_format.h b/src/audio_format.h
index 54514ff..6373d1e 100644
--- a/src/audio_format.h
+++ b/src/audio_format.h
@@ -45,6 +45,7 @@ static inline void audio_format_init(struct audio_format *af,
af->sample_rate = sample_rate;
af->bits = bits;
af->channels = channels;
+ af->reverse_endian = 0;
}
static inline bool audio_format_defined(const struct audio_format *af)
--
cgit v0.8.1-8-g7b5c
mpd.git-00503c9251141b427457c17a9677444bf29c3992.patch:
--- NEW FILE mpd.git-00503c9251141b427457c17a9677444bf29c3992.patch ---
>From 00503c9251141b427457c17a9677444bf29c3992 Mon Sep 17 00:00:00 2001
From: David Woodhouse <David.Woodhouse(a)intel.com>
Date: Sun, 19 Jul 2009 16:43:08 +0100
Subject: [PATCH 1/1] Support wrong-endian ALSA output
---
src/output/alsa_plugin.c | 52 ++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 50 insertions(+), 2 deletions(-)
diff --git a/src/output/alsa_plugin.c b/src/output/alsa_plugin.c
index 818c83c..9f5c53b 100644
--- a/src/output/alsa_plugin.c
+++ b/src/output/alsa_plugin.c
@@ -183,6 +183,19 @@ get_bitformat(const struct audio_format *af)
return SND_PCM_FORMAT_UNKNOWN;
}
+static snd_pcm_format_t
+byteswap_bitformat(snd_pcm_format_t fmt)
+{
+ switch(fmt) {
+ case SND_PCM_FORMAT_S16_LE: return SND_PCM_FORMAT_S16_BE;
+ case SND_PCM_FORMAT_S24_LE: return SND_PCM_FORMAT_S24_BE;
+ case SND_PCM_FORMAT_S32_LE: return SND_PCM_FORMAT_S32_BE;
+ case SND_PCM_FORMAT_S16_BE: return SND_PCM_FORMAT_S16_LE;
+ case SND_PCM_FORMAT_S24_BE: return SND_PCM_FORMAT_S24_LE;
+ case SND_PCM_FORMAT_S32_BE: return SND_PCM_FORMAT_S32_LE;
+ }
+ return SND_PCM_FORMAT_UNKNOWN;
+}
/**
* Set up the snd_pcm_t object which was opened by the caller. Set up
* the configured settings and the audio format.
@@ -208,7 +221,6 @@ alsa_setup(struct alsa_data *ad, struct audio_format *audio_format,
configure_hw:
/* configure HW params */
snd_pcm_hw_params_alloca(&hwparams);
-
cmd = "snd_pcm_hw_params_any";
err = snd_pcm_hw_params_any(ad->pcm, hwparams);
if (err < 0)
@@ -236,13 +248,37 @@ configure_hw:
}
err = snd_pcm_hw_params_set_format(ad->pcm, hwparams, bitformat);
+ if (err == -EINVAL) {
+ snd_pcm_format_t fmt = byteswap_bitformat(bitformat);
+ err = snd_pcm_hw_params_set_format(ad->pcm, hwparams, fmt);
+ if (err == 0) {
+ g_debug("ALSA device \"%s\": converting %u bit to reverse-endian\n",
+ alsa_device(ad), audio_format->bits);
+ audio_format->reverse_endian = 1;
+ }
+ }
if (err == -EINVAL && (audio_format->bits == 24 ||
audio_format->bits == 16)) {
/* fall back to 32 bit, let pcm_convert.c do the conversion */
err = snd_pcm_hw_params_set_format(ad->pcm, hwparams,
SND_PCM_FORMAT_S32);
- if (err == 0)
+ if (err == 0) {
+ g_debug("ALSA device \"%s\": converting %u bit to 32 bit\n",
+ alsa_device(ad), audio_format->bits);
+ audio_format->bits = 32;
+ }
+ }
+ if (err == -EINVAL && (audio_format->bits == 24 ||
+ audio_format->bits == 16)) {
+ /* fall back to 32 bit, let pcm_convert.c do the conversion */
+ err = snd_pcm_hw_params_set_format(ad->pcm, hwparams,
+ byteswap_bitformat(SND_PCM_FORMAT_S32));
+ if (err == 0) {
+ g_debug("ALSA device \"%s\": converting %u bit to 32 bit backward-endian\n",
+ alsa_device(ad), audio_format->bits);
audio_format->bits = 32;
+ audio_format->reverse_endian = 1;
+ }
}
if (err == -EINVAL && audio_format->bits != 16) {
@@ -255,6 +291,17 @@ configure_hw:
audio_format->bits = 16;
}
}
+ if (err == -EINVAL && audio_format->bits != 16) {
+ /* fall back to 16 bit, let pcm_convert.c do the conversion */
+ err = snd_pcm_hw_params_set_format(ad->pcm, hwparams,
+ byteswap_bitformat(SND_PCM_FORMAT_S16));
+ if (err == 0) {
+ g_debug("ALSA device \"%s\": converting %u bit to 16 bit backward-endian\n",
+ alsa_device(ad), audio_format->bits);
+ audio_format->bits = 16;
+ audio_format->reverse_endian = 1;
+ }
+ }
if (err < 0) {
g_set_error(error, alsa_output_quark(), err,
@@ -470,6 +517,7 @@ static size_t
alsa_play(void *data, const void *chunk, size_t size, GError **error)
{
struct alsa_data *ad = data;
+ int i;
size /= ad->frame_size;
--
1.6.2.5
mpd.git-9e9d7b73d2165f197eeec12ee953add5f49746b7.patch:
--- NEW FILE mpd.git-9e9d7b73d2165f197eeec12ee953add5f49746b7.patch ---
>From 9e9d7b73d2165f197eeec12ee953add5f49746b7 Mon Sep 17 00:00:00 2001
From: David Woodhouse <David.Woodhouse(a)intel.com>
Date: Sun, 19 Jul 2009 16:24:43 +0100
Subject: [PATCH 1/1] Add audio_format_init() function
---
src/audio_format.h | 9 +++++++++
src/audio_parser.c | 10 +++++++---
src/decoder/_flac_common.c | 5 ++---
src/decoder/audiofile_plugin.c | 8 +++-----
src/decoder/faad_plugin.c | 6 +-----
src/decoder/ffmpeg_plugin.c | 9 +++++----
src/decoder/mad_plugin.c | 10 ++--------
src/decoder/mikmod_plugin.c | 4 +---
src/decoder/modplug_plugin.c | 4 +---
src/decoder/mp4ff_plugin.c | 6 +-----
src/decoder/mpcdec_plugin.c | 4 +---
src/decoder/sidplay_plugin.cxx | 4 +---
src/decoder/sndfile_decoder_plugin.c | 4 +---
src/decoder/vorbis_plugin.c | 3 +--
src/decoder/wavpack_plugin.c | 6 +++---
test/run_encoder.c | 8 +++-----
test/run_filter.c | 8 +++-----
test/run_output.c | 8 +++-----
test/software_volume.c | 7 ++-----
19 files changed, 50 insertions(+), 73 deletions(-)
diff --git a/src/audio_format.h b/src/audio_format.h
index 64087d0..e325c1b 100644
--- a/src/audio_format.h
+++ b/src/audio_format.h
@@ -36,6 +36,15 @@ static inline void audio_format_clear(struct audio_format *af)
af->channels = 0;
}
+static inline void audio_format_init(struct audio_format *af,
+ uint32_t sample_rate,
+ uint8_t bits, uint8_t channels)
+{
+ af->sample_rate = sample_rate;
+ af->bits = bits;
+ af->channels = channels;
+}
+
static inline bool audio_format_defined(const struct audio_format *af)
{
return af->sample_rate != 0;
diff --git a/src/audio_parser.c b/src/audio_parser.c
index 906b0f8..d29f5f4 100644
--- a/src/audio_parser.c
+++ b/src/audio_parser.c
@@ -41,6 +41,8 @@ audio_format_parse(struct audio_format *dest, const char *src, GError **error)
{
char *endptr;
unsigned long value;
+ uint32_t rate;
+ uint8_t bits, channels;
audio_format_clear(dest);
@@ -61,7 +63,7 @@ audio_format_parse(struct audio_format *dest, const char *src, GError **error)
return false;
}
- dest->sample_rate = value;
+ rate = value;
/* parse sample format */
@@ -81,7 +83,7 @@ audio_format_parse(struct audio_format *dest, const char *src, GError **error)
return false;
}
- dest->bits = value;
+ bits = value;
/* parse channel count */
@@ -93,7 +95,9 @@ audio_format_parse(struct audio_format *dest, const char *src, GError **error)
return false;
}
- dest->channels = value;
+ channels = value;
+
+ audio_format_init(dest, rate, bits, channels);
return true;
}
diff --git a/src/decoder/_flac_common.c b/src/decoder/_flac_common.c
index 713dfe9..7b34538 100644
--- a/src/decoder/_flac_common.c
+++ b/src/decoder/_flac_common.c
@@ -195,9 +195,8 @@ void flac_metadata_common_cb(const FLAC__StreamMetadata * block,
switch (block->type) {
case FLAC__METADATA_TYPE_STREAMINFO:
- data->audio_format.bits = (int8_t)si->bits_per_sample;
- data->audio_format.sample_rate = si->sample_rate;
- data->audio_format.channels = (int8_t)si->channels;
+ audio_format_init(&data->audio_format, si->sample_rate,
+ si->bits_per_sample, si->channels);
data->total_time = ((float)si->total_samples) / (si->sample_rate);
break;
case FLAC__METADATA_TYPE_VORBIS_COMMENT:
diff --git a/src/decoder/audiofile_plugin.c b/src/decoder/audiofile_plugin.c
index f66d90d..b4959f6 100644
--- a/src/decoder/audiofile_plugin.c
+++ b/src/decoder/audiofile_plugin.c
@@ -136,11 +136,9 @@ audiofile_stream_decode(struct decoder *decoder, struct input_stream *is)
afSetVirtualSampleFormat(af_fp, AF_DEFAULT_TRACK,
AF_SAMPFMT_TWOSCOMP, bits);
afGetVirtualSampleFormat(af_fp, AF_DEFAULT_TRACK, &fs, &bits);
- audio_format.bits = (uint8_t)bits;
- audio_format.sample_rate =
- (unsigned int)afGetRate(af_fp, AF_DEFAULT_TRACK);
- audio_format.channels =
- (uint8_t)afGetVirtualChannels(af_fp, AF_DEFAULT_TRACK);
+
+ audio_format_init(&audio_format, afGetRate(af_fp, AF_DEFAULT_TRACK),
+ bits, afGetVirtualChannels(af_fp, AF_DEFAULT_TRACK));
if (!audio_format_valid(&audio_format)) {
g_warning("Invalid audio format: %u:%u:%u\n",
diff --git a/src/decoder/faad_plugin.c b/src/decoder/faad_plugin.c
index d0537dd..1b8b2b7 100644
--- a/src/decoder/faad_plugin.c
+++ b/src/decoder/faad_plugin.c
@@ -262,11 +262,7 @@ faad_decoder_init(faacDecHandle decoder, struct decoder_buffer *buffer,
decoder_buffer_consume(buffer, nbytes);
- *audio_format = (struct audio_format){
- .bits = 16,
- .channels = channels,
- .sample_rate = sample_rate,
- };
+ audio_format_init(audio_format, sample_rate, 16, channels);
return true;
}
diff --git a/src/decoder/ffmpeg_plugin.c b/src/decoder/ffmpeg_plugin.c
index 03c46a7..f6003d2 100644
--- a/src/decoder/ffmpeg_plugin.c
+++ b/src/decoder/ffmpeg_plugin.c
@@ -267,6 +267,7 @@ ffmpeg_decode_internal(struct ffmpeg_context *ctx)
struct audio_format audio_format;
enum decoder_command cmd;
int total_time;
+ uint8_t bits;
total_time = 0;
@@ -275,13 +276,13 @@ ffmpeg_decode_internal(struct ffmpeg_context *ctx)
}
#if LIBAVCODEC_VERSION_INT >= ((51<<16)+(41<<8)+0)
- audio_format.bits = (uint8_t) av_get_bits_per_sample_format(codec_context->sample_fmt);
+ bits = (uint8_t) av_get_bits_per_sample_format(codec_context->sample_fmt);
#else
/* XXX fixme 16-bit for older ffmpeg (13 Aug 2007) */
- audio_format.bits = (uint8_t) 16;
+ bits = (uint8_t) 16;
#endif
- audio_format.sample_rate = (unsigned int)codec_context->sample_rate;
- audio_format.channels = codec_context->channels;
+ audio_format_init(&audio_format, codec_context->sample_rate, bits,
+ codec_context->channels);
if (!audio_format_valid(&audio_format)) {
g_warning("Invalid audio format: %u:%u:%u\n",
diff --git a/src/decoder/mad_plugin.c b/src/decoder/mad_plugin.c
index c6b9d32..85f4506 100644
--- a/src/decoder/mad_plugin.c
+++ b/src/decoder/mad_plugin.c
@@ -1148,13 +1148,6 @@ mp3_read(struct mp3_data *data, struct replay_gain_info **replay_gain_info_r)
return ret != DECODE_BREAK;
}
-static void mp3_audio_format(struct mp3_data *data, struct audio_format *af)
-{
- af->bits = 24;
- af->sample_rate = (data->frame).header.samplerate;
- af->channels = MAD_NCHANNELS(&(data->frame).header);
-}
-
static void
mp3_decode(struct decoder *decoder, struct input_stream *input_stream)
{
@@ -1170,7 +1163,8 @@ mp3_decode(struct decoder *decoder, struct input_stream *input_stream)
return;
}
- mp3_audio_format(&data, &audio_format);
+ audio_format_init(&audio_format, data.frame.header.samplerate, 24,
+ MAD_NCHANNELS(&data.frame.header));
decoder_initialized(decoder, &audio_format,
data.input_stream->seekable, data.total_time);
diff --git a/src/decoder/mikmod_plugin.c b/src/decoder/mikmod_plugin.c
index 065c343..e7b7bfb 100644
--- a/src/decoder/mikmod_plugin.c
+++ b/src/decoder/mikmod_plugin.c
@@ -175,9 +175,7 @@ mod_decode(struct decoder *decoder, const char *path)
return;
}
- audio_format.bits = 16;
- audio_format.sample_rate = 44100;
- audio_format.channels = 2;
+ audio_format_init(&audio_format, 44100, 16, 2);
secPerByte =
1.0 / ((audio_format.bits * audio_format.channels / 8.0) *
diff --git a/src/decoder/modplug_plugin.c b/src/decoder/modplug_plugin.c
index 31f0a47..6c375e6 100644
--- a/src/decoder/modplug_plugin.c
+++ b/src/decoder/modplug_plugin.c
@@ -121,9 +121,7 @@ mod_decode(struct decoder *decoder, struct input_stream *is)
return;
}
- audio_format.bits = 16;
- audio_format.sample_rate = 44100;
- audio_format.channels = 2;
+ audio_format_init(&audio_format, 44100, 16, 2);
sec_perbyte =
1.0 / ((audio_format.bits * audio_format.channels / 8.0) *
diff --git a/src/decoder/mp4ff_plugin.c b/src/decoder/mp4ff_plugin.c
index cf93829..d2c63f9 100644
--- a/src/decoder/mp4ff_plugin.c
+++ b/src/decoder/mp4ff_plugin.c
@@ -131,11 +131,7 @@ mp4_faad_new(mp4ff_t *mp4fh, int *track_r, struct audio_format *audio_format)
}
*track_r = track;
- *audio_format = (struct audio_format){
- .bits = 16,
- .channels = channels,
- .sample_rate = sample_rate,
- };
+ audio_format_init(audio_format, sample_rate, 16, channels);
if (!audio_format_valid(audio_format)) {
g_warning("Invalid audio format: %u:%u:%u\n",
diff --git a/src/decoder/mpcdec_plugin.c b/src/decoder/mpcdec_plugin.c
index 26349f9..a684da1 100644
--- a/src/decoder/mpcdec_plugin.c
+++ b/src/decoder/mpcdec_plugin.c
@@ -193,9 +193,7 @@ mpcdec_decode(struct decoder *mpd_decoder, struct input_stream *is)
mpc_demux_get_info(demux, &info);
#endif
- audio_format.bits = 24;
- audio_format.channels = info.channels;
- audio_format.sample_rate = info.sample_freq;
+ audio_format_init(&audio_format, info.sample_freq, 24, info.channels);
if (!audio_format_valid(&audio_format)) {
#ifndef MPC_IS_OLD_API
diff --git a/src/decoder/sidplay_plugin.cxx b/src/decoder/sidplay_plugin.cxx
index c62e6b4..54ab746 100644
--- a/src/decoder/sidplay_plugin.cxx
+++ b/src/decoder/sidplay_plugin.cxx
@@ -103,9 +103,7 @@ sidplay_file_decode(struct decoder *decoder, const char *path_fs)
/* initialize the MPD decoder */
struct audio_format audio_format;
- audio_format.sample_rate = 48000;
- audio_format.bits = 16;
- audio_format.channels = 2;
+ audio_format_init(&audio_format, 48000, 16, 2);
decoder_initialized(decoder, &audio_format, false, -1);
diff --git a/src/decoder/vorbis_plugin.c b/src/decoder/vorbis_plugin.c
index d4f81e9..bab1d57 100644
--- a/src/decoder/vorbis_plugin.c
+++ b/src/decoder/vorbis_plugin.c
@@ -324,8 +324,7 @@ vorbis_stream_decode(struct decoder *decoder,
vorbis_info *vi = ov_info(&vf, -1);
struct replay_gain_info *new_rgi;
- audio_format.channels = vi->channels;
- audio_format.sample_rate = vi->rate;
+ audio_format_init(&audio_format, vi->rate, 16, vi->channels);
if (!audio_format_valid(&audio_format)) {
g_warning("Invalid audio format: %u:%u:%u\n",
diff --git a/src/decoder/wavpack_plugin.c b/src/decoder/wavpack_plugin.c
index 821536f..f3d7011 100644
--- a/src/decoder/wavpack_plugin.c
+++ b/src/decoder/wavpack_plugin.c
@@ -145,9 +145,9 @@ wavpack_decode(struct decoder *decoder, WavpackContext *wpc, bool can_seek,
int bytes_per_sample, output_sample_size;
int position;
- audio_format.sample_rate = WavpackGetSampleRate(wpc);
- audio_format.channels = WavpackGetReducedChannels(wpc);
- audio_format.bits = WavpackGetBitsPerSample(wpc);
+ audio_format_init(&audio_format, WavpackGetSampleRate(wpc),
+ WavpackGetBitsPerSample(wpc),
+ WavpackGetReducedChannels(wpc));
/* round bitwidth to 8-bit units */
audio_format.bits = (audio_format.bits + 7) & (~7);
diff --git a/test/run_encoder.c b/test/run_encoder.c
index 8cb1c6d..a9b00e9 100644
--- a/test/run_encoder.c
+++ b/test/run_encoder.c
@@ -41,11 +41,7 @@ encoder_to_stdout(struct encoder *encoder)
int main(int argc, char **argv)
{
GError *error = NULL;
- struct audio_format audio_format = {
- .sample_rate = 44100,
- .bits = 16,
- .channels = 2,
- };
+ struct audio_format audio_format;
bool ret;
const char *encoder_name;
const struct encoder_plugin *plugin;
@@ -66,6 +62,8 @@ int main(int argc, char **argv)
else
encoder_name = "vorbis";
+ audio_format_init(&audio_format, 44100, 16, 2);
+
/* create the encoder */
plugin = encoder_plugin_get(encoder_name);
diff --git a/test/run_output.c b/test/run_output.c
index adf6e1d..a280f88 100644
--- a/test/run_output.c
+++ b/test/run_output.c
@@ -100,11 +100,7 @@ load_audio_output(struct audio_output *ao, const char *name)
int main(int argc, char **argv)
{
struct audio_output ao;
- struct audio_format audio_format = {
- .sample_rate = 44100,
- .bits = 16,
- .channels = 2,
- };
+ struct audio_format audio_format;
bool success;
GError *error = NULL;
char buffer[4096];
@@ -116,6 +112,8 @@ int main(int argc, char **argv)
return 1;
}
+ audio_format_init(&audio_format, 44100, 16, 2);
+
g_thread_init(NULL);
/* read configuration file (mpd.conf) */
diff --git a/test/software_volume.c b/test/software_volume.c
index 9a9fd56..9e8c8e7 100644
--- a/test/software_volume.c
+++ b/test/software_volume.c
@@ -35,11 +35,7 @@
int main(int argc, char **argv)
{
GError *error = NULL;
- struct audio_format audio_format = {
- .sample_rate = 48000,
- .bits = 16,
- .channels = 2,
- };
+ struct audio_format audio_format;
bool ret;
static char buffer[4096];
ssize_t nbytes;
@@ -57,6 +53,7 @@ int main(int argc, char **argv)
return 1;
}
}
+ audio_format_init(&audio_format, 48000, 16, 2);
while ((nbytes = read(0, buffer, sizeof(buffer))) > 0) {
pcm_volume(buffer, nbytes, &audio_format, PCM_VOLUME_1 / 2);
--
1.6.2.5
mpd.git-f3a5b753ae053eb1a862343b0fd3d62973cacc18.patch:
--- NEW FILE mpd.git-f3a5b753ae053eb1a862343b0fd3d62973cacc18.patch ---
>From f3a5b753ae053eb1a862343b0fd3d62973cacc18 Mon Sep 17 00:00:00 2001
From: David Woodhouse <David.Woodhouse(a)intel.com>
Date: Sun, 19 Jul 2009 16:42:19 +0100
Subject: [PATCH] Add reverse_endian field to struct audio_format and handle conversion
---
Makefile.am | 2 +
src/audio_format.h | 5 ++-
src/filter/convert_filter_plugin.c | 1 +
src/output_thread.c | 10 +++--
src/pcm_byteswap.c | 71 ++++++++++++++++++++++++++++++++++++
src/pcm_byteswap.h | 50 +++++++++++++++++++++++++
src/pcm_convert.c | 18 +++++++++
7 files changed, 152 insertions(+), 5 deletions(-)
create mode 100644 src/pcm_byteswap.c
create mode 100644 src/pcm_byteswap.h
diff --git a/Makefile.am b/Makefile.am
index 5c53ca5..e53dfb1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -114,6 +114,7 @@ mpd_headers = \
src/pcm_convert.h \
src/pcm_volume.h \
src/pcm_mix.h \
+ src/pcm_byteswap.h \
src/pcm_channels.h \
src/pcm_format.h \
src/pcm_resample.h \
@@ -218,6 +219,7 @@ src_mpd_SOURCES = \
src/pcm_convert.c \
src/pcm_volume.c \
src/pcm_mix.c \
+ src/pcm_byteswap.c \
src/pcm_channels.c \
src/pcm_format.c \
src/pcm_resample.c \
diff --git a/src/audio_format.h b/src/audio_format.h
index e325c1b..54514ff 100644
--- a/src/audio_format.h
+++ b/src/audio_format.h
@@ -27,6 +27,7 @@ struct audio_format {
uint32_t sample_rate;
uint8_t bits;
uint8_t channels;
+ uint8_t reverse_endian;
};
static inline void audio_format_clear(struct audio_format *af)
@@ -34,6 +35,7 @@ static inline void audio_format_clear(struct audio_format *af)
af->sample_rate = 0;
af->bits = 0;
af->channels = 0;
+ af->reverse_endian = 0;
}
static inline void audio_format_init(struct audio_format *af,
@@ -97,7 +99,8 @@ static inline bool audio_format_equals(const struct audio_format *a,
{
return a->sample_rate == b->sample_rate &&
a->bits == b->bits &&
- a->channels == b->channels;
+ a->channels == b->channels &&
+ a->reverse_endian == b->reverse_endian;
}
/**
diff --git a/src/pcm_byteswap.c b/src/pcm_byteswap.c
new file mode 100644
index 0000000..6bdec1f
--- /dev/null
+++ b/src/pcm_byteswap.c
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2003-2009 The Music Player Daemon Project
+ * http://www.musicpd.org
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#include "pcm_byteswap.h"
+#include "pcm_buffer.h"
+
+#include <glib.h>
+
+#include <assert.h>
+
+#undef G_LOG_DOMAIN
+#define G_LOG_DOMAIN "pcm"
+
+static inline uint16_t swab16(uint16_t x)
+{
+ return (x << 8) | (x >> 8);
+}
+
+const int16_t *pcm_byteswap_16(struct pcm_buffer *buffer,
+ const int16_t *src, size_t len)
+{
+ unsigned i;
+ int16_t *buf = pcm_buffer_get(buffer, len);
+
+ if (!buf)
+ return NULL;
+
+ for (i = 0; i < len / 2; i++)
+ buf[i] = swab16(src[i]);
+
+ return buf;
+}
+
+static inline uint32_t swab32(uint32_t x)
+{
+ return (x << 24) |
+ ((x & 0xff00) << 8) |
+ ((x & 0xff0000) >> 8) |
+ (x >> 24);
+}
+
+const int32_t *pcm_byteswap_32(struct pcm_buffer *buffer,
+ const int32_t *src, size_t len)
+{
+ unsigned i;
+ int32_t *buf = pcm_buffer_get(buffer, len);
+
+ if (!buf)
+ return NULL;
+
+ for (i = 0; i < len / 4; i++)
+ buf[i] = swab32(src[i]);
+
+ return buf;
+}
diff --git a/src/pcm_byteswap.h b/src/pcm_byteswap.h
new file mode 100644
index 0000000..e1196d9
--- /dev/null
+++ b/src/pcm_byteswap.h
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2003-2009 The Music Player Daemon Project
+ * http://www.musicpd.org
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef MPD_PCM_BYTESWAP_H
+#define MPD_PCM_BYTESWAP_H
+
+#include <stdint.h>
+#include <stddef.h>
+
+struct pcm_buffer;
+
+/**
+ * Changes the endianness of 16 bit PCM data.
+ *
+ * @param buffer the destination pcm_buffer object
+ * @param src the source PCM buffer
+ * @param src_size the number of bytes in #src
+ * @return the destination buffer
+ */
+const int16_t *pcm_byteswap_16(struct pcm_buffer *buffer,
+ const int16_t *src, size_t len);
+
+/**
+ * Changes the endianness of 32-bit (or 24-bit) PCM data.
+ *
+ * @param buffer the destination pcm_buffer object
+ * @param src the source PCM buffer
+ * @param src_size the number of bytes in #src
+ * @return the destination buffer
+ */
+const int32_t *pcm_byteswap_32(struct pcm_buffer *buffer,
+ const int32_t *src, size_t len);
+
+#endif
diff --git a/src/pcm_convert.c b/src/pcm_convert.c
index ebb4adf..a96c338 100644
--- a/src/pcm_convert.c
+++ b/src/pcm_convert.c
@@ -83,6 +83,12 @@ pcm_convert_16(struct pcm_convert_state *state,
dest_format->sample_rate,
&len);
+ if (dest_format->reverse_endian) {
+ buf = pcm_byteswap_16(&state->format_buffer, buf, len);
+ if (!buf)
+ g_error("pcm_byteswap_16() failed");
+ }
+
*dest_size_r = len;
return buf;
}
@@ -120,6 +126,12 @@ pcm_convert_24(struct pcm_convert_state *state,
dest_format->sample_rate,
&len);
+ if (dest_format->reverse_endian) {
+ buf = pcm_byteswap_32(&state->format_buffer, buf, len);
+ if (!buf)
+ g_error("pcm_byteswap_32() failed");
+ }
+
*dest_size_r = len;
return buf;
}
@@ -157,6 +169,12 @@ pcm_convert_32(struct pcm_convert_state *state,
dest_format->sample_rate,
&len);
+ if (dest_format->reverse_endian) {
+ buf = pcm_byteswap_32(&state->format_buffer, buf, len);
+ if (!buf)
+ g_error("pcm_byteswap_32() failed");
+ }
+
*dest_size_r = len;
return buf;
}
--
1.6.2.5
Index: .cvsignore
===================================================================
RCS file: /cvs/free/rpms/mpd/devel/.cvsignore,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- .cvsignore 29 Jun 2009 12:13:10 -0000 1.5
+++ .cvsignore 25 Aug 2009 11:59:29 -0000 1.6
@@ -1 +1 @@
-mpd-0.15.tar.bz2
+mpd-0.15.2.tar.bz2
Index: mpd.spec
===================================================================
RCS file: /cvs/free/rpms/mpd/devel/mpd.spec,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- mpd.spec 29 Jun 2009 12:13:10 -0000 1.10
+++ mpd.spec 25 Aug 2009 11:59:29 -0000 1.11
@@ -1,13 +1,17 @@
Name: mpd
-Version: 0.15
+Version: 0.15.2
Release: 1%{?dist}
Summary: The Music Player Daemon
License: GPLv2+
Group: Applications/Multimedia
URL: http://mpd.wikia.com/
-Source: http://downloads.sourceforge.net/musicpd/mpd-0.15.tar.bz2
+Source: http://downloads.sourceforge.net/musicpd/mpd-0.15.2.tar.bz2
Source1: mpd.init
Source2: 95-grant-audio-devices-to-mpd.fdi
+Patch0: mpd.git-9e9d7b73d2165f197eeec12ee953add5f49746b7.patch
+Patch1: mpd.git-f3a5b753ae053eb1a862343b0fd3d62973cacc18.patch
+Patch2: mpd.git-00503c9251141b427457c17a9677444bf29c3992.patch
+Patch3: 6a071efa2794806ad5a2a62f0fcdee4b1843b41f.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -38,6 +42,7 @@
BuildRequires: bzip2-devel
BuildRequires: zziplib-devel
BuildRequires: sqlite-devel
+BuildRequires: autoconf
Requires(pre): shadow-utils
Requires(post): chkconfig
Requires(preun): chkconfig /sbin/service
@@ -50,10 +55,15 @@
Vorbis, FLAC, Mod, AAC and wave files) and managing playlists. MPD is designed
for integrating a computer into a stereo system that provides control for music
playback over a local network. It is also makes a great desktop music player,
-especially if your a console junkie, like frontend options, or restart X often.
+especially if you are a console junkie, like frontend options or restart X often.
%prep
%setup -q
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+autoreconf --force --install
%build
%configure --enable-mikmod --enable-bzip2 --enable-zip
@@ -149,6 +159,12 @@
%ghost %{_localstatedir}/lib/%{name}/mpdstate
%changelog
+* Tue Aug 25 2009 Adrian Reber <adrian(a)lisas.de> - 0.15.2
+- updated to 0.15.2
+- applied patches from David Woodhouse to fix
+ "mpd fails to play to usb audio device" (#731)
+- fix description (#765)
+
* Mon Jun 29 2009 Adrian Reber <adrian(a)lisas.de> - 0.15-1
- updated to 0.15
- added "Conflicts: mpich2" (#593)
Index: sources
===================================================================
RCS file: /cvs/free/rpms/mpd/devel/sources,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- sources 29 Jun 2009 12:13:10 -0000 1.5
+++ sources 25 Aug 2009 11:59:29 -0000 1.6
@@ -1 +1 @@
-2ed93a60bd703ba46d6794e12cfb5f1d mpd-0.15.tar.bz2
+869779fdf592ac45d067c7dec228cb51 mpd-0.15.2.tar.bz2
15 years, 3 months