diff options
author | Chris Robinson <[email protected]> | 2009-08-27 02:53:09 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2009-08-27 02:53:09 -0700 |
commit | 6bb14e45cee9d8d7da37675cc6933146f7a95155 (patch) | |
tree | 238b8354671a87e00867af28424a4bf23b813e1c /Alc/wave.c | |
parent | 45dc8048193162edbb886921cfcf2955c5232626 (diff) |
Store a copy of the device name in the device
Diffstat (limited to 'Alc/wave.c')
-rw-r--r-- | Alc/wave.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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; } |