aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/portaudio.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-08-08 19:48:45 -0700
committerChris Robinson <[email protected]>2014-08-08 19:48:45 -0700
commit1692dda4b9908d97c80ec5e446f642b24374667b (patch)
tree3e291a1991964d89cada5299fa9691391d2b1ed9 /Alc/backends/portaudio.c
parent10c01110f33c920e0145bf672f4bd58307589926 (diff)
Use the default input device for portaudio's default capture device
Diffstat (limited to 'Alc/backends/portaudio.c')
-rw-r--r--Alc/backends/portaudio.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Alc/backends/portaudio.c b/Alc/backends/portaudio.c
index 0bb6372c..5f11526d 100644
--- a/Alc/backends/portaudio.c
+++ b/Alc/backends/portaudio.c
@@ -45,6 +45,7 @@ MAKE_FUNC(Pa_StopStream);
MAKE_FUNC(Pa_OpenStream);
MAKE_FUNC(Pa_CloseStream);
MAKE_FUNC(Pa_GetDefaultOutputDevice);
+MAKE_FUNC(Pa_GetDefaultInputDevice);
MAKE_FUNC(Pa_GetStreamInfo);
#undef MAKE_FUNC
@@ -56,6 +57,7 @@ MAKE_FUNC(Pa_GetStreamInfo);
#define Pa_OpenStream pPa_OpenStream
#define Pa_CloseStream pPa_CloseStream
#define Pa_GetDefaultOutputDevice pPa_GetDefaultOutputDevice
+#define Pa_GetDefaultInputDevice pPa_GetDefaultInputDevice
#define Pa_GetStreamInfo pPa_GetStreamInfo
#endif
@@ -97,6 +99,7 @@ static ALCboolean pa_load(void)
LOAD_FUNC(Pa_OpenStream);
LOAD_FUNC(Pa_CloseStream);
LOAD_FUNC(Pa_GetDefaultOutputDevice);
+ LOAD_FUNC(Pa_GetDefaultInputDevice);
LOAD_FUNC(Pa_GetStreamInfo);
#undef LOAD_FUNC
@@ -318,7 +321,7 @@ static ALCenum pa_open_capture(ALCdevice *device, const ALCchar *deviceName)
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;