aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/portaudio.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-08-27 02:53:09 -0700
committerChris Robinson <[email protected]>2009-08-27 02:53:09 -0700
commit6bb14e45cee9d8d7da37675cc6933146f7a95155 (patch)
tree238b8354671a87e00867af28424a4bf23b813e1c /Alc/portaudio.c
parent45dc8048193162edbb886921cfcf2955c5232626 (diff)
Store a copy of the device name in the device
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;
}