debian/0000755000000000000000000000000011766263513007200 5ustar debian/rules0000755000000000000000000000310011766263513010252 0ustar #!/usr/bin/make -f # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # Optional P2 optimization. Don't mess with this unless you have gcc 2.95+ # and know what it does. #OPT=-march=i686 CXX = g++ CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS) CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS) ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) confflags += $(DEB_HOST_GNU_TYPE) else confflags += --host $(DEB_BUILD_GNU_TYPE) --build $(DEB_HOST_GNU_TYPE) endif build: build-arch build-indep build-arch: build-stamp dh_testdir autoreconf -i -f automake ./configure $(confflags) --prefix=/usr --with-pthreads $(MAKE) CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" CPPFLAGS="$(CPPFLAGS)" touch build-arch build-indep: build-stamp build-stamp: touch build-stamp clean: dh_testdir dh_testroot rm -f build-arch build-stamp [ ! -f Makefile ] || $(MAKE) distclean rm -f mkinstalldirs missing install-sh INSTALL depcomp configure aclocal.m4 rm -f Makefile Makefile.in rm -f apps/Makefile apps/Makefile.in rm -f libs/Makefile libs/Makefile.in dh_clean binary-arch: build dh_testdir dh_testroot dh_prep dh_installdirs usr/bin cp apps/splay debian/splay/usr/bin/ dh_strip dh_installdocs AUTHORS README README.LIB dh_installman apps/splay.1 dh_installchangelogs ChangeLog dh_compress dh_fixperms dh_installdeb dh_shlibdeps dh_gencontrol dh_builddeb binary-indep: build binary: binary-arch binary-indep .PHONY: clean binary-indep binary-arch binary debian/control0000644000000000000000000000103611766263513010603 0ustar Source: splay Build-Depends: debhelper (>= 8.1.3), libtag1-dev, autoconf, automake Build-Conflicts: autoconf2.13, automake1.4 Section: sound Priority: optional Maintainer: John Hedges Uploaders: tony mancill Standards-Version: 3.9.3 Package: splay Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends}, oss-compat Description: Sound player for MPEG-1,2 layer 1,2,3 Based on maplay, this package decodes layer I, II, and III MPEG audio streams/files and plays them from the command line. debian/copyright0000644000000000000000000000237711766263513011144 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: splay Source: http://splay.sourceforge.net Files: * Copyright: 1997,1998,1999,2000 Woo-jae Jung 2000,2001,2003,2004 Mikael Hedin License: GPL-2.0+ Files: debian/* Copyright: 1997 Johnie Ingram 1998-2004 Zed Pobre 2004,2005,2006,2007,2008,2011 John Hedges License: GPL-2.0+ License: GPL-2.0+ This package 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 package 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, see . 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/compat0000644000000000000000000000000211766263513010376 0ustar 8 debian/source/0000755000000000000000000000000011766263513010500 5ustar debian/source/format0000644000000000000000000000001411766263513011706 0ustar 3.0 (quilt) debian/changelog0000644000000000000000000003621411766263513011060 0ustar splay (0.9.5.2-13) unstable; urgency=low [ John Hedges ] * Switch to dpkg-source 3.0 (quilt) format * Removes autoconf generated files in clean target * Converts to machine readable copyright (DEP5) [ tony mancill ] * Update to build with hardening flags. * Bump Standards-Version to 3.9.3. * Bump debian/compat to 8. -- tony mancill Wed, 13 Jun 2012 21:22:44 -0700 splay (0.9.5.2-12) unstable; urgency=low * Uses libtag1 instead of (debian) deprecated libid3 * Fixes uninitialised var bug in libs/fileplayer.cc * Adds dependency on oss-compat * Standards-version 3.9.2 * Corrects debian/control - indeed, splay won't play wavs (closes: #546065) -- John Hedges Mon, 12 Dec 2011 12:25:13 +0000 splay (0.9.5.2-11) unstable; urgency=low * Resolved g++-4.3 compiler issues (closes: #461711) libs/soundinputstream.cc libs/httpinput.cc libs/mpegtoraw.cc libs/fileplayer.cc libs/mpegsound.h apps/common.cc apps/splay.cc -- John Hedges Thu, 21 Feb 2008 11:31:13 +0000 splay (0.9.5.2-10) unstable; urgency=low * Fixed pre-iso c++ headers (closes: #461711) libs/soundinputstream.cc libs/httpinput.cc libs/mpegtoraw.cc libs/fileplayer.cc libs/mpegsound.h apps/xsplay.cc apps/functions.cc apps/common.cc apps/splay.cc * Fixed bug in frame header decode (libs/mpegtoraw.cc) that failed to identify 48KHz sample rate * Fixed bug in apps/splay.cc where tracks without id3 genre displayed usage info in place of genre with -vv(v) * Fixed all deprecated casts from string literal to char* * Standards-version 3.7.3 * New debian/compat replaces DH_COMPAT in debian/rules -- John Hedges Tue, 29 Jan 2008 13:32:28 +0000 splay (0.9.5.2-9) unstable; urgency=low * debian/rules: Fixed build-arch build-indep rules (closes: #418357) -- John Hedges Tue, 10 Apr 2007 14:32:28 +0100 splay (0.9.5.2-8) unstable; urgency=low * Man page corrections to apps/splay.1 (closes: #350353). Thanks to A Costa for supplying patch * Updated debhelper build-depends to >= 5 also DH_COMPAT in debian/rules * Updated FSF address in debian/copyright * Renamed debian/rules binary-arch target to binary-indep and added empty binary-arch target. (closes: #395772) * Removed build-stamp target and now touch build instead of build-stamp in the build target istelf * Standards-version 3.7.2 -- John Hedges Mon, 30 Oct 2006 13:13:14 +0000 splay (0.9.5.2-7) unstable; urgency=low * Fixes random shuffle bug (closes: #306983). Thanks to Samuel Thibault for supplying this patch. * Repaired typo in man page (closes: #312765). * Fixes dependency on outdated libid3 package, now depends on libid3-3.8.3c2 (closes: #328215). -- John Hedges Wed, 14 Sep 2005 10:30:00 +0100 splay (0.9.5.2-6) unstable; urgency=low * Cleaned remains of xsplay from debian/* * Modified splay man page to reflect lack of xsplay * Modified -v[v[v]] option to splay manpage (closes: #174032) * Fleshed out debian/copyright * Standards-version 3.6.2 * Updated debian/rules to honour DEB_BUILD_OPTIONS and added support for DEB_{HOST,BUILD}_GNU_TYPE * Replaced debian/dirs with explicit dh_installdirs [file] * New maintainer (closes: #246971) -- John Hedges Sat, 14 Aug 2004 13:00:00 +0100 splay (0.9.5.2-5) unstable; urgency=low * QA Upload. * Set Architecture to any. Let's hope bug 71953 doesn't come back. (In four years, anything could have happened.) (Closes: #71953, #249400.) But if sparc build failures still exist after this, then the architecture list should be set to i386 alpha arm m68k powerpc amd64, and bug 71953 should be reopened (as wishlist). -- Thomas Bushnell, BSG Mon, 9 Aug 2004 14:44:16 -0700 splay (0.9.5.2-4) unstable; urgency=low * Package orphaned. -- Zed Pobre Sun, 2 May 2004 11:33:10 -0500 splay (0.9.5.2-3) unstable; urgency=low * Compiled against and Build-Depends: libid3-3.8.3-dev (closes: #196286) * debian/copyright: /usr/share/common-licenses, not /usr/share/doc/common-licenses. * Standards-Version 3.5.10 -- Zed Pobre Thu, 5 Jun 2003 16:00:49 -0500 splay (0.9.5.2-2) unstable; urgency=low * Recompile now that g++-3.2 is the default. * The ID3 GetError string output functions seem to have vanished, so I have commented them out of the code. -- Zed Pobre Wed, 12 Feb 2003 12:18:57 -0600 splay (0.9.5.2-1) unstable; urgency=low * New upstream bugfix release (closes: #127647) -- Zed Pobre Sat, 19 Jan 2002 10:39:59 -0600 splay (0.9.5.1-3) unstable; urgency=low * Fix outdated reference to QT GPL incompatability in splay description (closes: #109966) * Remove empty TODO file. * Remove emacs add-log-mailing-address entry at bottom of changelog. * Remove emacs debian-changelog mode force from changelog entirely (it seems to be autodetected now). -- Zed Pobre Fri, 24 Aug 2001 21:33:24 -0500 splay (0.9.5.1-2) unstable; urgency=low * Remove libstdc++-dev from Build-Depends, as it is Build-Essential (closes: #105957) * Standards Version 3.5.6 (no changes needed). -- Zed Pobre Sat, 28 Jul 2001 14:34:11 -0500 splay (0.9.5.1-1) unstable; urgency=low * New upstream version * Frame skipping with -k is now implemented (closes: #89916) -- Zed Pobre Sun, 25 Mar 2001 13:11:24 -0600 splay (0.9.4-1) unstable; urgency=low * New upstream version. Genres are now printed as text. * Updated upstream location in copyright file -- Zed Pobre Sat, 3 Mar 2001 10:06:16 -0600 splay (0.9.2-3) unstable; urgency=medium * Standards-Version 3.5.2 * Added libid3-dev to the Build-Depends AGAIN! (this time it should stick, though, since what was happening was that I would update control, but not control.splay, putz with control.xsplay for a bit, and then copy control.splay back to control... This time the changes got replicated to control.splay). Also added a versioned depends on libqt-dev to the xsplay.control file so that it doesn't get forgotten in the far future when xsplay builds again. (closes: #83780) -- Zed Pobre Tue, 27 Feb 2001 19:42:40 -0600 splay (0.9.2-2) unstable; urgency=medium * Removed sparc from the architectures list. This allows bug#71953 to be set to wishlist, and with luck will let this finally get into testing. * Standards-Version 3.5.1 -- Zed Pobre Fri, 16 Feb 2001 08:07:28 -0600 splay (0.9.2-1) unstable; urgency=low * New upstream version; /dev/sound/dsp is now checked if opening /dev/dsp fails (closes: #81958) * INSTALL files are no longer included with the binary .deb. If you want to see them, you will now have to look in the source package for them (closes: #81964). * Other documentation files have disappeared from the upstream source (the OLDNEWS files and the *.han files from the 0.8.2 splay) and I have decided not to copy them back in. If you think these files should still be included for historical reasons or whatnot, file a wishlist bug and I will probably stick them back in. * DH_COMPAT=3 * Standards-Version 3.5.0 (Build-Depends updated) * Updated README.Debian to note xsplay unbuildable status. -- Zed Pobre Thu, 15 Feb 2001 11:23:43 -0600 splay (0.9-1) unstable; urgency=medium * New upstream version (previous Debian patches merged, uses libid3 instead of the previous internal handling, SIGINT now skips to next song when playing several) * New upstream author, Mikael Hedin * debian/copyright file updated to reflect this, and the proper location for common licenses * README.Debian and control files no longer inaccurately report QT2/GPL conflict (closes: #80508) * xsplay is still not being built, but only because it doesn't compile at at the moment (libid3 seems to have broken it, note sent upstream). * After recompiling, splay no longer seems to segfault on invalid -t lines (closes: #82886) * Build-Depends updated to include libid3-dev * Standards-version 3.2.1 -- Zed Pobre Sat, 20 Jan 2001 13:08:56 -0600 splay (0.8.2-12) unstable; urgency=low * Fixed a typo in the rules file relating to the building of xsplay -- Zed Pobre Fri, 7 Jul 2000 19:07:01 -0500 splay (0.8.2-11) unstable; urgency=low * Applied fix from Fabien Ninoles to compile xsplay against libqt2 instead of libqt1g. The binary and xsplay package are still not built by default. * The switch to libqt2 has obviated the need for the special QT version detection handling in the rules file, which has been removed. -- Zed Pobre Thu, 30 Mar 2000 15:15:40 -0600 splay (0.8.2-10) unstable; urgency=medium * Fixed the XSPLAY variable selection in debian/rules to properly default to --without-xsplay. It got left as --with-xsplay from one of my previous personal builds, and this was causing breakage on recompilations of the splay package when libqt2-dev was installed but libqt1g-dev was not. * Bumped standards-version to 3.1.1 (Build-Depends added) * Minor changes to the README.Debian to make it more specific about what to change to build an xsplay package from the Debian sources. * Long description of splay changed in control file to note the GPL/QT conflict that prevents binary distribution of xsplay. * A Suggests: xsplay line that cannot be fulfilled with Debian packages was removed. -- Zed Pobre Sun, 5 Dec 1999 19:05:49 -0600 splay (0.8.2-9) unstable; urgency=low * Added a clarification in README.Debian about how to build the xsplay package from the source. * Added a missing * in line 58 of mpeglayer3.cc to fix the big-endian compilation problem again. (Roman, not to be picky, but couldn't you have submitted all of these at once? ;) (closes: #50332, yet again.) -- Zed Pobre Tue, 30 Nov 1999 13:57:17 -0600 splay (0.8.2-8) unstable; urgency=low * Added a missing * in lines 30 and 49 of mpegsound/mpegsound_locals.h to fix another big-endian compilation problem (closes: #50332, again.) -- Zed Pobre Tue, 23 Nov 1999 12:20:10 -0600 splay (0.8.2-7) unstable; urgency=low * s/bixindex/bitindex in mpegsound/mpegsound_locals.h and mpegsound/mpeglayer3.cc to fix compilation problems on big-endian machines (closes: #50332). -- Zed Pobre Tue, 16 Nov 1999 13:42:39 -0600 splay (0.8.2-6) unstable; urgency=low * Using "c++" instead of "g++" in debian/rules was causing some problems, so it got switched. * QT package version detection (for when xsplay is being compiled manually) was botched because the checks were in the wrong order. Fixed. -- Zed Pobre Thu, 11 Nov 1999 03:29:05 -0600 splay (0.8.2-5) unstable; urgency=low * Cleaned up the rules file a little bit. * In mpegsound/mpeglayer3.cc s/register end/register int end/ to get rid of the warning message and the necessity for -fpermissive. * xsplay binary package no longer built due to GPL compatability problems. README.Debian updated about this. * On the plus side, since the source no longer requires something outside of main to build, it can now go into main. * Thanks go to Florian Lohoff for some conversations about the above and a suggested patch which I partially used. -- Zed Pobre Fri, 17 Sep 1999 10:37:22 -0500 splay (0.8.2-4) unstable; urgency=low * Updated to Standards-Version 3.0.1 and switched to FHS * Explicit errno.h include added to mpegsound/httpinput.cc * -fpermissive added to C++ options to allow compilation with the latest GCC suite * Explicit pointers given to the qt1g libraries and includes. Patches to bring xsplay up to QT2 compliance are welcome, since I am unlikely to acquire competence in that toolset anytime soon. -- Zed Pobre Sat, 11 Sep 1999 21:48:23 -0500 splay (0.8.2-3) frozen unstable; urgency=low * debian/rules clean: now properly deletes config files and Makefiles generated by configure/autoconf, preventing them from being included in the diff file and breaking compiles on non-i386 architectures (fixes severity: Important bug#30893) -- Zed Pobre Sat, 19 Dec 1998 17:25:34 -0600 splay (0.8.2-2) unstable; urgency=low * Updated to Standards-Version 2.5.0 (no changes needed) * Split into two packages, splay and xsplay, with only the latter dependent upon Qt and X11. * Updated the README.Debian file to discuss the above. * Now that Qt has been recompiled for libstdc++2.9, xsplay compiles cleanly for only a libstdc++2.9 dependency (fixes bug#29036) -- Zed Pobre Fri, 27 Nov 1998 17:25:38 -0600 splay (0.8.2-1) frozen unstable; urgency=low * New upstream version fixes problems compiling under Glibc. * Updated to Standards-Version 2.4.0.0. * debian/rules completely reconstructed using debhelper and dh_make * New maintainer. -- Zed Pobre Sat, 11 Apr 1998 10:36:16 -0500 splay (0.8-1) unstable; urgency=low * New upstream version. -- Johnie Ingram Mon, 24 Nov 1997 22:08:26 -0500 splay (0.5-4) unstable; urgency=low * Linked with libc6 X libraries. * Updated to Standards-Version 2.3.0.1. * Added SHELL=/bin/bash to debian/rules file. -- Johnie Ingram Sun, 14 Sep 1997 21:44:41 -0400 splay (0.5-3) unstable; urgency=low * Tweaked packaging for better multi-architecture, multi-compiler support. * Switched to pristine source tar archive. * Updated to Standards-Version 2.2.0.0. -- Johnie Ingram Sun, 31 Aug 1997 07:51:18 -0400 splay (0.5-2) unstable; urgency=low * Updated copyright and availability information. * Added manpage links for splay_pentium and xsplay. * Closed #11121, the antiquity of the Debian splay package (cf. 11197). * Closed #8203, since the manpage link is compliant with current policy, and the renaming of psplay to splay_pentium removes the ambiguity. -- Johnie Ingram Tue, 15 Jul 1997 00:11:04 -0400 splay (0.5-1) unstable; urgency=low * New upstream version (#11197). * Fixed broken manlink to splay_pentium.1 (#10745). * Updated to Standards-Version: 2.1.3.3. * Compiled against libc6. -- Johnie Ingram Sat, 12 Jul 1997 16:52:39 -0400 splay (0.4-1) unstable; urgency=low * Updated to Standards-Version: 2.1.3.2. * Added dependency on libqt, and moved to contrib. -- Johnie Ingram Thu, 5 Jun 1997 21:50:47 -0400 splay (0.2-1) unstable; urgency=low * New upstream version. -- Johnie Ingram Mon, 17 Mar 1997 17:21:12 -0500 splay (0.1-1) unstable; urgency=low * Initial Release: Standards-Version 2.1.2.2 and debmake 3.2.3. * Thanks to "hyrlik" (on #natter at irc.linpeople.org) for discovering this on sunsite. -- Johnie Ingram Thu, 13 Mar 1997 17:42:21 -0500 debian/patches/0000755000000000000000000000000011766263513010627 5ustar debian/patches/0.9.5.2-130000644000000000000000000004007511766263513011612 0ustar Description: Initial quilt patch Patch for accumulated changes from splay-0.9.5.2 . * Switch to dpkg-source 3.0 (quilt) format * Removes autoconf chaff prior to build Author: John Hedges --- splay-0.9.5.2.orig/configure.in +++ splay-0.9.5.2/configure.in @@ -11,8 +11,18 @@ AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_RANLIB +AC_LANG(C++) + dnl Checks for libraries. -AC_CHECK_LIB(id3, ID3Tag_New) +AC_CHECK_LIB([tag], [main], [AC_CHECK_HEADERS([taglib/tag.h], + [AC_DEFINE([TAGLIB], [1], [Define to 1 for taglib])] + [LIBTAG=1] + [LIBS="$LIBS -ltag"] + )]) + +if test ! "$LIBTAG" = 1; then + AC_CHECK_LIB([id3], [ID3Tag_New]) +fi AC_CHECK_LIB(m, cos) AC_CHECK_LIB(pthread,main,INCLUDEPTHREAD=1) AC_CHECK_LIB(qt, main,XSPLAY=xsplay) --- splay-0.9.5.2.orig/libs/fileplayer.cc +++ splay-0.9.5.2/libs/fileplayer.cc @@ -9,8 +9,7 @@ #include "config.h" #endif -#include -#include +#include #include #include #include @@ -18,6 +17,8 @@ #include "mpegsound.h" +using namespace std; + // File player superclass Fileplayer::Fileplayer() { @@ -43,7 +44,7 @@ Mpegfileplayer::~Mpegfileplayer() if(server)delete server; } -bool Mpegfileplayer::openfile(char *filename,char *device) +bool Mpegfileplayer::openfile(char *filename,const char *device) { // Player if(device==NULL){ @@ -126,9 +127,7 @@ bool Mpegfileplayer::playing(int verbose } // Playing - int err; - while( err) { - err = server->run(100); + while (server->run(100)) { if(frameinfo) { int currframe=server-> getcurrentframe(); double currtime=1.0*currframe*pcmperframe/frequency; @@ -166,9 +165,7 @@ bool Mpegfileplayer::playingwiththread(i } // Playing - int err; - while( err) { - err = server->run(100); + while (server->run(100)) { if(frameinfo) { int currframe=server-> getcurrentframe(); double currtime=1.0*currframe*pcmperframe/frequency; @@ -188,7 +185,7 @@ bool Mpegfileplayer::playingwiththread(i void Mpegfileplayer::showverbose(int ) { - static char *modestring[4]={"stereo","joint stereo","dual channel","mono"}; + static const char *modestring[4]={"stereo","joint stereo","dual channel","mono"}; fprintf(stderr,"\tMPEG-%d Layer %d, %s,\n\t%dHz%s, %dkbit/s, ", server->getversion()+1, --- splay-0.9.5.2.orig/libs/rawplayer.cc +++ splay-0.9.5.2/libs/rawplayer.cc @@ -24,7 +24,7 @@ #define IOCTL(a,b,c) (c = ioctl(a,b,c) ) #endif -char *Rawplayer::defaultdevice="/dev/dsp"; +const char *Rawplayer::defaultdevice="/dev/dsp"; /* Volume */ int Rawplayer::setvolume(int volume) @@ -57,7 +57,7 @@ Rawplayer::~Rawplayer() close(audiohandle); } -bool Rawplayer::initialize(char *filename) +bool Rawplayer::initialize(const char *filename) { int flag; --- splay-0.9.5.2.orig/libs/mpegtoraw.cc +++ splay-0.9.5.2/libs/mpegtoraw.cc @@ -15,6 +15,7 @@ #include #include +#include #include #include "mpegsound.h" @@ -22,6 +23,8 @@ #define MY_PI 3.14159265358979323846 +#include + Mpegtoraw::Mpegtoraw(Soundinputstream *loader,Soundplayer *player) { __errorcode=SOUND_ERROR_OK; @@ -359,7 +362,7 @@ bool Mpegtoraw::loadheader(void) c=((loader->getbytedirect()))>>1; padding=(c&1); c>>=1; - frequency=(_frequency)(c&2); c>>=2; + frequency=(_frequency)(c&3); c>>=2; bitrateindex=(int)c; if(bitrateindex==15)return seterrorcode(SOUND_ERROR_BAD); @@ -380,8 +383,10 @@ bool Mpegtoraw::loadheader(void) channelbitrate=bitrateindex; if(inputstereo) + { if(channelbitrate==4)channelbitrate=1; else channelbitrate-=4; + } if(channelbitrate==1 || channelbitrate==2)tableindex=0; else tableindex=1; @@ -551,8 +556,6 @@ int Mpegtoraw::getframesaved(void) #endif - -#include // Convert mpeg to raw bool Mpegtoraw::run(int frames) { --- splay-0.9.5.2.orig/libs/rawtofile.cc +++ splay-0.9.5.2/libs/rawtofile.cc @@ -20,7 +20,7 @@ Rawtofile::~Rawtofile() close(filehandle); } -bool Rawtofile::initialize(char *filename) +bool Rawtofile::initialize(const char *filename) { if(filename==NULL)filehandle=1; else if((filehandle=creat(filename,0644))==-1) --- splay-0.9.5.2.orig/libs/mpegsound.h +++ splay-0.9.5.2/libs/mpegsound.h @@ -11,7 +11,6 @@ /************************************/ #include #include -#include #ifdef PTHREADEDMPEG #ifdef HAVE_PTHREAD_H @@ -230,7 +229,7 @@ public: Soundplayer() {__errorcode=SOUND_ERROR_OK;}; virtual ~Soundplayer(); - virtual bool initialize(char *filename) =0; + virtual bool initialize(const char *filename) =0; virtual void abort(void); virtual int getprocessed(void); @@ -255,7 +254,7 @@ class Rawtofile : public Soundplayer public: ~Rawtofile(); - bool initialize(char *filename); + bool initialize(const char *filename); bool setsoundtype(int stereo,int samplesize,int speed); bool putblock(void *buffer,int size); @@ -270,7 +269,7 @@ class Rawplayer : public Soundplayer public: ~Rawplayer(); - bool initialize(char *filename); + bool initialize(const char *filename); void abort(void); int getprocessed(void); @@ -284,7 +283,7 @@ public: void setquota(int q){quota=q;}; int getquota(void) {return quota;}; - static char *defaultdevice; + static const char *defaultdevice; static int setvolume(int volume); private: @@ -573,7 +572,7 @@ public: int geterrorcode(void) {return __errorcode;}; - virtual bool openfile(char *filename,char *device)=0; + virtual bool openfile(char *filename,const char *device)=0; virtual void setforcetomono(bool flag) =0; virtual bool playing(int verbose,bool frameinfo, int startframe) =0; @@ -593,7 +592,7 @@ public: Mpegfileplayer(); ~Mpegfileplayer(); - bool openfile(char *filename,char *device); + bool openfile(char *filename,const char *device); void setforcetomono(bool flag); void setdownfrequency(int value); bool playing(int verbose, bool frameinfo, int startframe); --- splay-0.9.5.2.orig/apps/Makefile.am +++ splay-0.9.5.2/apps/Makefile.am @@ -15,7 +15,7 @@ noinst_HEADERS = multipleselect.h files LDADD= ../libs/libmpeg.a INCLUDES = -I../libs -I/usr/include/qt -xsplay_LDADD=-lqt $(LDADD) +xsplay_LDADD=-lqt -lz $(LDADD) man_MANS = splay.1 xsplay.1 EXTRA_DIST = $(man_MANS) --- splay-0.9.5.2.orig/apps/splay.1 +++ splay-0.9.5.2/apps/splay.1 @@ -8,16 +8,11 @@ splay \- MPEG-1,2 Audio layer 1,2,3 file [-2VMfmrsv] [-k num] [-d dev] [-l list] [-t num] .I filenames... -.B xsplay -[-2Vemrsv] [-d dev] [-l list] [-t num] -.I filenames... - .SH DESCRIPTION .I Splay is the sound file player such as MPEG-1,2 Audio files. And you can play these files using list file. With pthread, it can play sound -files smoother. And it has X-interface with libqt. Splay with qt may -make you splay easily. +files smoother. .SH OPTIONS .I Splay @@ -29,35 +24,32 @@ If you use this option, you may play MPE CPU very much. .PD 0 .TP -.BI \-e -exit when play is done. (xsplay) -.TP .BI \-f display info on played and remaining frames and time. .TP .BI \-m force to mono.\fR .PD 0 -Play with mono even if file have stereo quality. +Play with mono even if file is in stereo. .PD 0 .TP .BI \-r -Repeat forever. (Not X-interface) -If you \-r with \-s, list files would be shuffled everytime. +Repeat forever. +If you \-r with \-s, list files are shuffled every time. .PD 0 .TP .BI \-s Shuffle play. If you give list file or a number of files, -Splay will makes them rearranged randomly. And with \-r -Everytime the order of files would be changed. +Splay will rearrange them randomly. And with \-r +every time the order of files is changed. .PD 0 .TP -.BI \-v +.BI \-v[v[v]] Verbose, Very verbose, Very very verbose. .PD 0 .TP .BI \-M -Play MPEG file as standard input. +Play MPEG file from standard input. .PD 0 .TP .BI \-V @@ -68,7 +60,7 @@ Show version number. .I num of frames were saved during playing. When CPU is so busy and prevents splay from decoding, splay will play back using saved frames. This feature -makes you do other job freely with listing MPEG music. +lets you do other job freely while listening to MPEG music. .PD 0 .TP .B \-k " num" --- splay-0.9.5.2.orig/apps/functions.cc +++ splay-0.9.5.2/apps/functions.cc @@ -10,6 +10,7 @@ #endif #include +#include #include "xsplay.h" --- splay-0.9.5.2.orig/apps/common.cc +++ splay-0.9.5.2/apps/common.cc @@ -20,7 +20,7 @@ int splay_verbose=0; int splay_startframe=0; char *splay_progname; -char *splay_devicename=NULL; +const char *splay_devicename=NULL; char *splay_list[MAXLISTSIZE]; int splay_listsize=0; @@ -34,7 +34,7 @@ bool splay_shuffleflag=false, int splay_threadnum=50; #endif -char *splay_Sounderrors[SOUND_ERROR_UNKNOWN]= +const char *splay_Sounderrors[SOUND_ERROR_UNKNOWN]= { "Failed to open sound device.", "Sound device is busy.", "Buffersize of sound device is wrong.", @@ -186,7 +186,9 @@ void shufflelist(void) for(i=splay_listsize-1;i>0;i--) { - p=random()%i; + p=random()%(i+1); + + if(p==i)continue; tmp=splay_list[p]; splay_list[p]=splay_list[i]; --- splay-0.9.5.2.orig/apps/splay.h +++ splay-0.9.5.2/apps/splay.h @@ -10,7 +10,7 @@ extern int splay_verbose; extern int splay_startframe; extern char *splay_progname; -extern char *splay_devicename; +extern const char *splay_devicename; extern char *splay_list[MAXLISTSIZE]; extern int splay_listsize; @@ -20,7 +20,7 @@ extern bool splay_shuffleflag, splay_forcetomonoflag, splay_frameinfo; -extern char *splay_Sounderrors[]; +extern const char *splay_Sounderrors[]; #ifdef PTHREADEDMPEG extern int splay_threadnum; --- splay-0.9.5.2.orig/apps/splay.cc +++ splay-0.9.5.2/apps/splay.cc @@ -16,20 +16,27 @@ #include #include -#include +#include + +#ifdef TAGLIB +#include +#include +#endif #ifdef HAVE_LIBID3 #include #include #endif /* HAVE_LIBID3 */ -#include +#include #include "mpegsound.h" #include "splay.h" -static char *help= +using namespace std; + +static const char *help= "\t-2 : playing with half frequency.\n" "\t-e : exit when playing is done. (only XSPLAY)\n" "\t-f : display frame and time info (played and remaining).\n" @@ -87,66 +94,25 @@ inline const char * nn(const char* str) return str?str:""; } -#ifdef HAVE_LIBID3 +#ifdef TAGLIB +std::ostream& operator<<(std::ostream& s, const TagLib::Tag& tag ) +{ + s.setf(std::ios::left); + s << "Title : " << tag.title() << std::endl + << "Artist: " << std::setw(30) << tag.artist() + << "Album: " << tag.album() << std::endl + << "Genre : " << std::setw(18) << tag.genre() + << "Track: " << std::setw(5) << tag.track() + << "Year: " << std::setw(6) << tag.year() + << std::endl << std::flush; + return s; +} +#endif /* TAGLIB */ -//List of ID3 genre names, copied from xmms.org -const char *ID3_gen_list[255] = - { - //0-24 - "Blues", "Classic Rock", "Country", "Dance", "Disco", - "Funk", "Grunge", "Hip-Hop", "Jazz", "Metal", - "New Age", "Oldies", "Other", "Pop", "R&B", - "Rap", "Reggae", "Rock", "Techno", "Industrial", - "Alternative", "Ska", "Death Metal", "Pranks", "Soundtrack", - //25-49 - "Euro-Techno", "Ambient", "Trip-Hop", "Vocal", "Jazz+Funk", - "Fusion", "Trance", "Classical", "Instrumental", "Acid", - "House", "Game", "Sound Clip", "Gospel", "Noise", - "Alt", "Bass", "Soul", "Punk", "Space", - "Meditative", "Instrumental Pop", "Instrumental Rock", "Ethnic", "Gothic", - //50-74 - "Darkwave", "Techno-Industrial", "Electronic", "Pop-Folk", "Eurodance", - "Dream", "Southern Rock", "Comedy", "Cult", "Gangsta Rap", - "Top 40", "Christian Rap", "Pop/Funk", "Jungle", "Native American", - "Cabaret", "New Wave", "Psychedelic", "Rave", "Showtunes", - "Trailer", "Lo-Fi", "Tribal", "Acid Punk", "Acid Jazz", - //75-99 - "Polka", "Retro", "Musical", "Rock & Roll", "Hard Rock", - "Folk", "Folk/Rock", "National Folk", "Swing", "Fast-Fusion", - "Bebob", "Latin", "Revival", "Celtic", "Bluegrass", - "Avantgarde", "Gothic Rock", "Progressive Rock", "Psychedelic Rock", "Symphonic Rock", - "Slow Rock", "Big Band", "Chorus", "Easy Listening", "Acoustic", - //100-124 - "Humour", "Speech", "Chanson", "Opera", "Chamber Music", - "Sonata", "Symphony", "Booty Bass", "Primus", "Porn Groove", - "Satire", "Slow Jam", "Club", "Tango", "Samba", - "Folklore", "Ballad", "Power Ballad", "Rhythmic Soul", "Freestyle", - "Duet", "Punk Rock", "Drum Solo", "A Cappella", "Euro-House", - //125-149 - "Dance Hall", "Goa", "Drum & Bass", "Club-House", "Hardcore", - "Terror", "Indie", "BritPop", "Negerpunk", "Polsk Punk", - "Beat", "Christian Gangsta Rap", "Heavy Metal", "Black Metal", "Crossover", - "Contemporary Christian", "Christian Rock", "Merengue", "Salsa", "Thrash Metal", - "Anime", "JPop", "Synthpop" -}; +#ifdef HAVE_LIBID3 ostream& operator<<(ostream& s, const ID3_Tag* tag ) { - /* this gets all frames, but the info is rather difficult to get, - just assume all is ID3FN_TEXT here and hope we get the most... - */ - /* - size_t max = tag->NumFrames(); - // s << "frames: " << max << endl; - for ( size_t n=0; nGetDescription() << " " << - ID3_GetString(frame,ID3FN_TEXT) << endl; - } - } - */ - - // Print just what we want... s.setf(ios::left); // The filled fields get the text to the left s << @@ -156,40 +122,49 @@ ostream& operator<<(ostream& s, const ID "Album: " << nn(ID3_GetAlbum(tag)) << endl ; + s << - "Genre : " << setw(18) << nn(ID3_gen_list[ID3_GetGenreNum(tag)]) << + "Genre : " << setw(18) << nn(ID3_GetGenre(tag)) << "Track: " << setw(5) << ID3_GetTrackNum(tag) << "Year: " << setw(6) << nn(ID3_GetYear(tag)); -// if ( ID3_GetComment(tag) ){ -// s << endl << "Comment:" << nn(ID3_GetComment(tag)) << -// nn(ID3_GetLyricist(tag)) << nn(ID3_GetLyrics(tag)); -// } return s; } + #endif /* HAVE_LIBID3 */ static void play(char *filename) { if( splay_verbose-- ) cout << filename << ":" << endl; - if( splay_verbose>0 ) + +#ifdef TAGLIB + if( splay_verbose > 0) // cant do ID3 stuff on stdin + { + std::cout << *TagLib::MPEG::File(filename).tag(); + } +#endif /* TAGLIB */ + +#ifdef HAVE_LIBID3 + + if( splay_verbose>0) { // cerr << getpid() << endl; -#ifdef HAVE_LIBID3 try { const ID3_Tag* mytag = new ID3_Tag(filename); if ( mytag->HasV1Tag() || mytag->HasV2Tag() ) cout << mytag << endl; delete mytag; - } - catch(ID3_Error &err){ - cout << err.GetErrorFile() << " (" << err.GetErrorLine() << "): " - << err.GetErrorType() << ": " << err.GetErrorDesc() << endl; +// catch(ID3_Error &err){ + catch(...){ + cout << "Error found (GetError functions disabled)" << endl; +// cout << err.GetErrorFile() << " (" << err.GetErrorLine() << "): " +// << err.GetErrorType() << ": " << err.GetErrorDesc() << endl; } -#endif /* HAVE_LIBID3 */ } + +#endif /* HAVE_LIBID3 */ Mpegfileplayer *player; --- splay-0.9.5.2.orig/apps/xsplay.cc +++ splay-0.9.5.2/apps/xsplay.cc @@ -27,10 +27,10 @@ #endif /* HAVE_LIBID3 */ #include -#include +#include #include -#include -#include +#include +#include #include "mpegsound.h" #include "xsplay.h" @@ -213,8 +213,9 @@ static void xplaympeg(char *filename,Sou } } catch(ID3_Error &err){ - cout << err.GetErrorFile() << " (" << err.GetErrorLine() << "): " - << err.GetErrorType() << ": " << err.GetErrorDesc() << endl; + cout << "Error found (GetError functions disabled)" << endl; +// cout << err.GetErrorFile() << " (" << err.GetErrorLine() << "): " +// << err.GetErrorType() << ": " << err.GetErrorDesc() << endl; } #endif /* HAVE_LIBID3 */ debian/patches/series0000644000000000000000000000001311766263513012036 0ustar 0.9.5.2-13 debian/copyright_0000644000000000000000000000275511766263513011303 0ustar Authors: Woo-jae Jung Mikael Hedin Copyright: 1997,1998,1999,2000 Woo-jae Jung 2000,2001,2003,2004 Mikael Hedin Debian maintainers: 1997 Johnie Ingram 1998-2004 Zed Pobre 2004 John Hedges Debian packaging copyright: 1997 Johnie Ingram 1998,1999,2000,2001,2002,2003,2004 Zed Pobre 2004 John Hedges The original source can be found at http://splay.sourceforge.net 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 Street, Fifth Floor, Boston, MA 02110-1301 USA. You can use this program under GPL. You can use these libraries under Library GPL. 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/README.Debian0000644000000000000000000000047011766263513011242 0ustar splay/xsplay for Debian ----------------------- The Debian splay package no longer contains the xsplay GUI. It could be included again in a future release if there is sufficient demand. In the meantime I can recommend xmms should you require a player with a GUI. John Hedges , August 2004