[openal] pulseaudio default capture device
Peter Hunnisett
peter at softwarebalm.com
Fri Aug 8 16:32:19 EDT 2014
Hi,
was playing around with OpenAL and found that alcCaptureOpenDevice
was failing in my windows cygwin setup which is using PortAudio2. A bit
of investigation later it seems that the default capture device in
pa_open_capture is using the default output device rather than the
default input device. I have no way of building the source on cygwin to
totally confirm it solves the problem but I have:
1) done a runtime modification of the returned device in a debugger
2) setup a config file to provide the default device
Both of these seem to give me success in allowing the correct device
(microphone) to be selected. I can now progress to see if I can get the
rest of my code working.
I've attached a diff of my proposed solution. Unfortunately it's
against the cygwin package but the source looks like it still has
basically the same code in the git repo.
Regards,
Peter
-------------- next part --------------
--- portaudio.c 2014-08-08 12:27:15.616077700 -0700
+++ portaudio.c_new 2014-08-08 13:06:22.701323200 -0700
@@ -327,7 +327,7 @@
data->params.device = -1;
if(!ConfigValueInt("port", "capture", &data->params.device) ||
data->params.device < 0)
- data->params.device = Pa_GetDefaultOutputDevice();
+ data->params.device = Pa_GetDefaultInputDevice();
data->params.suggestedLatency = 0.0f;
data->params.hostApiSpecificStreamInfo = NULL;
More information about the openal
mailing list