[pulseaudio-commits] r1431 - in /trunk: Makefile.am configure.ac src/modules/module-alsa-sink.c
svnmailer-noreply at 0pointer.de
svnmailer-noreply at 0pointer.de
Thu Mar 1 09:13:30 PST 2007
Author: ossman
Date: Thu Mar 1 18:13:26 2007
New Revision: 1431
URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=3D1431&root=3Dpulseaudio&vi=
ew=3Drev
Log:
Handle when ALSA tweaks our sample spec so much that the frame size changes.
(closes #57).
Modified:
trunk/Makefile.am
trunk/configure.ac
trunk/src/modules/module-alsa-sink.c
Modified: trunk/Makefile.am
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/Makefile.am?rev=3D1431&ro=
ot=3Dpulseaudio&r1=3D1430&r2=3D1431&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/Makefile.am (original)
+++ trunk/Makefile.am Thu Mar 1 18:13:26 2007
@@ -17,8 +17,8 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA.
=
-EXTRA_DIST =3D bootstrap.sh LICENSE GPL LGPL doxygen/Makefile.am doxygen/M=
akefile.in doxygen/doxygen.conf.in README todo
-SUBDIRS=3Dlibltdl src doxygen
+EXTRA_DIST =3D config.rpath m4/ChangeLog bootstrap.sh LICENSE GPL LGPL do=
xygen/Makefile.am doxygen/Makefile.in doxygen/doxygen.conf.in README todo
+SUBDIRS=3D libltdl src doxygen
=
MAINTAINERCLEANFILES =3D
noinst_DATA =3D
@@ -46,3 +46,5 @@
$(MAKE) -C doxygen doxygen
=
.PHONY: homepage distcleancheck doxygen
+
+ACLOCAL_AMFLAGS =3D -I m4
Modified: trunk/configure.ac
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/configure.ac?rev=3D1431&r=
oot=3Dpulseaudio&r1=3D1430&r2=3D1431&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/configure.ac (original)
+++ trunk/configure.ac Thu Mar 1 18:13:26 2007
@@ -772,6 +772,7 @@
AC_CONFIG_FILES([
Makefile
src/Makefile
+po/Makefile.in
libpulse.pc
libpulse-simple.pc
libpulse-browse.pc
Modified: trunk/src/modules/module-alsa-sink.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/modules/module-alsa-s=
ink.c?rev=3D1431&root=3Dpulseaudio&r1=3D1430&r2=3D1431&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/src/modules/module-alsa-sink.c (original)
+++ trunk/src/modules/module-alsa-sink.c Thu Mar 1 18:13:26 2007
@@ -159,7 +159,11 @@
memchunk =3D &u->memchunk;
}
=
- assert(memchunk->memblock && memchunk->memblock->data && memchunk-=
>length && memchunk->memblock->length && (memchunk->length % u->frame_size)=
=3D=3D 0);
+ assert(memchunk->memblock);
+ assert(memchunk->memblock->data);
+ assert(memchunk->length);
+ assert(memchunk->memblock->length);
+ assert((memchunk->length % u->frame_size) =3D=3D 0);
=
if ((frames =3D snd_pcm_writei(u->pcm_handle, (uint8_t*) memchunk-=
>memblock->data + memchunk->index, memchunk->length / u->frame_size)) < 0) {
if (frames =3D=3D -EAGAIN)
@@ -415,6 +419,9 @@
goto fail;
}
=
+ /* ALSA might tweak the sample spec, so recalculate the frame size */
+ frame_size =3D pa_frame_size(&ss);
+
if (ss.channels !=3D map.channels)
/* Seems ALSA didn't like the channel number, so let's fix the cha=
nnel map */
pa_channel_map_init_auto(&map, ss.channels, PA_CHANNEL_MAP_ALSA);
More information about the pulseaudio-commits
mailing list