On Mon, Dec 21, 2009 at 09:57:25PM +0000, Christian Weisgerber wrote:
> Jacob Meuser <jake...@sdf.lonestar.org> wrote:
> 
> > - update to mp3blaster-3.2.5
> > - use SDL audio output instead of ossaudio
> 
> Regression: Ogg Vorbis files now skip badly.
> 
> (It also retains the problem from previous versions that playing
> MP3s sucks all the CPU it can get.)

this version takes care of both issues for me.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org

Index: Makefile
===================================================================
RCS file: /cvs/ports/audio/mp3blaster/Makefile,v
retrieving revision 1.11
diff -N -u -p Makefile
--- Makefile    20 Mar 2008 17:23:04 -0000      1.11
+++ Makefile    22 Dec 2009 13:54:21 -0000
@@ -2,25 +2,28 @@
 
 COMMENT=       text console audio player with an interactive interface
 
-DISTNAME=      mp3blaster-3.2.1
-PKGNAME=       ${DISTNAME}p0
+DISTNAME=      mp3blaster-3.2.5
 CATEGORIES=    audio
 HOMEPAGE=      http://mp3blaster.sourceforge.net/
 
-# GPL
+# GPLv2
 PERMIT_PACKAGE_CDROM=  Yes
 PERMIT_PACKAGE_FTP=    Yes
 PERMIT_DISTFILES_CDROM=        Yes
 PERMIT_DISTFILES_FTP=  Yes
 
-WANTLIB=       c m ncurses ogg ossaudio pthread stdc++
+WANTLIB=       c m ncurses ogg pthread stdc++
 
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=mp3blaster/}
 
 LIB_DEPENDS=   sidplay.>=1::audio/libsidplay \
-               vorbis.>=1,vorbisfile.>=2::audio/libvorbis
+               vorbis.>=1,vorbisfile.>=2::audio/libvorbis \
+               SDL::devel/sdl
 
 CONFIGURE_STYLE=gnu
-CONFIGURE_ARGS=        --with-cxxflags="${CXXFLAGS}"
+CONFIGURE_ARGS=        --without-esd \
+               --without-oss \
+               --with-sdl
+CONFIGURE_ENV+=        ac_cv_lib_ossaudio_main=no
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/audio/mp3blaster/distinfo,v
retrieving revision 1.7
diff -N -u -p distinfo
--- distinfo    5 Apr 2007 15:37:43 -0000       1.7
+++ distinfo    22 Dec 2009 13:54:21 -0000
@@ -1,5 +1,5 @@
-MD5 (mp3blaster-3.2.1.tar.gz) = JeOkQezSJpPT00bR/i2Fiw==
-RMD160 (mp3blaster-3.2.1.tar.gz) = apc3kDuI3BRjJ5mWawPHSD1/6GM=
-SHA1 (mp3blaster-3.2.1.tar.gz) = rha0Zrt4VCdO9EKBA8qGF8hbh1I=
-SHA256 (mp3blaster-3.2.1.tar.gz) = 1cKFURwVG8WEnbv9ud0aX6+Fe/rOc1I1KnrPjPCS55c=
-SIZE (mp3blaster-3.2.1.tar.gz) = 320282
+MD5 (mp3blaster-3.2.5.tar.gz) = 7bO7EiVT0tVE37CEAQMRxg==
+RMD160 (mp3blaster-3.2.5.tar.gz) = iso2KmISqTytJuQoSAsjN2axiIs=
+SHA1 (mp3blaster-3.2.5.tar.gz) = ag/IkuBzmkCXNehbGAicDiX8xXc=
+SHA256 (mp3blaster-3.2.5.tar.gz) = EpEVdCx3NizDUI63eCcCz7RK8kY6VFPo0Z6mirzO3Ck=
+SIZE (mp3blaster-3.2.5.tar.gz) = 329407
Index: patches/patch-configure
===================================================================
RCS file: /cvs/ports/audio/mp3blaster/patches/patch-configure,v
retrieving revision 1.2
diff -N -u -p patches/patch-configure
--- patches/patch-configure     23 Jan 2006 17:09:36 -0000      1.2
+++ patches/patch-configure     22 Dec 2009 13:54:21 -0000
@@ -1,7 +1,16 @@
-$OpenBSD: patch-configure,v 1.2 2006/01/23 17:09:36 naddy Exp $
---- configure.orig     Mon Jan 23 17:30:07 2006
-+++ configure  Mon Jan 23 17:30:29 2006
-@@ -4800,7 +4800,7 @@ if test "${ac_cv_lib_vorbisfile_main+set
+$OpenBSD$
+--- configure.orig     Sat Jan 24 07:54:16 2009
++++ configure  Sat Dec 19 20:53:30 2009
+@@ -2267,7 +2267,7 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMT
+ 
+ 
+ #Custom C++ flags - later options override earlier ones
+-if  -z "$CXXFLAGS"  ; then
++if [ -z "$CXXFLAGS" ] ; then
+       CXXFLAGS="-O2 -Wall -W -fno-strength-reduce"
+ fi
+ 
+@@ -5777,7 +5777,7 @@ if test "${ac_cv_lib_vorbisfile_main+set}" = set; then
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
    ac_check_lib_save_LIBS=$LIBS
