summaryrefslogtreecommitdiff
path: root/audio/rat30/files
diff options
context:
space:
mode:
authorKiriyama Kazuhiko <kiri@FreeBSD.org>2001-06-07 02:00:57 +0000
committerKiriyama Kazuhiko <kiri@FreeBSD.org>2001-06-07 02:00:57 +0000
commitc422afbe87c53e1fc5d798ed61dcdbe8c9fdedad (patch)
treefc51a4a4adbdf5935323b423ca6623c42bc95f4e /audio/rat30/files
parentUpdate to 4142 (diff)
New port for RAT(network audio tool) version 3.
PR: 21356 Submitted by:Takeshi MUTOH <mutoh@bovine.info.nara-k.ac.jp>
Notes
Notes: svn path=/head/; revision=43573
Diffstat (limited to 'audio/rat30/files')
-rw-r--r--audio/rat30/files/patch-Makefile10
-rw-r--r--audio/rat30/files/patch-Makefile_FreeBSD_49
-rw-r--r--audio/rat30/files/patch-aa69
-rw-r--r--audio/rat30/files/patch-ac53
4 files changed, 141 insertions, 0 deletions
diff --git a/audio/rat30/files/patch-Makefile b/audio/rat30/files/patch-Makefile
new file mode 100644
index 000000000000..4eaebd1f3efd
--- /dev/null
+++ b/audio/rat30/files/patch-Makefile
@@ -0,0 +1,10 @@
+--- Makefile.orig Tue Sep 14 19:39:00 1999
++++ Makefile Thu May 10 11:07:38 2001
+@@ -82,6 +82,7 @@
+ $(BINDIR)/rat-$(OSTYPE)-$(OSVERS): $(OBJS) $(GSMOBJS) $(CRYPTOBJS) $(RATOBJS)
+ rm -f $(BINDIR)/rat-$(OSTYPE)-$(OSVERS)
+ $(CC) $(RATOBJS) $(OBJS) $(GSMOBJS) $(CRYPTOBJS) $(LDLIBS) $(LDFLAGS) -o $(BINDIR)/rat-$(OSTYPE)-$(OSVERS)
++ cp $(BINDIR)/rat-$(OSTYPE)-$(OSVERS) bin/rat
+
+ $(OBJDIR)/%.o: $(SRCDIR)/%.c
+ $(CC) $(CFLAGS) $(GSMFLAGS) $(CRYPTFLAGS) -c $(SRCDIR)/$*.c -o $(OBJDIR)/$*.o
diff --git a/audio/rat30/files/patch-Makefile_FreeBSD_4 b/audio/rat30/files/patch-Makefile_FreeBSD_4
new file mode 100644
index 000000000000..36c4e87a95d7
--- /dev/null
+++ b/audio/rat30/files/patch-Makefile_FreeBSD_4
@@ -0,0 +1,9 @@
+--- Makefile_FreeBSD_4.org Mon May 7 13:07:46 2001
++++ Makefile_FreeBSD_4 Mon May 7 13:03:51 2001
+@@ -0,0 +1,6 @@
++TCL_INC = /usr/local/include/tcl8.2
++TK_INC = /usr/local/include/tk8.2
++INCS = -I/usr/X11R6/include \
++ -I$(TCL_INC)/generic -I$(TK_INC)/generic
++LDLIBS = -L/usr/local/lib \
++ -L/usr/X11R6/lib -ltk82 -ltcl82 -lXext -lX11 -lm
diff --git a/audio/rat30/files/patch-aa b/audio/rat30/files/patch-aa
new file mode 100644
index 000000000000..83e874042ceb
--- /dev/null
+++ b/audio/rat30/files/patch-aa
@@ -0,0 +1,69 @@
+*** src/auddev_freebsd.c.orig Wed Mar 24 16:22:19 1999
+--- src/auddev_freebsd.c Sat Sep 16 00:03:22 2000
+***************
+*** 89,102 ****
+ }
+ if ((ioctl(audio_fd, SNDCTL_DSP_SETFMT, &mode) == -1) || (mode != AFMT_S16_LE)) {
+ printf("Device doesn't support 16bit linear format!\n");
+ return -1;
+ }
+ if ((ioctl(audio_fd, SNDCTL_DSP_STEREO, &stereo) == -1) || (stereo != 0)) {
+ printf("Device doesn't support mono!\n");
+ return -1;
+ }
+! if ((ioctl(audio_fd, SNDCTL_DSP_SPEED, &speed) == -1) || (speed != 8000)) {
+ printf("Device doesn't support 8kHz sampling!\n");
+ return -1;
+ }
+
+--- 89,106 ----
+ }
+ if ((ioctl(audio_fd, SNDCTL_DSP_SETFMT, &mode) == -1) || (mode != AFMT_S16_LE)) {
+ printf("Device doesn't support 16bit linear format!\n");
++ close(audio_fd);
+ return -1;
+ }
+ if ((ioctl(audio_fd, SNDCTL_DSP_STEREO, &stereo) == -1) || (stereo != 0)) {
+ printf("Device doesn't support mono!\n");
++ close(audio_fd);
+ return -1;
+ }
+! // if ((ioctl(audio_fd, SNDCTL_DSP_SPEED, &speed) == -1) || (speed != 8000)) {
+! if (ioctl(audio_fd, SNDCTL_DSP_SPEED, &speed) == -1){
+ printf("Device doesn't support 8kHz sampling!\n");
++ close(audio_fd);
+ return -1;
+ }
+
+***************
+*** 158,163 ****
+--- 162,168 ----
+ * be open to do this, so if we're passed -1 as a file-descriptor we open
+ * the device, do the ioctl, and then close it again...
+ */
++ /*
+ snd_chan_param scp;
+ if (audio_fd == -1) {
+ audio_fd = audio_open_rw(O_RDONLY);
+***************
+*** 174,179 ****
+--- 179,197 ----
+ if (ioctl(audio_fd, AIOSFMT, 0) == -1) {
+ return FALSE;
+ }
++ */
++ int caps;
++ int was_defined = 1;
++ if (audio_fd == -1) {
++ audio_fd = audio_open_rw(O_RDWR);
++ was_defined = 0;
++ }
++ ioctl(audio_fd, SNDCTL_DSP_GETCAPS, &caps);
++ if ((caps & DSP_CAP_DUPLEX) == 0) {
++ if( was_defined == 0 ) audio_close(audio_fd);
++ return FALSE;
++ }
++ if( was_defined == 0 ) audio_close(audio_fd);
+ return TRUE;
+ }
+
diff --git a/audio/rat30/files/patch-ac b/audio/rat30/files/patch-ac
new file mode 100644
index 000000000000..4b8e62270300
--- /dev/null
+++ b/audio/rat30/files/patch-ac
@@ -0,0 +1,53 @@
+--- src/auddev_freebsd.c.p1 Mon Sep 18 10:27:40 2000
++++ src/auddev_freebsd.c Mon Sep 18 10:30:42 2000
+@@ -204,18 +204,10 @@
+ if (audio_fd <= 0) {
+ return;
+ }
+- switch (iport) {
+- case AUDIO_MICROPHONE : if (ioctl(audio_fd, MIXER_WRITE(SOUND_MIXER_MIC), &volume) == -1) {
+- perror("Setting gain");
+- }
+- return;
+- case AUDIO_LINE_IN : if (ioctl(audio_fd, MIXER_WRITE(SOUND_MIXER_LINE), &volume) == -1) {
+- perror("Setting gain");
+- }
+- return;
++ if (ioctl(audio_fd, SOUND_MIXER_WRITE_RECLEV, &volume) == -1) {
++ perror("Setting gain");
+ }
+- printf("ERROR: Unknown iport in audio_set_gain!\n");
+- abort();
++ return;
+ }
+
+ int
+@@ -226,17 +218,8 @@
+ if (audio_fd <= 0) {
+ return (0);
+ }
+- switch (iport) {
+- case AUDIO_MICROPHONE : if (ioctl(audio_fd, MIXER_READ(SOUND_MIXER_MIC), &volume) == -1) {
+- perror("Getting gain");
+- }
+- break;
+- case AUDIO_LINE_IN : if (ioctl(audio_fd, MIXER_READ(SOUND_MIXER_LINE), &volume) == -1) {
+- perror("Getting gain");
+- }
+- break;
+- default : printf("ERROR: Unknown iport in audio_set_gain!\n");
+- abort();
++ if (ioctl(audio_fd, SOUND_MIXER_READ_RECLEV, &volume) == -1) {
++ perror("Setting gain");
+ }
+ return device_to_bat(volume & 0xff);
+ }
+@@ -263,7 +246,7 @@
+ if (audio_fd <= 0) {
+ return (0);
+ }
+- if (ioctl(audio_fd, MIXER_READ(SOUND_MIXER_VOLUME), &volume) == -1) {
++ if (ioctl(audio_fd, MIXER_READ(SOUND_MIXER_PCM), &volume) == -1) {
+ perror("Getting volume");
+ }
+ return device_to_bat(volume & 0x000000ff); /* Extract left channel volume */