aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2004-08-19 20:43:07 +0800
committerpav <pav@FreeBSD.org>2004-08-19 20:43:07 +0800
commit6600e51ff375c737e7b423215679eef3b5e05f92 (patch)
treec36d11f1fef969096f98670c0ac3723c68a16f37
parent702a84dae04b4971ee93998c7c4d58eced5287df (diff)
downloadfreebsd-ports-gnome-6600e51ff375c737e7b423215679eef3b5e05f92.tar.gz
freebsd-ports-gnome-6600e51ff375c737e7b423215679eef3b5e05f92.tar.zst
freebsd-ports-gnome-6600e51ff375c737e7b423215679eef3b5e05f92.zip
- Fix runtime. Before, this haven't worked at all on 4.x or 5.x.
Submitted by: Divacky Roman <xdivac02@stud.fit.vutbr.cz> on CZ/SK users mailing list
-rw-r--r--audio/play/Makefile1
-rw-r--r--audio/play/files/patch-ac67
2 files changed, 55 insertions, 13 deletions
diff --git a/audio/play/Makefile b/audio/play/Makefile
index d8171c64017e..f676c7994979 100644
--- a/audio/play/Makefile
+++ b/audio/play/Makefile
@@ -7,6 +7,7 @@
PORTNAME= play
PORTVERSION= 1.0
+PORTREVISION= 1
CATEGORIES= audio
MASTER_SITES= ${MASTER_SITE_PORTS_JP}
diff --git a/audio/play/files/patch-ac b/audio/play/files/patch-ac
index b2fbef870046..c4ce12c4b53c 100644
--- a/audio/play/files/patch-ac
+++ b/audio/play/files/patch-ac
@@ -1,13 +1,54 @@
-*** encode_riff.c.orig Wed Mar 26 00:25:07 1997
---- encode_riff.c Wed May 20 22:45:03 1998
-***************
-*** 163,168 ****
---- 163,170 ----
- warn("read");
- stat = FAIL; goto failplay2;
- }
-+ /* printf("len = %10d, len = %10d\n", stat, len); */
-+ stat = (len < stat)? len : stat;
- if (write(devfd, bufp, stat) < 0) {
- warn("write");
- stat = FAIL; goto failplay2;
+--- encode_riff.c.orig Tue Mar 25 16:25:07 1997
++++ encode_riff.c Thu Aug 19 14:37:52 2004
+@@ -11,7 +11,7 @@
+ #include <signal.h>
+ #include <err.h>
+
+-#include <machine/soundcard.h>
++#include <sys/soundcard.h>
+
+ #include "play.h"
+ #include "encode_riff.h"
+@@ -74,7 +74,7 @@
+ char *bufp;
+ char *device;
+ int devfd, filefd;
+- int stat, len, buf_size, format, data_length;
++ int stat, len, buf_size, format = 0, data_length;
+
+ if (!f_hasdsp) {
+ fprintf(stderr, "%s: %s: needs DSP for play\n", myname, audio_file);
+@@ -109,7 +109,12 @@
+ warn("%s", device);
+ stat = FAIL; goto failplay0;
+ }
++#if 0
++ /* this (at least under fbsd) means that you want to set play format
++ * to headerp->sample_size which is a nonsense */
+ if (ioctl(devfd, SNDCTL_DSP_SAMPLESIZE, &headerp->sample_size) < 0) {
++#endif
++ if (ioctl(devfd, SNDCTL_DSP_SAMPLESIZE, &format) < 0) {
+ warn("%s", device);
+ stat = FAIL; goto failplay0;
+ }
+@@ -121,11 +126,6 @@
+ warn("%s", device);
+ stat = FAIL; goto failplay0;
+ }
+- /* XXX */
+- if (ioctl(devfd, SNDCTL_DSP_SETFMT, &format) < 0) {
+- warn("%s", device);
+- stat = FAIL; goto failplay0;
+- }
+ if (headerp->channels > 1) {
+ int ch = headerp->channels;
+ if (ioctl(devfd, SNDCTL_DSP_STEREO, &ch) < 0) {
+@@ -163,6 +163,8 @@
+ warn("read");
+ stat = FAIL; goto failplay2;
+ }
++/* printf("len = %10d, len = %10d\n", stat, len); */
++ stat = (len < stat)? len : stat;
+ if (write(devfd, bufp, stat) < 0) {
+ warn("write");
+ stat = FAIL; goto failplay2;