aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia
diff options
context:
space:
mode:
authornaddy <naddy@FreeBSD.org>2009-01-16 23:07:00 +0800
committernaddy <naddy@FreeBSD.org>2009-01-16 23:07:00 +0800
commit895b4941abe73c873eaa776e5a28270136a89fcf (patch)
tree046f9e914fa48694affabeaa94a559cfeb802eca /multimedia
parent9a0e023cd99d31a5d20605fc75bc545ebe657bbb (diff)
downloadfreebsd-ports-gnome-895b4941abe73c873eaa776e5a28270136a89fcf.tar.gz
freebsd-ports-gnome-895b4941abe73c873eaa776e5a28270136a89fcf.tar.zst
freebsd-ports-gnome-895b4941abe73c873eaa776e5a28270136a89fcf.zip
Set sample rate when resuming playback. This fixes AC3/DTS passthrough
on S/PDIF with snd_hda(4). Submitted by: mav
Diffstat (limited to 'multimedia')
-rw-r--r--multimedia/mplayer/Makefile2
-rw-r--r--multimedia/mplayer/files/patch-libao2-ao_oss.c18
2 files changed, 19 insertions, 1 deletions
diff --git a/multimedia/mplayer/Makefile b/multimedia/mplayer/Makefile
index d1c7ac3e4c9b..9459784b69bd 100644
--- a/multimedia/mplayer/Makefile
+++ b/multimedia/mplayer/Makefile
@@ -7,7 +7,7 @@
PORTNAME= mplayer
PORTVERSION= ${MPLAYER_PORT_VERSION}
-PORTREVISION= 10
+PORTREVISION= 11
COMMENT= High performance media player supporting many formats
diff --git a/multimedia/mplayer/files/patch-libao2-ao_oss.c b/multimedia/mplayer/files/patch-libao2-ao_oss.c
new file mode 100644
index 000000000000..ba7ccfb401eb
--- /dev/null
+++ b/multimedia/mplayer/files/patch-libao2-ao_oss.c
@@ -0,0 +1,18 @@
+--- libao2/ao_oss.c.orig
++++ libao2/ao_oss.c
+@@ -433,6 +433,7 @@
+ fcntl(audio_fd, F_SETFD, FD_CLOEXEC);
+ #endif
+
++ ioctl (audio_fd, SNDCTL_DSP_SPEED, &ao_data.samplerate);
+ oss_format = format2oss(ao_data.format);
+ ioctl (audio_fd, SNDCTL_DSP_SETFMT, &oss_format);
+ if(ao_data.format != AF_FORMAT_AC3) {
+@@ -442,7 +443,6 @@
+ int c = ao_data.channels-1;
+ ioctl (audio_fd, SNDCTL_DSP_STEREO, &c);
+ }
+- ioctl (audio_fd, SNDCTL_DSP_SPEED, &ao_data.samplerate);
+ }
+ }
+