@@ -10,12 +19,12 @@ $OpenBSD: patch-configure,v 1.2 2006/01/23 17:09:36 na
  cat >conftest.$ac_ext <<_ACEOF
  /* confdefs.h.  */
  _ACEOF
-@@ -4858,7 +4858,7 @@ else
+@@ -5833,7 +5833,7 @@ else
  fi
  
    if test "$HAVE_OGG" = "yes" ; then
 -    OGG_LIBS="-lvorbisfile -lvorbis"
 +    OGG_LIBS="-lvorbisfile -lvorbis -logg"
  
-     cat >>confdefs.h <<\_ACEOF
- #define INCLUDE_OGG 1
+ 
+ cat >>confdefs.h <<\_ACEOF
Index: patches/patch-mpegsound_mpegtoraw_cc
===================================================================
RCS file: patches/patch-mpegsound_mpegtoraw_cc
diff -N -u -p patches/patch-mpegsound_mpegtoraw_cc
--- /dev/null   22 Dec 2009 06:54:21 -0000
+++ patches/patch-mpegsound_mpegtoraw_cc        22 Dec 2009 13:54:21 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+sleep a bit longer to not use excessive CPU cycles.
+
+--- mpegsound/mpegtoraw.cc.orig        Tue Dec 22 04:32:09 2009
++++ mpegsound/mpegtoraw.cc     Tue Dec 22 04:41:35 2009
+@@ -685,7 +685,7 @@ inline void Mpegtoraw::flushrawdata(void)
+               
if(((threadqueue.tail+1)%threadqueue.framenumber)==threadqueue.head)
+               {
+                       
while(((threadqueue.tail+1)%threadqueue.framenumber)==threadqueue.head)
+-      USLEEP(200);
++      USLEEP(2000);
+               }
+               
memcpy(threadqueue.buffer+(threadqueue.tail*RAWDATASIZE),rawdata,
+                RAWDATASIZE*sizeof(short int));
Index: patches/patch-mpegsound_oggplayer_cc
===================================================================
RCS file: /cvs/ports/audio/mp3blaster/patches/patch-mpegsound_oggplayer_cc,v
retrieving revision 1.1
diff -N -u -p patches/patch-mpegsound_oggplayer_cc
--- patches/patch-mpegsound_oggplayer_cc        1 Dec 2003 19:18:19 -0000       
1.1
+++ patches/patch-mpegsound_oggplayer_cc        22 Dec 2009 13:54:21 -0000
@@ -1,12 +1,37 @@
-$OpenBSD: patch-mpegsound_oggplayer_cc,v 1.1 2003/12/01 19:18:19 naddy Exp $
---- mpegsound/oggplayer.cc.orig        2003-12-01 20:00:37.000000000 +0100
-+++ mpegsound/oggplayer.cc     2003-12-01 20:00:54.000000000 +0100
-@@ -23,7 +23,7 @@ Oggplayer::Oggplayer()
- /* Martijn suggests that big endiannes is already taken care of in the 
rawplayer
-  * class.
-  */
--#if 0 && defined(WORDS_BIGENDIAN)
-+#if defined(WORDS_BIGENDIAN)
-       bigendian = 1;
- #endif
-       //TODO: On what hardware is data unsigned, and how do I know?
+$OpenBSD$
+
+ov_read() can return less than asked for.  get the full 4096 bytes
+before continuing to save cycles and avoid confusion elsewhere.
+
+--- mpegsound/oggplayer.cc.orig        Tue Dec 22 05:08:01 2009
++++ mpegsound/oggplayer.cc     Tue Dec 22 05:43:24 2009
+@@ -156,15 +156,22 @@ bool Oggplayer::playing()
+ bool Oggplayer::run(int sec)
+ {
+       int bitstream;
+-      long bytes_read = ov_read(of, soundbuf, 4096, bigendian, wordsize, 
signeddata,
+-              &bitstream);
+ 
+-      if (sec); //prevent warning
++      long bytes_read, ret, off;
+ 
+-      if (bytes_read < 0)
+-              return seterrorcode(SOUND_ERROR_BAD);
+-      if (!bytes_read)
+-              return seterrorcode(SOUND_ERROR_FINISH);
++      bytes_read = off = 0;
++      while (bytes_read < 4096) {
++              ret = ov_read(of, soundbuf + off, 4096 - bytes_read, bigendian, 
wordsize, signeddata,
++                  &bitstream);
++              if (ret < 0)
++                      return seterrorcode(SOUND_ERROR_BAD);
++              if (!ret)
++                      return seterrorcode(SOUND_ERROR_FINISH);
++              off += ret;
++              bytes_read += ret;
++      }
++
++      if (sec); //prevent warning
+       
+       vorbis_info *vi = ov_info(of, bitstream);
+ 
Index: patches/patch-nmixer_getopt_h
===================================================================
RCS file: /cvs/ports/audio/mp3blaster/patches/patch-nmixer_getopt_h,v
retrieving revision 1.3
diff -N -u -p patches/patch-nmixer_getopt_h
--- patches/patch-nmixer_getopt_h       29 Dec 2004 20:39:37 -0000      1.3
+++ /dev/null   22 Dec 2009 13:36:37 -0000
@@ -1,18 +0,0 @@
-$OpenBSD: patch-nmixer_getopt_h,v 1.3 2003/12/29 20:39:37 espie Exp $
---- nmixer/getopt.h.orig       2003-12-29 21:30:27.000000000 +0100
-+++ nmixer/getopt.h    2003-12-29 21:30:38.000000000 +0100
-@@ -97,14 +97,7 @@ struct option
- #define optional_argument     2
- 
- #if defined (__STDC__) && __STDC__
--#ifdef __GNU_LIBRARY__
--/* Many other libraries have conflicting prototypes for getopt, with
--   differences in the consts, in stdlib.h.  To avoid compilation
--   errors, only prototype getopt for the GNU C library.  */
- extern int getopt (int argc, char *const *argv, const char *shortopts);
--#else /* not __GNU_LIBRARY__ */
--extern int getopt ();
--#endif /* __GNU_LIBRARY__ */
- extern int getopt_long (int argc, char *const *argv, const char *shortopts,
-                       const struct option *longopts, int *longind);
- extern int getopt_long_only (int argc, char *const *argv,
Index: patches/patch-src_getopt_h
===================================================================
RCS file: /cvs/ports/audio/mp3blaster/patches/patch-src_getopt_h,v
retrieving revision 1.3
diff -N -u -p patches/patch-src_getopt_h
--- patches/patch-src_getopt_h  29 Dec 2004 20:39:37 -0000      1.3
+++ /dev/null   22 Dec 2009 13:36:37 -0000
@@ -1,18 +0,0 @@
-$OpenBSD: patch-src_getopt_h,v 1.3 2003/12/29 20:39:37 espie Exp $
---- src/getopt.h.orig  2003-12-29 17:21:09.000000000 +0100
-+++ src/getopt.h       2003-12-29 17:21:33.000000000 +0100
-@@ -97,14 +97,7 @@ struct option
- #define optional_argument     2
- 
- #if defined (__STDC__) && __STDC__
--#ifdef __GNU_LIBRARY__
--/* Many other libraries have conflicting prototypes for getopt, with
--   differences in the consts, in stdlib.h.  To avoid compilation
--   errors, only prototype getopt for the GNU C library.  */
- extern int getopt (int argc, char *const *argv, const char *shortopts);
--#else /* not __GNU_LIBRARY__ */
--extern int getopt ();
--#endif /* __GNU_LIBRARY__ */
- extern int getopt_long (int argc, char *const *argv, const char *shortopts,
-                       const struct option *longopts, int *longind);
- extern int getopt_long_only (int argc, char *const *argv,
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/audio/mp3blaster/pkg/PLIST,v
retrieving revision 1.4
diff -N -u -p pkg/PLIST
--- pkg/PLIST   6 Aug 2004 14:37:27 -0000       1.4
+++ pkg/PLIST   22 Dec 2009 13:54:21 -0000
@@ -1,8 +1,8 @@
 @comment $OpenBSD: PLIST,v 1.4 2004/08/06 14:37:27 espie Exp $
-bin/mp3blaster
-bin/mp3tag
-bin/nmixer
-bin/splay
+...@bin bin/mp3blaster
+...@bin bin/mp3tag
+...@bin bin/nmixer
+...@bin bin/splay
 @man man/man1/mp3blaster.1
 @man man/man1/nmixer.1
 @man man/man1/splay.1

Reply via email to