On Thu, May 07, 2009 at 03:16:19AM -0700, Ryan Freeman wrote:
> On Thu, May 07, 2009 at 02:47:31AM -0700, Ryan Freeman wrote:

> > attached updated port again, this time with Jacob's snd_sdl.c patch
> > from open arena and the change from urandom to arandom. any other
> > comments/suggestions?
> > 
> 
> i should note since the last patch ioquake3 now plays sound fine with-
> out running aucat -l first. thanks Jacob!

I now have a setup where I feel there aren't really issues with my
video hardware and revisited the reported issues with sound stuttering
with the quake engines.  basically, the block size just needs to be a
little bigger.  there were a couple other SDL ports that had to have
their block size bumped as well.  if you look at the code in those
ports, as well as the code in the quake engines, it's pretty obvious
the author is either guessing or wondering why the latency they
programmed was not the actual latency.  this is because SDL only sets
the block size.  the number of blocks is not determined by SDL and is
implemented differently in the different backends.  the SDL ports
uses 2 blocks because it's both the minimum and the simplest to
determine overall latency.

-- 
[email protected]
SDF Public Access UNIX System - http://sdf.lonestar.org

Index: Makefile
===================================================================
RCS file: /cvs/ports/games/openarena/Makefile,v
retrieving revision 1.6
diff -N -u -p Makefile
--- Makefile    3 Aug 2009 16:57:44 -0000       1.6
+++ Makefile    10 Feb 2010 09:55:16 -0000
@@ -12,7 +12,7 @@ CATEGORIES =          games x11
 
 V =                    0.8.1
 
-PKGNAME-main =         openarena-${V}p0
+PKGNAME-main =         openarena-${V}p1
 PKGNAME-server =       openarena-server-${V}p0
 PKGNAME-data =         openarena-data-${V}p1
 
Index: patches/patch-code_sdl_sdl_snd_c
===================================================================
RCS file: patches/patch-code_sdl_sdl_snd_c
diff -N -u -p patches/patch-code_sdl_sdl_snd_c
--- /dev/null   10 Feb 2010 02:55:16 -0000
+++ patches/patch-code_sdl_sdl_snd_c    10 Feb 2010 09:55:16 -0000
@@ -0,0 +1,11 @@
+$OpenBSD$
+--- code/sdl/sdl_snd.c.orig    Sat Aug  9 09:28:12 2008
++++ code/sdl/sdl_snd.c Wed Feb 10 01:20:41 2010
+@@ -198,6 +198,7 @@ qboolean SNDDMA_Init(void)
+               else
+                       desired.samples = 2048;  // (*shrug*)
+       }
++      desired.samples *= 2;
+ 
+       desired.channels = (int) s_sdlChannels->value;
+       desired.callback = SNDDMA_AudioCallback;
Index: patches/patch-code_sys_sys_unix_c
===================================================================
RCS file: patches/patch-code_sys_sys_unix_c
diff -N -u -p patches/patch-code_sys_sys_unix_c
--- /dev/null   10 Feb 2010 02:55:16 -0000
+++ patches/patch-code_sys_sys_unix_c   10 Feb 2010 09:55:16 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- code/sys/sys_unix.c.orig   Sat May  2 16:44:02 2009
++++ code/sys/sys_unix.c        Sat May  2 16:44:21 2009
+@@ -139,7 +139,7 @@ qboolean Sys_RandomBytes( byte *string, int len )
+ {
+       FILE *fp;
+ 
+-      fp = fopen( "/dev/urandom", "r" );
++      fp = fopen( "/dev/arandom", "r" );
+       if( !fp )
+               return qfalse;
+ 

Reply via email to