Your message dated Thu, 27 Jan 2005 12:32:05 -0500
with message-id <[EMAIL PROTECTED]>
and subject line Bug#292014: fixed in xmms-jackasyn 0.1-2
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 24 Jan 2005 15:48:03 +0000
>From [EMAIL PROTECTED] Mon Jan 24 07:48:02 2005
Return-path: <[EMAIL PROTECTED]>
Received: from girumpc.elec.qmul.ac.uk (localhost.localdomain) [138.37.33.122] 
        by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
        id 1Ct6Re-0003SL-00; Mon, 24 Jan 2005 07:48:02 -0800
Received: from piem by localhost.localdomain with local (Exim 4.34)
        id 1Ct6PU-0002vx-JD; Mon, 24 Jan 2005 15:45:48 +0000
Content-Type: multipart/mixed; boundary="===============0613812471=="
MIME-Version: 1.0
From: Paul Brossier <[EMAIL PROTECTED]>
To: Debian Bug Tracking System <[EMAIL PROTECTED]>
Subject: xmms-jackasyn: missing endianness check produces garbage output
Reply-To: Paul Brossier <[EMAIL PROTECTED]>
X-Mailer: reportbug 3.2
Date: Mon, 24 Jan 2005 15:45:48 +0000
Message-Id: <[EMAIL PROTECTED]>
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
        autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 

This is a multi-part MIME message sent by reportbug.

--===============0613812471==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Package: xmms-jackasyn
Version: 0.1-1
Severity: grave
Tags: patch
Justification: renders package unusable

on big endian machine, some input format such as ogg are not correctly
converted. the endianness check is missing from the configure.in. the
attached patch says it all.

another unrelated issue is that when skipping from a stereo file to a
mono file, the right channel remains full of the last buffer read from
the mono file and read it in loop. adding a mono_to_stereo conversion
function as found in current xmms output fixes this (see 2nd patch).

bye, paul

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: powerpc (ppc)
Kernel: Linux 2.6.9-powerpc
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)

