From 83970369e0a13877a27de773300338d27a1b6ff3 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 24 Apr 2014 02:33:54 -0700 Subject: More device list cleanup cleanup --- Alc/backends/alsa.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'Alc/backends/alsa.c') 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++) -- cgit v1.2.3