On Thu, Jan 22, 2009 at 10:27:55AM +0000, Jacob Meuser wrote:
> 
> why does this no_sound flavor exist?  the sound works on my azalia
> which only does 44.1 and 48 kHz.

hmm.  games/amph and graphics/ffmpeg have SDL audio conversions turned
off too.  there may be others.  I know ffmpeg turned it off because
SDL's conversion could used to crash.  bu that's been fixed in the
port for a long time now.

in fact, there are patches in the SDL port that override these things
and turn conversions on when needed.  but it's probably better to
fix the ports.

ok on these?  and removing games/moonlander,nosound?

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

Index: games/amph/Makefile
===================================================================
RCS file: /home2/cvs/OpenBSD/ports/games/amph/Makefile,v
retrieving revision 1.13
diff -u -r1.13 Makefile
--- games/amph/Makefile 15 Sep 2007 18:01:00 -0000      1.13
+++ games/amph/Makefile 22 Jan 2009 11:52:32 -0000
@@ -5,7 +5,7 @@
 VERSION=       0.8.10
 DVERSION=      0.8.6
 DISTNAME=      amphetamine-${VERSION}
-PKGNAME=       amph-${VERSION}p0
+PKGNAME=       amph-${VERSION}p1
 CATEGORIES=    games x11
 EXTRACT_SUFX=  .tar.bz2
 
Index: games/amph/patches/patch-Makefile
===================================================================
RCS file: /home2/cvs/OpenBSD/ports/games/amph/patches/patch-Makefile,v
retrieving revision 1.6
diff -u -r1.6 patch-Makefile
--- games/amph/patches/patch-Makefile   21 Jan 2003 21:59:51 -0000      1.6
+++ games/amph/patches/patch-Makefile   22 Jan 2009 11:52:32 -0000
@@ -1,6 +1,6 @@
 $OpenBSD: patch-Makefile,v 1.6 2003/01/21 21:59:51 pvalchev Exp $
---- Makefile.orig      Mon Mar 25 12:11:27 2002
-+++ Makefile   Tue Jan 21 14:50:05 2003
+--- Makefile.orig      Mon Mar 25 11:11:27 2002
++++ Makefile   Thu Jan 22 02:39:13 2009
 @@ -3,14 +3,13 @@
  #===============
  
@@ -18,7 +18,7 @@
  SDL_LIBS := $(shell $(SDL_CONFIG) --libs)
  
  #=======================================================
-@@ -26,19 +25,19 @@ SEARCHDIRS := -I${MYCODEDIR} ${SDL_HEADE
+@@ -26,19 +25,19 @@ SEARCHDIRS := -I${MYCODEDIR} ${SDL_HEADERS}
  
  # makemake variables
  
@@ -43,7 +43,7 @@
  
  %.o : %.cpp
        ${CXX} ${CPPFLAGS} -c $< ${CXXFLAGS} -o $@
-@@ -47,7 +46,7 @@ CXXFLAGS  = ${DEPENDFLAGS} -O9 -funroll-
+@@ -47,7 +46,7 @@ CXXFLAGS  = ${DEPENDFLAGS} -O9 -funroll-loops -fomit-f
        ${CXX} ${CPPFLAGS} -c $< ${CXXFLAGS}
  
  # C preprocessor (C, C++, FORTRAN)
Index: games/amph/patches/patch-src_SndSys_cpp
===================================================================
RCS file: games/amph/patches/patch-src_SndSys_cpp
diff -N games/amph/patches/patch-src_SndSys_cpp
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ games/amph/patches/patch-src_SndSys_cpp     22 Jan 2009 11:52:32 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+--- src/SndSys.cpp.orig        Thu Jan 22 02:40:17 2009
++++ src/SndSys.cpp     Thu Jan 22 03:31:41 2009
+@@ -28,8 +28,8 @@ int InitializeSoundSystem()
+         wanted.callback = Mix_Audio;
+         wanted.userdata = NULL;
+ 
+-        /* Open the audio device, forcing the desired format */
+-        if ( SDL_OpenAudio(&wanted, &obtained) < 0 ) {
++        /* Open the audio device, allowing SDL to apply conversions */
++        if ( SDL_OpenAudio(&wanted, NULL) < 0 ) {
+                 fprintf(stderr, "InitSoundSystem: Couldn't open audio: %s\n", 
SDL_GetError());
+                 fprintf(stderr, "Sound was disabled. \n");
+                 return(-1);
Index: graphics/ffmpeg/Makefile
===================================================================
RCS file: /home2/cvs/OpenBSD/ports/graphics/ffmpeg/Makefile,v
retrieving revision 1.42
diff -u -r1.42 Makefile
--- graphics/ffmpeg/Makefile    13 Dec 2008 02:58:00 -0000      1.42
+++ graphics/ffmpeg/Makefile    22 Jan 2009 11:52:32 -0000
@@ -4,7 +4,7 @@
 
 V=                     20080620
 DISTNAME=              ffmpeg-svn-${V}
-PKGNAME=               ffmpeg-${V}p5
+PKGNAME=               ffmpeg-${V}p6
 SHARED_LIBS=           avutil          6.0 \
                        avcodec         13.0 \
                        avformat        12.0 \
Index: graphics/ffmpeg/patches/patch-ffplay_c
===================================================================
RCS file: graphics/ffmpeg/patches/patch-ffplay_c
diff -N graphics/ffmpeg/patches/patch-ffplay_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ graphics/ffmpeg/patches/patch-ffplay_c      22 Jan 2009 11:52:32 -0000
@@ -0,0 +1,26 @@
+$OpenBSD$
+--- ffplay.c.orig      Thu Jan 22 02:43:05 2009
++++ ffplay.c   Thu Jan 22 03:31:11 2009
+@@ -1684,7 +1684,7 @@ static int stream_component_open(VideoState *is, int s
+     AVFormatContext *ic = is->ic;
+     AVCodecContext *enc;
+     AVCodec *codec;
+-    SDL_AudioSpec wanted_spec, spec;
++    SDL_AudioSpec wanted_spec;
+ 
+     if (stream_index < 0 || stream_index >= ic->nb_streams)
+         return -1;
+@@ -1725,11 +1725,11 @@ static int stream_component_open(VideoState *is, int s
+         wanted_spec.samples = SDL_AUDIO_BUFFER_SIZE;
+         wanted_spec.callback = sdl_audio_callback;
+         wanted_spec.userdata = is;
+-        if (SDL_OpenAudio(&wanted_spec, &spec) < 0) {
++        if (SDL_OpenAudio(&wanted_spec, NULL) < 0) {
+             fprintf(stderr, "SDL_OpenAudio: %s\n", SDL_GetError());
+             return -1;
+         }
+-        is->audio_hw_buf_size = spec.size;
++        is->audio_hw_buf_size = wanted_spec.size;
+     }
+ 
+     if(thread_count>1)

Reply via email to