aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Alc/backends/portaudio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Alc/backends/portaudio.c b/Alc/backends/portaudio.c
index 81622494..154b6349 100644
--- a/Alc/backends/portaudio.c
+++ b/Alc/backends/portaudio.c
@@ -222,8 +222,6 @@ retry_open:
return ALC_INVALID_VALUE;
}
- device->szDeviceName = strdup(deviceName);
-
if((ALuint)outParams.channelCount != ChannelsFromDevFmt(device->FmtChans))
{
if(outParams.channelCount != 1 && outParams.channelCount != 2)
@@ -241,6 +239,8 @@ retry_open:
}
SetDefaultChannelOrder(device);
+ device->szDeviceName = strdup(deviceName);
+
return ALC_NO_ERROR;
}