debian/0000755000000000000000000000000012142234343007164 5ustar debian/watch0000644000000000000000000000007111754563506010231 0ustar version=3 http://sf.net/mpc123/mpc123-([\d\.]*)\.tar\.gz debian/rules0000755000000000000000000000003611754563506010261 0ustar #!/usr/bin/make -f %: dh $@ debian/install0000644000000000000000000000012011754563506010564 0ustar mpc123 usr/bin LOCALES/it/LC_MESSAGES/mpc123.mo usr/share/locale/it/LC_MESSAGES debian/copyright0000644000000000000000000000262211754563506011137 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: mpc123 Upstream-Contact: Fernando Vezzosi , Development Mailing List Source: http://mpc123.sourceforge.net/dl.php Files: * Copyright: 2005-2008 Fernando Vezzosi License: GPL-2+ Files: debian/* Copyright: 2006-2008 Daniele Sempione 2010 Yavor Doganov 2012 Ricardo Mones License: GPL-2+ License: GPL-2+ 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 with the Debian GNU/Linux distribution in file /usr/share/common-licenses/GPL; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. . On Debian systems, the complete text of the GNU General Public License, version 2, can be found in /usr/share/common-licenses/GPL-2. debian/docs0000644000000000000000000000002411754563506010051 0ustar README TODO AUTHORS debian/source/0000755000000000000000000000000011754563506010502 5ustar debian/source/format0000644000000000000000000000001411754563506011710 0ustar 3.0 (quilt) debian/patches/0000755000000000000000000000000012142234316010613 5ustar debian/patches/debian_0.2.4-1.1.patch0000644000000000000000000001454611754563506014124 0ustar Subject: Debian changes for mpc123 until version 0.2.4-1.1 Author: Ricardo Mones Forwarded: not-needed Last-Update: 2012-05-16 diff -urN mpc123-0.2.4.orig/ao.c mpc123-0.2.4/ao.c --- mpc123-0.2.4.orig/ao.c 2008-03-21 22:14:38.000000000 +0100 +++ mpc123-0.2.4/ao.c 2012-05-15 18:31:15.000000000 +0200 @@ -144,9 +144,9 @@ data->ao_dev=ao_open_live(ao_drvnum, &ao_fmt, opt_head); }else{ /* output to file (act as a decoder) */ - data->ao_dev=ao_open_file(ao_drvnum, options.foutput, TRUE, &ao_fmt, NULL); + data->ao_dev=ao_open_file(ao_drvnum, options.foutput, MPC_TRUE, &ao_fmt, NULL); } - + if( !data->ao_dev ){ dief(_("Could not open audio output: [%d] %s\n"), errno, strerror(errno)); } @@ -175,6 +175,9 @@ unsigned char * output; unsigned bytes=samples * 2; /* 16 bit == 2 bytes */ + if(!bytes) + return 0; + const unsigned pSize = 16; const int clip_min = -1 << (pSize - 1); const int clip_max = (1 << (pSize - 1)) - 1; @@ -192,7 +195,8 @@ } if(!output){ - dief(_("Out of memory (needed 0x%08x bytes)\n"), bytes); + sayf(0, "Out of memory (needed 0x%08x bytes)\n", bytes); + return 0; } /* code stolen from xmms-musepack */ diff -urN mpc123-0.2.4.orig/mpc123.h mpc123-0.2.4/mpc123.h --- mpc123-0.2.4.orig/mpc123.h 2008-03-21 22:14:38.000000000 +0100 +++ mpc123-0.2.4/mpc123.h 2012-05-15 18:31:15.000000000 +0200 @@ -29,8 +29,9 @@ # include -# include -# include +# include +# include +# include # ifndef LOCALEDIR # define LOCALEDIR "/usr/share/locale" /* this is the Debian default */ @@ -44,7 +45,7 @@ */ # define VERS_MAJOR 0 # define VERS_MINOR 2 -# define VERS_REV 4 +# define VERS_REV 5 # define COPYRIGHT_NOTICE VERS_NAME " Copyright " COPYRIGHT "\n" \ "This is free software, meaning it comes under the terms of the\n" \ diff -urN mpc123-0.2.4.orig/player.c mpc123-0.2.4/player.c --- mpc123-0.2.4.orig/player.c 2008-03-21 22:14:38.000000000 +0100 +++ mpc123-0.2.4/player.c 2012-05-15 18:31:15.000000000 +0200 @@ -31,9 +31,9 @@ */ int do_play_stream(mpc_reader * the_reader, reader_data * data){ mpc_streaminfo tmp_stream_info; - mpc_decoder mpc123_decoder; - mpc_int32_t mpc_ret; - mpc_uint32_t vbrAcc=0, vbrUpd=0; + mpc_demux *mpc123_decoder = NULL; + mpc_frame_info frame; + mpc_status err; int played=0; void * ao_data=NULL; @@ -44,19 +44,12 @@ unsigned bytes_from_decoder=0; /* read file's streaminfo data */ - mpc_streaminfo_init(&tmp_stream_info); - if( (mpc_ret=mpc_streaminfo_read(&tmp_stream_info, the_reader)) - != ERROR_CODE_OK){ - debugf("mpc_streaminfo_read()=%d", mpc_ret); + mpc123_decoder = mpc_demux_init(the_reader); + if( !mpc123_decoder ){ die("Not a valid musepack file\n"); } - /* initialize decoder with the appropriate file reader */ - mpc_decoder_setup(&mpc123_decoder, the_reader); - if( !(mpc_ret=mpc_decoder_initialize(&mpc123_decoder, &tmp_stream_info)) ){ - debugf("mpc_decoder_initialize()=%d", mpc_ret); - die("Error initializing decoder\n"); - } + mpc_demux_get_info(mpc123_decoder, &tmp_stream_info); if( mpc123_ao_init(&ao_data, &tmp_stream_info) != 0 ){ dief("Could not initialize audio library: error %d\n", errno); @@ -64,21 +57,21 @@ /* decoding loop */ while(1){ - decoded_samples=mpc_decoder_decode(&mpc123_decoder, buffer, - &vbrAcc, &vbrUpd); + frame.buffer = buffer; + err = mpc_demux_decode(mpc123_decoder, &frame); - if( !decoded_samples ){ /* eof */ + if( err != MPC_STATUS_OK ){ /* eof */ debugf("End of file after %d samples", total_decoded); break; } - if( decoded_samples == -1 ){ /* decoding error */ + if( err == -1 ){ /* decoding error */ debug("Error decoding stream."); say(0, "Error while decoding -- maybe corrupted data?\n"); break; } -/* debug(" <%d %d %d>", vbrAcc, vbrUpd, vbrUpd * 44100 / 1152 / 100);*/ + decoded_samples = frame.samples; total_decoded += decoded_samples; bytes_from_decoder = decoded_samples * sizeof(float) * 2; diff -urN mpc123-0.2.4.orig/reader_file.c mpc123-0.2.4/reader_file.c --- mpc123-0.2.4.orig/reader_file.c 2008-03-21 22:14:38.000000000 +0100 +++ mpc123-0.2.4/reader_file.c 2012-05-15 18:31:15.000000000 +0200 @@ -22,30 +22,27 @@ #include "mpc123.h" -#include -#include - /* read wrapper */ -static mpc_int32_t mpc123_file_read(void *t, void *ptr, mpc_int32_t size){ - reader_data *data=(reader_data*) t; +static mpc_int32_t mpc123_file_read(mpc_reader *t, void *ptr, mpc_int32_t size){ + reader_data *data=(reader_data*) t->data; return read(data->fd, ptr, size); } /* seek wrapper */ -static mpc_bool_t mpc123_file_seek(void *t, mpc_int32_t offset){ - reader_data *data=(reader_data*) t; +static mpc_bool_t mpc123_file_seek(mpc_reader *t, mpc_int32_t offset){ + reader_data *data=(reader_data*) t->data; lseek(data->fd, offset, SEEK_SET); - return TRUE; + return MPC_TRUE; } -static mpc_int32_t mpc123_file_tell(void *t){ - reader_data *data=(reader_data*) t; +static mpc_int32_t mpc123_file_tell(mpc_reader *t){ + reader_data *data=(reader_data*) t->data; return lseek(data->fd, 0, SEEK_CUR); } /* get filesize */ -static mpc_int32_t mpc123_file_get_size(void *t){ - reader_data *data=(reader_data*) t; +static mpc_int32_t mpc123_file_get_size(mpc_reader *t){ + reader_data *data=(reader_data*) t->data; off_t old_offset=lseek(data->fd, 0, SEEK_CUR); /* save old pos */ mpc_int32_t toret=lseek(data->fd, 0, SEEK_END); @@ -56,8 +53,8 @@ } /* on an empty disk, you can seek() forever */ -static mpc_bool_t mpc123_file_canseek(void *t){ - return TRUE; +static mpc_bool_t mpc123_file_canseek(mpc_reader *t){ + return MPC_TRUE; } /* @@ -65,12 +62,12 @@ * handles plain files */ mpc_reader mpc123_file_reader={ - .read=mpc123_file_read, - .seek=mpc123_file_seek, - .tell=mpc123_file_tell, - .get_size=mpc123_file_get_size, - .canseek=mpc123_file_canseek, - .data=NULL /* reader_data * data */ + .read = mpc123_file_read, + .seek = mpc123_file_seek, + .tell = mpc123_file_tell, + .get_size = mpc123_file_get_size, + .canseek = mpc123_file_canseek, + .data = NULL /* reader_data * data */ }; /* vim:ft=c:tw=78:ts=2:et:cin: debian/patches/manpage_hyphens_and_typo.patch0000644000000000000000000000701511754563506016720 0ustar Subject: Fix manpage hyphens and a small typo Author: Ricardo Mones Forwarded: no Last-Update: 2012-05-16 --- mpc123-0.2.4.orig/mpc123.1 2008-03-21 22:14:38.000000000 +0100 +++ mpc123-0.2.4/mpc123.1 2012-05-16 01:17:13.000000000 +0200 @@ -4,21 +4,21 @@ .SH SYNOPSIS .B mpc123 [options] file(s) .SH DESCRIPTION -mpc123 is a command-line player for the Musepack audio compression +mpc123 is a command\-line player for the Musepack audio compression format. mpc123 reads mpc audio files and decodes them to the devices specified on the command line. During playback, you can pass to the next playlist element (or a random one -if one of the -z and -Z options were used, see below) by sending SIGINT -to the process, thus usually pressing ^C will act as a "next-button" for the +if one of the \-z and \-Z options were used, see below) by sending SIGINT +to the process, thus usually pressing ^C will act as a "next\-button" for the player. .SH OPTIONS -.IP "\fB--gain N\fP, \fB-g N\fP" 4 -Set gain (audio volume) to \fBN\fP (0-100 inclusive, deafult 100, +.IP "\fB\-\-gain N\fP, \fB\-g N\fP" 4 +Set gain (audio volume) to \fBN\fP (0\-100 inclusive, default 100, 0 mutes sound) -.IP "\fB-o driver\fP" 4 +.IP "\fB\-o driver\fP" 4 Set output devicetype to \fBdriver\fP; possible drivers include: .IP " \fBoss\fP" 4 Linux Open Sound System @@ -33,8 +33,8 @@ .IP " \fBnull\fP" 4 Debugging output target -.IP "\fB--audiodevice dev\fP, \fB-a dev\fP" 4 -Use \fBdev\fP for audio-out; If not specified, the program tries to pick +.IP "\fB\-\-audiodevice dev\fP, \fB\-a dev\fP" 4 +Use \fBdev\fP for audio\-out; If not specified, the program tries to pick some sane defaults, based on the used audio output driver. Common devices include: .IP " \fB/dev/dsp\fP or \fB/dev/dsp1\fP" 4 @@ -42,37 +42,37 @@ .IP " \fBdefault\fP or \fBhw:0\fP" 4 for \fBalsa09\fP output -.IP "\fB--au filename.au\fP, \fB-u filename.au\fP" +.IP "\fB\-\-au filename.au\fP, \fB\-u filename.au\fP" Use au file \fBfilename.au\fP for output -.IP "\fB--cdr filename.cdr\fP, \fB-c filename.cdr\fP" +.IP "\fB\-\-cdr filename.cdr\fP, \fB\-c filename.cdr\fP" Use raw file \fBfilename.cdr\fP for output (this can be used directly -with cdrecord's -audio option) +with cdrecord's \-audio option) -.IP "\fB--wav filename.wav\fP, \fB-w filename.wav\fP" +.IP "\fB\-\-wav filename.wav\fP, \fB\-w filename.wav\fP" Use wave file \fBfilename.wav\fP for output -.IP "\fB--list file\fP, \fB-@ file\fP" +.IP "\fB\-\-list file\fP, \fB\-@ file\fP" Use playlist \fBfile\fP as list of Musepack files; The playlist format is simple: one file per line. You can easily generate a playlist for \fBmpc123\fP with the find(1) command: -.IP " find /path/to/musicroot -iname \\\\*.mpc -fprint \fBfile\fP" 4 +.IP " find /path/to/musicroot \-iname \\\\*.mpc \-fprint \fBfile\fP" 4 -.IP "\fB--random\fP, \fB-Z\fP" +.IP "\fB\-\-random\fP, \fB\-Z\fP" Play files randomly until interrupted -.IP "\fB--shuffle\fP, \fB-z\fP" +.IP "\fB\-\-shuffle\fP, \fB\-z\fP" Shuffle list of files before playing -.IP "\fB--verbose\fP, \fB-v\fP" -Increase verbosity (default verbosity is 0), the more -v, the more +.IP "\fB\-\-verbose\fP, \fB\-v\fP" +Increase verbosity (default verbosity is 0), the more \-v, the more verbose mpc123 becomes -.IP "\fB--quiet\fP, \fB-q\fP" +.IP "\fB\-\-quiet\fP, \fB\-q\fP" Reset verbosity to 0 (no title or boilerplate); this is the default -.IP "\fB--help\fP, \fB-h\fP" +.IP "\fB\-\-help\fP, \fB\-h\fP" Print the help screen, with some brief usage information .SH AUTHOR debian/patches/zero_ao_sample_format.patch0000644000000000000000000000114612142234304016202 0ustar Description: Zero ao_sample_format structure to cope with libao 1.0.0 Author: Colin Watson Bug-Debian: http://bugs.debian.org/591396 Bug-Ubuntu: https://bugs.launchpad.net/bugs/710268 Forwarded: no Last-Update: 2013-05-07 Index: b/ao.c =================================================================== --- a/ao.c +++ b/ao.c @@ -123,6 +123,7 @@ /* initialize ao_format struct */ /* XXX VERY WRONG */ + memset(&ao_fmt, 0, sizeof(ao_fmt)); ao_fmt.bits=16; /*tmp_stream_info.average_bitrate;*/ ao_fmt.rate=streaminfo->sample_freq; ao_fmt.channels=streaminfo->channels; debian/patches/series0000644000000000000000000000015312142234127012027 0ustar debian_0.2.4-1.1.patch manpage_hyphens_and_typo.patch Makefile_fix_FTBFS.patch zero_ao_sample_format.patch debian/patches/Makefile_fix_FTBFS.patch0000644000000000000000000000115612142233601015142 0ustar Description: rearrange linker order to fix new DSO linking FTBFS (LP: #770862) Author: Alex Chiang Author: Oussama Bounaim Bug-Ubuntu: https://bugs.launchpad.net/bugs/770862 Last-Update: <2012-11-2828> --- mpc123-0.2.4.orig/Makefile +++ mpc123-0.2.4/Makefile @@ -50,7 +50,7 @@ TAR_EXCLUDED += \\{arch} .arch-ids $(wil $(TARGET): $(DEPS) $(TARGET).c $(MOS) @echo Building mpc123 version $(MAJOR).$(MINOR) ... - $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $(DEPS) $(TARGET).c + $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $(DEPS) $(TARGET).c $(LDFLAGS) .PHONY: clean tarball debian/compat0000644000000000000000000000000211754563506010400 0ustar 9 debian/control0000644000000000000000000000122511754563506010605 0ustar Source: mpc123 Section: sound Priority: optional Maintainer: Debian QA Group Build-Depends: debhelper (>= 9), libmpcdec-dev (>= 2:0.1~r435), libao-dev, gettext Standards-Version: 3.9.3 Homepage: http://mpc123.sourceforge.net/ Package: mpc123 Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: command-line Musepack audio player mpc123 is a command-line player for the Musepack audio compression format (MPC). . MPC is a lossy compression format like MP3 or Ogg Vorbis. It is based on the MPEG-1 Layer-2 / MP2 algorithms, but has been vastly improved. . Ability to play remote files is not implemented. debian/changelog0000644000000000000000000000521012142234343011034 0ustar mpc123 (0.2.4-3) unstable; urgency=low * QA upload. * Makefile: rearrange linker order to fix new DSO linking FTBFS (thanks, Alex Chiang and Oussama Bounaim; LP: #770862). * Zero ao_sample_format structure to cope with libao 1.0.0 (closes: #591396; LP: #710268). -- Colin Watson Tue, 07 May 2013 18:24:50 +0100 mpc123 (0.2.4-2) unstable; urgency=low * QA upload. * debian/control, debian/compat - Set maintainer to QA group - Update Standards-Version to 3.9.3 (no other changes) - Bump debhelper compatibility level to 9 - Add Homepage field - Improve descriptions a bit * debian/source/format, debian/patches/* - Switch to source package format '3.0 (quilt)' - Add current source changes as single patch - New patch to fix manpage hyphens and typo (thanks lintian!) * debian/rules, debian/dirs, debian/install, debian/manpages - Switch to debhelper sequencer * debian/watch - Added watch file * debian/copyright - Updated to Copyright Format 1.0 -- Ricardo Mones Wed, 16 May 2012 01:22:21 +0200 mpc123 (0.2.4-1.1) unstable; urgency=low * Non-maintainer upload. * Apply upstream commit c7cdcc0; port to libmpcdec6 API (Closes: #552829). * debian/control (Build-Depends): Require libmpcdec-dev >= 2:0.1~r435. -- Yavor Doganov Wed, 24 Feb 2010 19:04:16 +0200 mpc123 (0.2.4-1) unstable; urgency=low * New upstream release (Closes: #459317) + bug fixes + added i18n support (it) * Bump Standards-Version to 3.7.3 -- Daniele Sempione Fri, 21 Mar 2008 23:45:34 +0100 mpc123 (0.2.2-1) unstable; urgency=low * New upstream release (Closes: #425702) * debian/rules doesn't suppress Makefile errors anymore; it doesn't cause errors for ``clean''ing -- Daniele Sempione Fri, 16 Nov 2007 23:23:27 +0100 mpc123 (0.2.1-1) unstable; urgency=high * New upstream release (Closes: #379996) + bug fixes + support for track skipping by SIGINT + better support for various sound systems + temporarily removed alsa not-working driver (use alsa09) -- Daniele Sempione Sun, 3 Sep 2006 18:06:11 +0200 mpc123 (0.1.9+tla20060120-1) unstable; urgency=high * Update to Arch 2006-01-20 to fix the bug: + unavailable output device -> infinite loop * This release adds support for ESD * Upgraded to Standards-Version 3.7.2 -- Daniele Sempione Sat, 3 Jun 2006 22:09:03 +0200 mpc123 (0.1.9-1) unstable; urgency=low * Initial release Closes: #347832 -- Daniele Sempione Fri, 6 Jan 2006 11:39:37 +0100 debian/dirs0000644000000000000000000000005011754563506010061 0ustar usr/bin usr/share/locale/it/LC_MESSAGES debian/manpages0000644000000000000000000000001111754563506010710 0ustar mpc123.1