Versions of packages xmms-jackasyn depends on:
ii  libc6                    2.3.2.ds1-20    GNU C Library: Shared libraries an
ii  libglib1.2               1.2.10-9        The GLib library of C routines
ii  libgtk1.2                1.2.10-17       The GIMP Toolkit set of widgets fo
ii  libjack0.80.0-0          0.99.0-2        JACK Audio Connection Kit (librari
ii  libjackasyn0             0.11-1          The Asynchrounous JACK Library
ii  libx11-6                 4.3.0.dfsg.1-10 X Window System protocol client li
ii  libxext6                 4.3.0.dfsg.1-10 X Window System miscellaneous exte
ii  libxi6                   4.3.0.dfsg.1-10 X Window System Input extension li
ii  xlibs                    4.3.0.dfsg.1-10 X Keyboard Extension (XKB) configu
ii  xmms                     1.2.10-2        Versatile X audio player that look

-- no debconf information

--===============0613812471==
Content-Type: text/x-m4; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="xmms-jackasyn_check_endian.diff"

--- ../xmms-jackasyn-0.1/configure.in   2002-10-30 17:24:26.000000000 +0000
+++ xmms-jackasyn-0.1/configure.in      2005-01-24 14:05:58.000000000 +0000
@@ -12,6 +12,7 @@
 AC_PROG_CC
 AC_PROG_INSTALL
 
+AC_C_BIGENDIAN
 dnl Checks for header files.
 AC_STDC_HEADERS
 AC_CHECK_HEADERS(fcntl.h sys/time.h)

--===============0613812471==
Content-Type: text/x-c; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="xmms-jackasyn_convert_stereo.diff"

--- ../xmms-jackasyn-0.1/audio.c        2002-10-30 18:11:37.000000000 +0000
+++ xmms-jackasyn-0.1/audio.c   2005-01-24 15:37:01.254287808 +0000
@@ -38,6 +38,7 @@
 static gboolean realtime, select_works;
 
 static int (*jackxmms_convert_func)(void **data, int length);
+static int (*jackxmms_stereo_convert_func)(void **data, int length, int fmt);
 
 struct format_info {
        union {
@@ -295,6 +296,10 @@
        if (jackxmms_convert_func != NULL)
                length = jackxmms_convert_func(&data, length);
 
+       if (jackxmms_stereo_convert_func != NULL)
+               length = jackxmms_stereo_convert_func(&data, length,
+                                                output.format.oss);
+
        if (effect.frequency == output.frequency)
                output_bytes += write_all(fd, data, length);
        else
@@ -478,7 +483,7 @@
                close(fd);
        }
        g_free(device_name);
-       jackxmms_get_convert_buffer(0);
+       jackxmms_free_convert_buffer();
        wr_index = 0;
        rd_index = 0;
 }
@@ -614,6 +619,11 @@
        /* FIXME: Handle mono/stereo only soundcards */
        stereo = output.channels - 1;
        ioctl(fd, SNDCTL_DSP_STEREO, &stereo);
+       output.channels = stereo + 1;
+
+       jackxmms_stereo_convert_func = 
jackxmms_get_stereo_convert_func(output.channels,
+                                                             effect.channels);
+       
        if (ioctl(fd, SNDCTL_DSP_SPEED, &output.frequency) == -1)
                g_warning("SNDCTL_DSP_SPEED ioctl failed: %s", strerror(errno));
 
--- ../xmms-jackasyn-0.1/convert.c      2002-10-15 11:55:20.000000000 +0100
+++ xmms-jackasyn-0.1/convert.c 2005-01-23 13:13:57.000000000 +0000
@@ -18,19 +18,29 @@
 
 #include "jack.h"
 
-void* jackxmms_get_convert_buffer(size_t size)
+struct buffer {
+       void *buffer;
+       int size;
+} format_buffer, stereo_buffer;
+
+
+static void* jackxmms_get_convert_buffer(struct buffer *buffer, size_t size)
 {
-       static size_t length;
-       static void *buffer;
+       if (size > 0 && size <= buffer->size)
+               return buffer->buffer;
 
-       if (size > 0 && size <= length)
-               return buffer;
+       buffer->size = size;
+       buffer->buffer = g_realloc(buffer->buffer, size);
+       return buffer->buffer;
+}
 
-       length = size;
-       buffer = g_realloc(buffer, size);
-       return buffer;
+void jackxmms_free_convert_buffer(void)
+{
+       jackxmms_get_convert_buffer(&format_buffer, 0);
+       jackxmms_get_convert_buffer(&stereo_buffer, 0);
 }
 
+
 static int convert_swap_endian(void **data, int length)
 {
        guint16 *ptr = *data;
@@ -131,7 +141,7 @@
        guint8 *input = *data;
        guint16 *output;
        int i;
-       *data = jackxmms_get_convert_buffer(length * 2);
+       *data = jackxmms_get_convert_buffer(&format_buffer, length * 2);
        output = *data;
        for (i = 0; i < length; i++)
                *output++ = *input++ << 8;
@@ -144,7 +154,7 @@
        guint8 *input = *data;
        guint16 *output;
        int i;
-       *data = jackxmms_get_convert_buffer(length * 2);
+       *data = jackxmms_get_convert_buffer(&format_buffer, length * 2);
        output = *data;
        for (i = 0; i < length; i++)
                *output++ = (*input++ << 8) ^ (1 << 15);
@@ -158,7 +168,7 @@
        guint8 *input = *data;
        guint16 *output;
        int i;
-       *data = jackxmms_get_convert_buffer(length * 2);
+       *data = jackxmms_get_convert_buffer(&format_buffer, length * 2);
        output = *data;
        for (i = 0; i < length; i++)
                *output++ = *input++;
@@ -171,7 +181,7 @@
        guint8 *input = *data;
        guint16 *output;
        int i;
-       *data = jackxmms_get_convert_buffer(length * 2);
+       *data = jackxmms_get_convert_buffer(&format_buffer, length * 2);
        output = *data;
        for (i = 0; i < length; i++)
                *output++ = *input++ ^ (1 << 7);
@@ -284,3 +294,149 @@
                  "Input: %d; Output %d.", input, output);
        return NULL;
 }
