update to eboard 0.5.2.

remove sound diffs that are now in the distro.
This commit is contained in:
fgsch 2002-06-07 18:38:45 +00:00
parent f300d9e76c
commit 940239c677
5 changed files with 10 additions and 102 deletions

View File

@ -1,8 +1,8 @@
# $OpenBSD: Makefile,v 1.13 2002/05/13 12:31:07 fgsch Exp $
# $OpenBSD: Makefile,v 1.14 2002/06/07 18:38:45 fgsch Exp $
COMMENT= "gtk+ chess board interface"
DISTNAME= eboard-0.5.1
DISTNAME= eboard-0.5.2
CATEGORIES= games
NEED_VERSION= 1.528
@ -20,7 +20,7 @@ MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=eboard/}
LIB_DEPENDS= Imlib.19,gdk_imlib::graphics/imlib
USE_X11= Yes
CONFIGURE_STYLE= autoconf
CONFIGURE_STYLE= gnu
DOCS= Crafty.txt FICS-Timeseal.txt GNUChess4.txt GNUChess5.txt \
Scripts.txt Sjeng.txt Themes.txt

View File

@ -1,3 +1,3 @@
MD5 (eboard-0.5.1.tar.gz) = da501b3e4a8445a2e6c4194832565975
RMD160 (eboard-0.5.1.tar.gz) = ddd7dafdf69733bfde87d0fbd5ec4328496853db
SHA1 (eboard-0.5.1.tar.gz) = 17e1f839ddb7613f5f1e2305676ca0fa34e770c7
MD5 (eboard-0.5.2.tar.gz) = abb91d9681352d185015efc2deabdcd9
RMD160 (eboard-0.5.2.tar.gz) = a1a156e6ae60c3cbeaf580329125e7b59818b56a
SHA1 (eboard-0.5.2.tar.gz) = 8a6e6e553c4a64040ca1a227eda5dea8bfa129b8

View File

@ -1,13 +0,0 @@
$OpenBSD: patch-config_h_in,v 1.1 2002/05/02 07:46:24 fgsch Exp $
--- config.h.in.orig Wed May 1 21:57:53 2002
+++ config.h.in Wed May 1 21:58:20 2002
@@ -17,6 +17,9 @@
/* Define if you have the <sys/soundcard.h> header file. */
#undef HAVE_SYS_SOUNDCARD_H
+/* Define if you have the <sys/audioio.h> header file. */
+#undef HAVE_SYS_AUDIOIO_H
+
/* Define if you have the <vector> header file. */
#undef HAVE_VECTOR

View File

@ -1,11 +0,0 @@
$OpenBSD: patch-configure_in,v 1.1 2002/05/02 07:46:24 fgsch Exp $
--- configure.in.orig Wed May 1 21:57:45 2002
+++ configure.in Wed May 1 21:58:31 2002
@@ -37,6 +37,7 @@ AC_CHECK_HEADERS(vector)
AC_CHECK_HEADERS(string)
AC_CHECK_HEADERS(sys/soundcard.h)
+AC_CHECK_HEADERS(sys/audioio.h)
AC_PATH_PROGS(GTKCONFIG,gtk-config gtk12-config gtk13-config,no)

View File

@ -1,16 +1,7 @@
$OpenBSD: patch-sound_cc,v 1.2 2002/05/02 09:38:10 fgsch Exp $
--- sound.cc.orig Tue Apr 23 22:16:33 2002
+++ sound.cc Thu May 2 05:33:34 2002
@@ -45,6 +45,8 @@
#ifdef HAVE_SYS_SOUNDCARD_H
#include <sys/soundcard.h>
+#elif defined HAVE_SYS_AUDIOIO_H
+#include <sys/audioio.h>
#endif
SoundEvent::SoundEvent() {
@@ -52,7 +54,7 @@ SoundEvent::SoundEvent() {
$OpenBSD: patch-sound_cc,v 1.3 2002/06/07 18:38:45 fgsch Exp $
--- sound.cc.orig Fri Jun 7 03:24:53 2002
+++ sound.cc Fri Jun 7 03:25:34 2002
@@ -65,7 +65,7 @@ SoundEvent::SoundEvent() {
Pitch=800;
Duration=250;
Count=1;
@ -19,62 +10,3 @@ $OpenBSD: patch-sound_cc,v 1.2 2002/05/02 09:38:10 fgsch Exp $
ExtraData[0]=0;
}
@@ -219,6 +221,58 @@ void SoundEvent::sine_beep(char *device,
i+=::write(fd,&wave[i],ts-i);
ioctl(fd,SNDCTL_DSP_POST,0);
+
+ leave1:
+ close(fd);
+ leave2:
+ free(wave);
+#elif defined HAVE_SYS_AUDIOIO_H
+ audio_info_t ai;
+ int rate=11025; // Hz
+ int interval;
+
+ unsigned char *wave;
+ int bl,fd,i,ts;
+ double r,s;
+
+ interval=120*rate/1000; // 120 msec
+
+ wave=(unsigned char *)malloc(ts = (Count*(bl=(rate*duration)/1000) + (Count-1)*interval) );
+
+ if (!wave)
+ /* return; */
+ memset(wave,127,ts);
+
+ for(i=0;i<bl;i++) {
+ r=(double)pitch;
+ r/=(double)rate;
+ r*=(double)i;
+ s=(double)i;
+ s/=(double)bl;
+ s=0.30+sin(M_PI*s)*0.70;
+ wave[i]=(unsigned char)(128.0+127.0*s*sin(M_PI*2.0*r));
+ }
+
+ for(i=1;i<Count;i++)
+ memcpy(wave+i*(bl+interval),wave,bl);
+
+ fd=open(device,O_WRONLY);
+ if (fd<0)
+ goto leave2;
+
+ AUDIO_INITINFO(&ai);
+ ai.mode = AUMODE_PLAY;
+ ai.play.sample_rate = rate;
+ ai.play.channels = 1;
+ ai.play.encoding = AUDIO_ENCODING_ULINEAR;
+
+ if (ioctl(fd,AUDIO_SETINFO,&ai)==-1)
+ goto leave1;
+
+ for(i=0;i<ts;)
+ i+=::write(fd,&wave[i],ts-i);
+
+ ioctl(fd,AUDIO_DRAIN,0);
leave1:
close(fd);