FreeBSD Bugzilla – Attachment 169553 Details for
Bug 208968
audio/portaudio: support hw.snd.default_unit sysctl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
This patch reads the sysctl and correctly translates /dev/dspX to /dev/dsp.
portaudio-defalt-device.patch (text/plain), 2.20 KB, created by
Stephen Hurd
on 2016-04-22 05:27:53 UTC
(
hide
)
Description:
This patch reads the sysctl and correctly translates /dev/dspX to /dev/dsp.
Filename:
MIME Type:
Creator:
Stephen Hurd
Created:
2016-04-22 05:27:53 UTC
Size:
2.20 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 413095) >+++ Makefile (working copy) >@@ -3,7 +3,7 @@ > > PORTNAME= portaudio > DISTVERSION= 19_20140130 >-PORTREVISION= 3 >+PORTREVISION= 4 > CATEGORIES= audio > MASTER_SITES= http://www.portaudio.com/archives/ > DISTNAME= pa_stable_v${DISTVERSION} >Index: files/patch-src_hostapi_oss_pa__unix__oss.c >=================================================================== >--- files/patch-src_hostapi_oss_pa__unix__oss.c (nonexistent) >+++ files/patch-src_hostapi_oss_pa__unix__oss.c (working copy) >@@ -0,0 +1,35 @@ >+--- src/hostapi/oss/pa_unix_oss.c.orig 2013-06-08 19:30:41 UTC >++++ src/hostapi/oss/pa_unix_oss.c >+@@ -62,6 +62,9 @@ >+ #include <sys/poll.h> >+ #include <limits.h> >+ #include <semaphore.h> >++#ifdef __FreeBSD__ >++#include <sys/sysctl.h> >++#endif >+ >+ #ifdef HAVE_SYS_SOUNDCARD_H >+ # include <sys/soundcard.h> >+@@ -525,6 +528,13 @@ static PaError BuildDeviceList( PaOSSHos >+ int i; >+ int numDevices = 0, maxDeviceInfos = 1; >+ PaDeviceInfo **deviceInfos = NULL; >++ int defaultDevice = 0; >++ >++#ifdef __FreeBSD__ >++ size_t len = sizeof(defaultDevice); >++ if (sysctlbyname("hw.snd.default_unit", &defaultDevice, &len, NULL, 0) == -1 || len != 4) >++ defaultDevice = 0; >++#endif >+ >+ /* These two will be set to the first working input and output device, respectively */ >+ commonApi->info.defaultInputDevice = paNoDevice; >+@@ -541,7 +551,7 @@ static PaError BuildDeviceList( PaOSSHos >+ PaDeviceInfo *deviceInfo; >+ int testResult; >+ >+- if( i == 0 ) >++ if( i == defaultDevice ) >+ snprintf(deviceName, sizeof (deviceName), "%s", DEVICE_NAME_BASE); >+ else >+ snprintf(deviceName, sizeof (deviceName), "%s%d", DEVICE_NAME_BASE, i); > >Property changes on: files/patch-src_hostapi_oss_pa__unix__oss.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:keywords >## -0,0 +1 ## >+FreeBSD=%H >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 208968
: 169553