+
+static int convert_mono_to_stereo(void **data, int length, int fmt)
+{
+       int i;
+       void *outbuf = jackxmms_get_convert_buffer(&stereo_buffer, length * 2);
+
+       if (fmt == AFMT_U8 || fmt ==  AFMT_S8)
+       {
+               guint8 *output = outbuf, *input = *data;
+               for (i = 0; i < length; i++)
+               {
+                       *output++ = *input;
+                       *output++ = *input;
+                       input++;
+               }
+       }
+       else 
+       {
+               guint16 *output = outbuf, *input = *data;
+               for (i = 0; i < length / 2; i++)
+               {
+                       *output++ = *input;
+                       *output++ = *input;
+                       input++;
+               }
+       }
+       *data = outbuf;
+
+       return length * 2;
+}
+
+static int convert_stereo_to_mono(void **data, int length, int fmt)
+{
+       int i;
+
+       switch (fmt)
+       {
+               case AFMT_U8:
+               {
+                       guint8 *output = *data, *input = *data;
+                       for (i = 0; i < length / 2; i++)
+                       {
+                               guint16 tmp;
+                               tmp = *input++;
+                               tmp += *input++;
+                               *output++ = tmp / 2;
+                       }
+               }
+               break;
+               case AFMT_S8:
+               {
+                       gint8 *output = *data, *input = *data;
+                       for (i = 0; i < length / 2; i++)
+                       {
+                               gint16 tmp;
+                               tmp = *input++;
+                               tmp += *input++;
+                               *output++ = tmp / 2;
+                       }
+               }
+               break;
+               case AFMT_U16_LE:
+               {
+                       guint16 *output = *data, *input = *data;
+                       for (i = 0; i < length / 4; i++)
+                       {
+                               guint32 tmp;
+                               guint16 stmp;
+                               tmp = GUINT16_FROM_LE(*input);
+                               input++;
+                               tmp += GUINT16_FROM_LE(*input);
+                               input++;
+                               stmp = tmp / 2;
+                               *output++ = GUINT16_TO_LE(stmp);
+                       }
+               }
+               break;
+               case AFMT_U16_BE:
+               {
+                       guint16 *output = *data, *input = *data;
+                       for (i = 0; i < length / 4; i++)
+                       {
+                               guint32 tmp;
+                               guint16 stmp;
+                               tmp = GUINT16_FROM_BE(*input);
+                               input++;
+                               tmp += GUINT16_FROM_BE(*input);
+                               input++;
+                               stmp = tmp / 2;
+                               *output++ = GUINT16_TO_BE(stmp);
+                       }
+               }
+               break;
+               case AFMT_S16_LE:
+               {
+                       gint16 *output = *data, *input = *data;
+                       for (i = 0; i < length / 4; i++)
+                       {
+                               gint32 tmp;
+                               gint16 stmp;
+                               tmp = GINT16_FROM_LE(*input);
+                               input++;
+                               tmp += GINT16_FROM_LE(*input);
+                               input++;
+                               stmp = tmp / 2;
+                               *output++ = GINT16_TO_LE(stmp);
+                       }
+               }
+               break;
+               case AFMT_S16_BE:
+               {
+                       gint16 *output = *data, *input = *data;
+                       for (i = 0; i < length / 4; i++)
+                       {
+                               gint32 tmp;
+                               gint16 stmp;
+                               tmp = GINT16_FROM_BE(*input);
+                               input++;
+                               tmp += GINT16_FROM_BE(*input);
+                               input++;
+                               stmp = tmp / 2;
+                               *output++ = GINT16_TO_BE(stmp);
+                       }
+               }
+               break;
+               default:
+                       g_error("unknown format");
+       }
+
+       return length / 2;
+}
+
+int (*jackxmms_get_stereo_convert_func(int output, int input))(void **, int, 
int)
+{
+       if (output == input)
+               return NULL;
+
+       if (input == 1 && output == 2)
+               return convert_mono_to_stereo;
+       if (input == 2 && output == 1)
+               return convert_stereo_to_mono;
+
+       g_warning("Input has %d channels, soundcard uses %d channels\n"
+                 "No conversion is available", input, output);
+       return NULL;
+}
--- ../xmms-jackasyn-0.1/jack.h 2002-10-15 11:55:23.000000000 +0100
+++ xmms-jackasyn-0.1/jack.h    2005-01-23 13:29:51.000000000 +0000
@@ -78,8 +78,9 @@
 int jackxmms_get_written_time(void);
 void jackxmms_set_audio_params(void);
 
-void* jackxmms_get_convert_buffer(size_t size);
+void jackxmms_free_convert_buffer(void);
 int (*jackxmms_get_convert_func(int output, int input))(void **, int);
+int (*jackxmms_get_stereo_convert_func(int output, int input))(void **, int, 
int);
 
 #define DEV_DSP "/dev/dsp"
 #define DEV_MIXER "/dev/mixer"

