diff options
author | Chris Robinson <[email protected]> | 2014-04-24 02:33:54 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-04-24 02:33:54 -0700 |
commit | 83970369e0a13877a27de773300338d27a1b6ff3 (patch) | |
tree | f2d323f7327f476d04e2aa00d8763bfce004df0d /Alc/backends/alsa.c | |
parent | 7dd4a2348ff330339e9ea09a80e3bdaeb7640062 (diff) |
More device list cleanup cleanup
Diffstat (limited to 'Alc/backends/alsa.c')
-rw-r--r-- | Alc/backends/alsa.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Alc/backends/alsa.c b/Alc/backends/alsa.c index 53d8d8f0..4cade858 100644 --- a/Alc/backends/alsa.c +++ b/Alc/backends/alsa.c @@ -265,6 +265,8 @@ static void probe_devices(snd_pcm_stream_t stream, vector_DevMap *DeviceList) int card, err, dev; DevMap entry; + clear_devlist(DeviceList); + snd_ctl_card_info_malloc(&info); snd_pcm_info_malloc(&pcminfo); @@ -1344,9 +1346,7 @@ static void ALCalsaBackendFactory_probe(ALCalsaBackendFactory* UNUSED(self), enu switch(type) { case ALL_DEVICE_PROBE: - clear_devlist(&PlaybackDevices); probe_devices(SND_PCM_STREAM_PLAYBACK, &PlaybackDevices); - iter = VECTOR_ITER_BEGIN(PlaybackDevices); end = VECTOR_ITER_END(PlaybackDevices); for(;iter != end;iter++) @@ -1354,9 +1354,7 @@ static void ALCalsaBackendFactory_probe(ALCalsaBackendFactory* UNUSED(self), enu break; case CAPTURE_DEVICE_PROBE: - clear_devlist(&CaptureDevices); probe_devices(SND_PCM_STREAM_CAPTURE, &CaptureDevices); - iter = VECTOR_ITER_BEGIN(CaptureDevices); end = VECTOR_ITER_END(CaptureDevices); for(;iter != end;iter++) |