aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/portaudio.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/backends/portaudio.c')
-rw-r--r--Alc/backends/portaudio.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Alc/backends/portaudio.c b/Alc/backends/portaudio.c
index 2345a282..8070942c 100644
--- a/Alc/backends/portaudio.c
+++ b/Alc/backends/portaudio.c
@@ -168,8 +168,8 @@ static ALCenum pa_open_playback(ALCdevice *device, const ALCchar *deviceName)
device->ExtraData = data;
- outParams.device = GetConfigValueInt("port", "device", -1);
- if(outParams.device < 0)
+ outParams.device = -1;
+ if(!ConfigValueInt("port", "device", &outParams.device) || outParams.device < 0)
outParams.device = Pa_GetDefaultOutputDevice();
outParams.suggestedLatency = (device->UpdateSize*device->NumUpdates) /
(float)device->Frequency;
@@ -299,8 +299,8 @@ static ALCenum pa_open_capture(ALCdevice *device, const ALCchar *deviceName)
if(data->ring == NULL)
goto error;
- inParams.device = GetConfigValueInt("port", "capture", -1);
- if(inParams.device < 0)
+ inParams.device = -1;
+ if(!ConfigValueInt("port", "capture", &inParams.device) || inParams.device < 0)
inParams.device = Pa_GetDefaultOutputDevice();
inParams.suggestedLatency = 0.0f;
inParams.hostApiSpecificStreamInfo = NULL;