aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/portaudio.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/portaudio.c')
-rw-r--r--Alc/portaudio.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Alc/portaudio.c b/Alc/portaudio.c
index 6d1b6837..c50214a2 100644
--- a/Alc/portaudio.c
+++ b/Alc/portaudio.c
@@ -89,8 +89,6 @@ static ALCboolean pa_open_playback(ALCdevice *device, const ALCchar *deviceName)
return ALC_FALSE;
}
- device->szDeviceName = pa_device;
-
data = (pa_data*)calloc(1, sizeof(pa_data));
device->ExtraData = data;
@@ -143,6 +141,7 @@ static ALCboolean pa_open_playback(ALCdevice *device, const ALCchar *deviceName)
return ALC_FALSE;
}
+ device->szDeviceName = strdup(pa_device);
device->UpdateSize = device->BufferSize/periods;
return ALC_TRUE;
}