Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Apr 2008 14:07:26 -0400 (EDT)
From:      Steve Ames <steve@energistic.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/122584: fix pwlib to allow multiple apps to access sound in parallel
Message-ID:  <200804081807.m38I7Qn0001486@energistic.com>
Resent-Message-ID: <200804081840.m38Ie430027567@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         122584
>Category:       ports
>Synopsis:       fix pwlib to allow multiple apps to access sound in parallel
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr 08 18:40:04 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Steve Ames
>Release:        FreeBSD 7.0-STABLE i386
>Organization:
>Environment:
System: FreeBSD energistic.com 7.0-STABLE FreeBSD 7.0-STABLE #106: Mon Mar 24 15:55:01 EDT 2008 steve@energistic.com:/usr/obj/usr/src/sys/VV i386


	
>Description:
	This patch allows Ekiga and KDE apps use sound in parallel without conflict.
>How-To-Repeat:
	Per the submitter (Matthias Apitz (matthias.apitz AT oclc.org)):

	The art of pick-up the filename of the audio device conflicts with other
	applications of the desktop using the (virtual) audio channels; the
	filename should just be "/dev/dsp0" for FreeBSD and the rest is handled
	via the devfs(5) file system; a patch like the below works for me fine
	and Ekiga plays sound parallel to the apps of KDE.

	This change has already been imported into the pwlib codebase.

>Fix:

	Apply following patch:

	http://steve.energistic.com/h323-ports/pwlib-1.12.0.2.patch


diff -ruN pwlib.old/Makefile pwlib/Makefile
--- pwlib.old/Makefile	2008-03-13 10:27:16.000000000 -0400
+++ pwlib/Makefile	2008-04-08 14:00:36.000000000 -0400
@@ -7,7 +7,7 @@
 
 PORTNAME=	pwlib
 PORTVERSION=	1.12.0
-PORTREVISION=	1
+PORTREVISION=	2
 PORTEPOCH=	1
 CATEGORIES=	devel
 MASTER_SITES=    ${MASTER_SITE_SOURCEFORGE}
diff -ruN pwlib.old/files/patch-plugins-sound_oss-sound_oss_cxx pwlib/files/patch-plugins-sound_oss-sound_oss_cxx
--- pwlib.old/files/patch-plugins-sound_oss-sound_oss_cxx	2008-03-01 02:24:51.000000000 -0500
+++ pwlib/files/patch-plugins-sound_oss-sound_oss_cxx	2008-04-08 13:59:40.000000000 -0400
@@ -1,6 +1,22 @@
---- plugins/sound_oss/sound_oss.cxx.orig	2007-10-19 02:22:33.000000000 -0400
-+++ plugins/sound_oss/sound_oss.cxx	2007-12-30 20:46:38.000000000 -0500
-@@ -643,6 +643,7 @@
+--- plugins/sound_oss/sound_oss.orig	2008-04-08 13:54:44.000000000 -0400
++++ plugins/sound_oss/sound_oss.cxx	2008-04-08 13:57:40.000000000 -0400
+@@ -399,6 +399,15 @@
+             PINDEX cardnum = numbers.AsInteger(); //dspN.M is truncated to dspN.
+             // If we have not yet inserted something for this cardnum, insert it
+             if (dsp.GetAt(cardnum+1) == NULL) {
++#if defined P_FREEBSD
++		// in FreeBSD the file name should be used via the devfs(5) and
++		// is just "/dev/dsp0" and devfs(5) takes care of virtual channels,
++		// like /dev/dsp0.0 /dev/dsp0.1 ...
++		// everything else would conflict with other KDE apps using the
++		// audio
++		devname = devdir + "dsp0";
++		PTRACE(1, "OSS\tCollectSoundDevices FreeBSD devname set to devfs(5) name:" << devname );
++ #endif
+               dsp.SetAt(cardnum+1, devname);
+             }
+           }
+@@ -643,6 +652,7 @@
          arg = val = (entry.numChannels == 2) ? 1 : 0;
          if (ConvertOSError(::ioctl(os_handle, SNDCTL_DSP_STEREO, &arg)) || (arg != val)) {
  







>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200804081807.m38I7Qn0001486>