Created attachment 169553 [details] This patch reads the sysctl and correctly translates /dev/dspX to /dev/dsp. If the hw.snd.default_unit is set to anything except zero, /dev/dsp0 is not available to programs using portaudio, since it assumes that /dev/dsp and /dev/dsp0 are the same device. This patch reads the sysctl and correctly translates /dev/dspX to /dev/dsp.
Maintainer timeout
A commit references this bug: Author: kevlo Date: Thu Aug 4 07:24:01 UTC 2016 New revision: 419598 URL: https://svnweb.freebsd.org/changeset/ports/419598 Log: Support hw.snd.default_unit sysctl. If the hw.snd.default_unit is set to anything except zero, /dev/dsp0 is not available to programs using portaudio, since it assumes that /dev/dsp and /dev/dsp0 are the same device. PR: 208968 Submitted by: shurd Approved by: koalative@gmail.com (maintainer timeout) Changes: head/audio/portaudio/Makefile head/audio/portaudio/files/ head/audio/portaudio/files/patch-src_hostapi_oss_pa__unix__oss.c
Committed, thanks.
This "fix" actually breaks portaudio that was previously working on my system. I'm running 10.3-STABLE r306333 amd64, built 9/2/2016. On my system, sysctl hw.snd.default_unit=2 With ports/audio/portaudio AFTER this fix, I don't get any audio, and cannot figure out how to get any audio (while other non-portaudio apps properly produce sound). When I do 'cd ports/audio/portaudio ; svn update -r 419597 ; make reinstall' I am then able to get proper audio when running a portaudio application that uses the default configured system sound interface (in my case, hw.snd.default_unit=2). For the purposes of testing, I used one of the portaudio test application, patest_sine8. I'm not sure if I should file a new bug, or try to reopen this PR. -Marc
(In reply to M F from comment #4) > I'm not sure if I should file a new bug, or try to reopen this PR. Did you get any further with your issue?