--===============0613812471==--

---------------------------------------
Received: (at 292014-close) by bugs.debian.org; 27 Jan 2005 17:35:41 +0000
>From [EMAIL PROTECTED] Thu Jan 27 09:35:41 2005
Return-path: <[EMAIL PROTECTED]>
Received: from newraff.debian.org [208.185.25.31] (mail)
        by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
        id 1CuDYS-0005O4-00; Thu, 27 Jan 2005 09:35:40 -0800
Received: from katie by newraff.debian.org with local (Exim 3.35 1 (Debian))
        id 1CuDUz-00053f-00; Thu, 27 Jan 2005 12:32:05 -0500
From: Paul Brossier <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
X-Katie: $Revision: 1.55 $
Subject: Bug#292014: fixed in xmms-jackasyn 0.1-2
Message-Id: <[EMAIL PROTECTED]>
Sender: Archive Administrator <[EMAIL PROTECTED]>
Date: Thu, 27 Jan 2005 12:32:05 -0500
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
        autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 

Source: xmms-jackasyn
Source-Version: 0.1-2

We believe that the bug you reported is fixed in the latest version of
xmms-jackasyn, which is due to be installed in the Debian FTP archive:

xmms-jackasyn_0.1-2.diff.gz
  to pool/main/x/xmms-jackasyn/xmms-jackasyn_0.1-2.diff.gz
xmms-jackasyn_0.1-2.dsc
  to pool/main/x/xmms-jackasyn/xmms-jackasyn_0.1-2.dsc
xmms-jackasyn_0.1-2_alpha.deb
  to pool/main/x/xmms-jackasyn/xmms-jackasyn_0.1-2_alpha.deb
xmms-jackasyn_0.1-2_i386.deb
  to pool/main/x/xmms-jackasyn/xmms-jackasyn_0.1-2_i386.deb
xmms-jackasyn_0.1-2_powerpc.deb
  to pool/main/x/xmms-jackasyn/xmms-jackasyn_0.1-2_powerpc.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Paul Brossier <[EMAIL PROTECTED]> (supplier of updated xmms-jackasyn package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Tue, 25 Jan 2005 15:41:34 +0000
Source: xmms-jackasyn
Binary: xmms-jackasyn
Architecture: alpha i386 powerpc source 
Version: 0.1-2
Distribution: unstable
Urgency: low
Maintainer: Paul Brossier <[EMAIL PROTECTED]>
Changed-By: Paul Brossier <[EMAIL PROTECTED]>
Description: 
 xmms-jackasyn - JACK Output plugin for xmms
Closes: 292014
Changes: 
 xmms-jackasyn (0.1-2) unstable; urgency=low
 .
   * Added endianness check to configure.ac (endian dependant code was present
     but never checked in configure) (closes: #292014)
   * Added convert_stero_function to convert.c, ported from last xmms OSS
     output plugin (adds mono to stereo, and avoid leaving the right buffer
     full when skipping from a stereo file to a mono file).
   * Added -avoid-version -module to Makefile.am to get rid of .0.0.0/links.
   * Added --disable-static to avoid installation of .a file.
   * Ran autoreconf -i -f (version 1.8).
   * Simplified build-dependancies (removed xlibs-dev, libglib1.2-dev,
     libgtk1.2-dev, automake, autoconf).
   * Added detailed copyright entries to debian/copyright.
   * Bumped Standards-Version.
Files: 
 23b992be7d88b744458ba434c0f02de4 18816 sound optional 
xmms-jackasyn_0.1-2_i386.deb
 55c89c0c0ffea2d263b9a2a4e89e00c7 19794 sound optional 
xmms-jackasyn_0.1-2_alpha.deb
 57089248b981fea301c31b3c797ce225 339434 sound optional 
xmms-jackasyn_0.1-2.diff.gz
 79211052d155c55c5d8e7af360833050 19988 sound optional 
xmms-jackasyn_0.1-2_powerpc.deb
 58cad030b3671476e5ad8b0c4233a7de 676 sound optional xmms-jackasyn_0.1-2.dsc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFB+SEsfDt5cIjHwfcRAozcAJ9ujJi5ptBmQ7S5runmRZk42R2i9gCgmLMc
BqqFxTT7AyMXUjhfllmMqKc=
=tbMd
-----END PGP SIGNATURE-----


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to