www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-apps/2001/10/16/02:24:53

Mailing-List: contact cygwin-apps-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-apps-owner AT sourceware DOT cygnus DOT com
List-Subscribe: <mailto:cygwin-apps-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-apps/>
List-Post: <mailto:cygwin-apps AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-apps-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/lists.html#faqs>
Delivered-To: mailing list cygwin-apps AT sources DOT redhat DOT com
From: "Ralf Habacker" <Ralf DOT Habacker AT freenet DOT de>
To: "Cygwin-Apps" <cygwin-apps AT cygwin DOT com>,
"Cygwin-Xfree" <cygwin-xfree AT sources DOT redhat DOT com>
Subject: [ANNOUNCEMENT] cygwin patch for xfree game rocks & diamonts available
Date: Tue, 16 Oct 2001 08:27:43 +0200
Message-ID: <000a01c1560b$a96ce6c0$651c440a@BRAMSCHE>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Importance: Normal

This is a multi-part message in MIME format.

------=_NextPart_000_000B_01C1561C.6CF5B6C0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Hi,
to see how the cygwin sound support works and to compare cygwin performance in
some cases I have created a patch for the xfree game rocks & diamond from
http://www.artsoft.org/rocksndiamonds to enable the game on cygwin/xfree.

Now it runs with limited sound support:

1. Stopping of musics does not react immediatly (need about 20-30 seconds to
stop).
2. Delay on playing sounds (you can verify it with tutorial level 000)
3. While playing sound there are some unexcepted noise
4. cygwin uses a fixed buffer size of 16384. r&d like to use a 512 byte buffer,
which cygwin does ignore.
   This causes delay in 1.

To get it running for yourself, download the unix 2.0.0 src and apply the
appended patch.

Have fun

Ralf


------=_NextPart_000_000B_01C1561C.6CF5B6C0
Content-Type: application/octet-stream;
	name="rocksndiamonds-2.0.0-cygwin.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="rocksndiamonds-2.0.0-cygwin.patch"

diff -rubB rocksndiamonds-2.0.0/Makefile =
rocksndiamonds-2.0.0-cygwin/Makefile=0A=
--- rocksndiamonds-2.0.0/Makefile	Sun Dec 31 16:24:30 2000=0A=
+++ rocksndiamonds-2.0.0-cygwin/Makefile	Sat Oct 13 08:12:39 2001=0A=
@@ -12,7 +12,7 @@=0A=
 =0A=
 # specify path to X11 on your system=0A=
 # if undefined, use system defaults (works with Linux/gcc/libc5)=0A=
-X11_PATH =3D /usr/X11=0A=
+X11_PATH =3D /usr/X11R6=0A=
 =0A=
 # specify directory for read-only game data (like graphics, sounds, =
levels)=0A=
 # default is '.', so you can play without installing game data somewhere=0A=
diff -rubB rocksndiamonds-2.0.0/src/Makefile =
rocksndiamonds-2.0.0-cygwin/src/Makefile=0A=
--- rocksndiamonds-2.0.0/src/Makefile	Mon Jan  1 18:02:21 2001=0A=
+++ rocksndiamonds-2.0.0-cygwin/src/Makefile	Sat Oct 13 15:00:35 2001=0A=
@@ -6,13 +6,16 @@=0A=
 .EXPORT_ALL_VARIABLES:=0A=
 =0A=
 ifndef PLATFORM			# platform not specified -- try auto detection=0A=
+ifeq ($(OSTYPE),cygwin)	# MS-DOS native compiling=0A=
+PLATFORM =3D unix =0A=
+else =0A=
 ifdef COMSPEC=0A=
 PLATFORM =3D msdos=0A=
 else=0A=
 PLATFORM =3D unix=0A=
 endif=0A=
 endif=0A=
-=0A=
+endif =0A=
 ifdef X11_PATH			# path to X11 specified by top level Makefile=0A=
 XINC_PATH =3D $(X11_PATH)/include=0A=
 XLIB_PATH =3D $(X11_PATH)/lib=0A=
diff -rubB rocksndiamonds-2.0.0/src/libgame/sound.h =
rocksndiamonds-2.0.0-cygwin/src/libgame/sound.h=0A=
--- rocksndiamonds-2.0.0/src/libgame/sound.h	Sat Dec 16 21:07:58 2000=0A=
+++ rocksndiamonds-2.0.0-cygwin/src/libgame/sound.h	Sat Oct 13 16:39:34 =
2001=0A=
@@ -22,7 +22,9 @@=0A=
 #include <sys/ioctl.h>=0A=
 #endif=0A=
 =0A=
-#if defined(PLATFORM_LINUX)=0A=
+#if defined(__CYGWIN__)=0A=
+#include <sys/soundcard.h>=0A=
+#elif defined(PLATFORM_LINUX)=0A=
 #include <linux/soundcard.h>=0A=
 #elif defined(PLATFORM_FREEBSD)=0A=
 #include <machine/soundcard.h>=0A=
@@ -33,7 +35,7 @@=0A=
 #include "system.h"=0A=
 =0A=
 =0A=
-#if defined(PLATFORM_LINUX) || defined(PLATFORM_FREEBSD) || =
defined(VOXWARE)=0A=
+#if defined(PLATFORM_LINUX) || defined(PLATFORM_FREEBSD) || =
defined(VOXWARE) || defined(__CYGWIN__)=0A=
 #define AUDIO_STREAMING_DSP=0A=
 #endif=0A=
 =0A=
@@ -75,7 +77,9 @@=0A=
 #define MAX_SOUNDS_PLAYING			8=0A=
 #endif=0A=
 =0A=
-#if !defined(PLATFORM_HPUX)=0A=
+#if defined(__CYGWIN__)=0A=
+#define SND_BLOCKSIZE 16384=0A=
+#elif !defined(PLATFORM_HPUX)=0A=
 #define SND_BLOCKSIZE 4096=0A=
 #else=0A=
 #define SND_BLOCKSIZE 32768=0A=

------=_NextPart_000_000B_01C1561C.6CF5B6C0--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019