aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/wave.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/wave.c
parent45dc8048193162edbb886921cfcf2955c5232626 (diff)
Store a copy of the device name in the device
Diffstat (limited to 'Alc/wave.c')
-rw-r--r--Alc/wave.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Alc/wave.c b/Alc/wave.c
index 578b769e..47f43b66 100644
--- a/Alc/wave.c
+++ b/Alc/wave.c
@@ -108,6 +108,7 @@ static ALuint WaveProc(ALvoid *ptr)
static ALCboolean wave_open_playback(ALCdevice *device, const ALCchar *deviceName)
{
+ const char *devName = waveDevice;
wave_data *data;
const char *fname;
@@ -119,10 +120,8 @@ static ALCboolean wave_open_playback(ALCdevice *device, const ALCchar *deviceNam
{
if(strcmp(deviceName, waveDevice) != 0)
return ALC_FALSE;
- device->szDeviceName = waveDevice;
+ devName = waveDevice;
}
- else
- device->szDeviceName = waveDevice;
data = (wave_data*)calloc(1, sizeof(wave_data));
@@ -134,6 +133,7 @@ static ALCboolean wave_open_playback(ALCdevice *device, const ALCchar *deviceNam
return ALC_FALSE;
}
+ device->szDeviceName = strdup(devName);
device->ExtraData = data;
return ALC_TRUE;
}