pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/devel/SDL Remove delay whilst writing audio. Improves...
details: https://anonhg.NetBSD.org/pkgsrc/rev/6d9c1425ac26
branches: trunk
changeset: 652362:6d9c1425ac26
user: nat <nat%pkgsrc.org@localhost>
date: Sun May 31 09:17:53 2015 +0000
description:
Remove delay whilst writing audio. Improves latency.
Make it so wscons video will initialize without keyboard and mouse.
This commit was approved by wiz@
diffstat:
devel/SDL/Makefile | 4 +-
devel/SDL/distinfo | 5 +-
devel/SDL/patches/patch-src_audio_bsd_SDL__bsdaudio.c | 15 +++++++++
devel/SDL/patches/patch-src_video_wscons_SDL__wsconsvideo.c | 21 +++++++-----
4 files changed, 32 insertions(+), 13 deletions(-)
diffs (93 lines):
diff -r 8645e253fe36 -r 6d9c1425ac26 devel/SDL/Makefile
--- a/devel/SDL/Makefile Sun May 31 08:31:50 2015 +0000
+++ b/devel/SDL/Makefile Sun May 31 09:17:53 2015 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.122 2015/04/25 14:20:31 tnn Exp $
+# $NetBSD: Makefile,v 1.123 2015/05/31 09:17:53 nat Exp $
DISTNAME= SDL-1.2.15
-PKGREVISION= 17
+PKGREVISION= 18
CATEGORIES= devel games
MASTER_SITES= http://www.libsdl.org/release/
diff -r 8645e253fe36 -r 6d9c1425ac26 devel/SDL/distinfo
--- a/devel/SDL/distinfo Sun May 31 08:31:50 2015 +0000
+++ b/devel/SDL/distinfo Sun May 31 09:17:53 2015 +0000
@@ -1,15 +1,16 @@
-$NetBSD: distinfo,v 1.76 2015/03/03 19:14:04 jmcneill Exp $
+$NetBSD: distinfo,v 1.77 2015/05/31 09:17:53 nat Exp $
SHA1 (SDL-1.2.15.tar.gz) = 0c5f193ced810b0d7ce3ab06d808cbb5eef03a2c
RMD160 (SDL-1.2.15.tar.gz) = d4802a090cb4a24eeb0c8ce5690802f596d394c3
Size (SDL-1.2.15.tar.gz) = 3920622 bytes
SHA1 (patch-aa) = 00fb7a85caf8fc9f08298d0a07a4587757fdffb0
SHA1 (patch-ac) = 8b2dddff9ad449b19b35ef364e2d960e46284563
+SHA1 (patch-src_audio_bsd_SDL__bsdaudio.c) = 7f5fbf4d839e52fce028810dc807b404fcd51442
SHA1 (patch-src_audio_sun_SDL__sunaudio.c) = 4b492b40d39e6444037dfda55766e4a149cc6c30
SHA1 (patch-src_joystick_bsd_SDL__sysjoystick.c) = 46029dda8975dcb891a5b14b718c27b034ce5b06
SHA1 (patch-src_video_quartz_SDL__QuartzVideo.h) = 19d952bade06dbd646e94f42139c38436969b1a8
SHA1 (patch-src_video_wscons_SDL__wsconsevents.c) = 1c874c46edb325907eda3bfa7580c788294f6d21
SHA1 (patch-src_video_wscons_SDL__wsconsevents__c.h) = 97206e2aca0b620005217d9d07ad1177516cac92
-SHA1 (patch-src_video_wscons_SDL__wsconsvideo.c) = 17e048ccb201ae961e820ab880d5a588b2db2639
+SHA1 (patch-src_video_wscons_SDL__wsconsvideo.c) = 741ac9570c4e6e554a191660011b7e3bbe30ce7c
SHA1 (patch-src_video_wscons_SDL__wsconsvideo.h) = efc75da910cfe370b7361a0b9d2b90837c6b9aa9
SHA1 (patch-src_video_x11_SDL_x11video.c) = 624fbb7e701d6de6ec93096beea7c085125934aa
diff -r 8645e253fe36 -r 6d9c1425ac26 devel/SDL/patches/patch-src_audio_bsd_SDL__bsdaudio.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/SDL/patches/patch-src_audio_bsd_SDL__bsdaudio.c Sun May 31 09:17:53 2015 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_audio_bsd_SDL__bsdaudio.c,v 1.1 2015/05/31 09:17:53 nat Exp $
+
+# Remove delay as there is already an inherent delay in writing audio.
+--- src/audio/bsd/SDL_bsdaudio.c.orig 2012-01-19 06:30:06.000000000 +0000
++++ src/audio/bsd/SDL_bsdaudio.c
+@@ -203,9 +203,6 @@ OBSD_PlayAudio(_THIS)
+ break;
+ }
+
+- if ( p < written || ((written < 0) && ((errno == 0) || (errno == EAGAIN))) ) {
+- SDL_Delay(1); /* Let a little CPU time go by */
+- }
+ } while ( p < written );
+
+ /* If timer synchronization is enabled, set the next write frame */
diff -r 8645e253fe36 -r 6d9c1425ac26 devel/SDL/patches/patch-src_video_wscons_SDL__wsconsvideo.c
--- a/devel/SDL/patches/patch-src_video_wscons_SDL__wsconsvideo.c Sun May 31 08:31:50 2015 +0000
+++ b/devel/SDL/patches/patch-src_video_wscons_SDL__wsconsvideo.c Sun May 31 09:17:53 2015 +0000
@@ -1,5 +1,6 @@
-$NetBSD: patch-src_video_wscons_SDL__wsconsvideo.c,v 1.4 2015/01/29 01:56:02 jmcneill Exp $
+$NetBSD: patch-src_video_wscons_SDL__wsconsvideo.c,v 1.5 2015/05/31 09:17:53 nat Exp $
+#Allow video to initialize even if there is no keyboard and mouse.
--- src/video/wscons/SDL_wsconsvideo.c.orig 2012-01-19 06:30:06.000000000 +0000
+++ src/video/wscons/SDL_wsconsvideo.c
@@ -141,12 +141,18 @@ VideoBootStrap WSCONS_bootstrap = {
@@ -66,17 +67,19 @@
} else {
WSCONS_ReportError("Displays with 8 bpp or less are not supported");
return -1;
-@@ -326,6 +350,9 @@ int WSCONS_VideoInit(_THIS, SDL_PixelFor
- if (WSCONS_InitKeyboard(this) == -1) {
- return -1;
- }
-+ if (WSCONS_InitMouse(this) == -1) {
-+ return -1;
-+ }
+@@ -323,9 +347,8 @@ int WSCONS_VideoInit(_THIS, SDL_PixelFor
+ vformat->BitsPerPixel = private->info.depth;
+ vformat->BytesPerPixel = private->info.depth / 8;
+
+- if (WSCONS_InitKeyboard(this) == -1) {
+- return -1;
+- }
++ WSCONS_InitKeyboard(this);
++ WSCONS_InitMouse(this);
return 0;
}
-@@ -601,7 +628,12 @@ void WSCONS_VideoQuit(_THIS)
+@@ -601,7 +624,12 @@ void WSCONS_VideoQuit(_THIS)
}
WSCONS_ReleaseKeyboard(this);
Home |
Main Index |
Thread Index |
Old Index