aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia
diff options
context:
space:
mode:
authorlofi <lofi@FreeBSD.org>2007-09-18 16:35:17 +0800
committerlofi <lofi@FreeBSD.org>2007-09-18 16:35:17 +0800
commit3eecae9b2f6401d6962d8663e6c403311750b626 (patch)
treea549e8801ae76b09593702918aa3a24588e7e4d4 /multimedia
parent4cb3fa6d1d999248e2d83f63bf2026cc977865b9 (diff)
downloadfreebsd-ports-gnome-3eecae9b2f6401d6962d8663e6c403311750b626.tar.gz
freebsd-ports-gnome-3eecae9b2f6401d6962d8663e6c403311750b626.tar.zst
freebsd-ports-gnome-3eecae9b2f6401d6962d8663e6c403311750b626.zip
Make sure setting a recording device in kmix also succeeds if the mixer
device only supports one recording source (true for most supported sound devices). Submitted by: Tim McCormick <tim@pcbsd.org>
Diffstat (limited to 'multimedia')
-rw-r--r--multimedia/kdemultimedia3/Makefile2
-rw-r--r--multimedia/kdemultimedia3/files/patch-kmix_mixer_oss.cpp21
-rw-r--r--multimedia/kdemultimedia4/Makefile2
-rw-r--r--multimedia/kdemultimedia4/files/patch-kmix_mixer_oss.cpp21
4 files changed, 44 insertions, 2 deletions
diff --git a/multimedia/kdemultimedia3/Makefile b/multimedia/kdemultimedia3/Makefile
index f3d2a4e8930a..ed4f71a00cb2 100644
--- a/multimedia/kdemultimedia3/Makefile
+++ b/multimedia/kdemultimedia3/Makefile
@@ -8,7 +8,7 @@
PORTNAME= kdemultimedia
PORTVERSION= ${KDE_VERSION}
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= multimedia kde
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTVERSION:S/.0//}/src
diff --git a/multimedia/kdemultimedia3/files/patch-kmix_mixer_oss.cpp b/multimedia/kdemultimedia3/files/patch-kmix_mixer_oss.cpp
new file mode 100644
index 000000000000..b5be16597dea
--- /dev/null
+++ b/multimedia/kdemultimedia3/files/patch-kmix_mixer_oss.cpp
@@ -0,0 +1,21 @@
+--- kmix/mixer_oss.cpp Fri Sep 14 18:02:58 2007
++++ kmix/mixer_oss.cpp Fri Sep 14 19:45:27 2007
+@@ -243,6 +243,18 @@
+ if (ioctl(m_fd, SOUND_MIXER_READ_RECSRC, &i_recsrc) == -1)
+ errormsg(Mixer::ERR_READ);
+
++ // If the record source is supposed to be on, but wasn't set, explicitly
++ // set the record source. Not all cards support multiple record sources.
++ // As a result, we also need to do the read & write again.
++ if (((i_recsrc & ( 1<<devnum)) == 0) && on)
++ {
++ oldrecsrc = i_recsrc = 1 << devnum;
++ if (ioctl(m_fd, SOUND_MIXER_WRITE_RECSRC, &i_recsrc) == -1)
++ errormsg (Mixer::ERR_WRITE);
++ if (ioctl(m_fd, SOUND_MIXER_READ_RECSRC, &i_recsrc) == -1)
++ errormsg(Mixer::ERR_READ);
++ }
++
+ // PORTING: Hint: Do not forget to set i_recsrc to the new valid
+ // record source mask.
+
diff --git a/multimedia/kdemultimedia4/Makefile b/multimedia/kdemultimedia4/Makefile
index f3d2a4e8930a..ed4f71a00cb2 100644
--- a/multimedia/kdemultimedia4/Makefile
+++ b/multimedia/kdemultimedia4/Makefile
@@ -8,7 +8,7 @@
PORTNAME= kdemultimedia
PORTVERSION= ${KDE_VERSION}
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= multimedia kde
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTVERSION:S/.0//}/src
diff --git a/multimedia/kdemultimedia4/files/patch-kmix_mixer_oss.cpp b/multimedia/kdemultimedia4/files/patch-kmix_mixer_oss.cpp
new file mode 100644
index 000000000000..b5be16597dea
--- /dev/null
+++ b/multimedia/kdemultimedia4/files/patch-kmix_mixer_oss.cpp
@@ -0,0 +1,21 @@
+--- kmix/mixer_oss.cpp Fri Sep 14 18:02:58 2007
++++ kmix/mixer_oss.cpp Fri Sep 14 19:45:27 2007
+@@ -243,6 +243,18 @@
+ if (ioctl(m_fd, SOUND_MIXER_READ_RECSRC, &i_recsrc) == -1)
+ errormsg(Mixer::ERR_READ);
+
++ // If the record source is supposed to be on, but wasn't set, explicitly
++ // set the record source. Not all cards support multiple record sources.
++ // As a result, we also need to do the read & write again.
++ if (((i_recsrc & ( 1<<devnum)) == 0) && on)
++ {
++ oldrecsrc = i_recsrc = 1 << devnum;
++ if (ioctl(m_fd, SOUND_MIXER_WRITE_RECSRC, &i_recsrc) == -1)
++ errormsg (Mixer::ERR_WRITE);
++ if (ioctl(m_fd, SOUND_MIXER_READ_RECSRC, &i_recsrc) == -1)
++ errormsg(Mixer::ERR_READ);
++ }
++
+ // PORTING: Hint: Do not forget to set i_recsrc to the new valid
+ // record source mask.
+