diff options
Diffstat (limited to 'kmix')
-rw-r--r-- | kmix/mixer_alsa.h | 1 | ||||
-rw-r--r-- | kmix/mixer_alsa9.cpp | 16 |
2 files changed, 11 insertions, 6 deletions
diff --git a/kmix/mixer_alsa.h b/kmix/mixer_alsa.h index cb759e3f..e186eb93 100644 --- a/kmix/mixer_alsa.h +++ b/kmix/mixer_alsa.h @@ -54,6 +54,7 @@ class ALSA_DevIterator : public DevIterator { public: ALSA_DevIterator(); + ~ALSA_DevIterator(); virtual void next(); }; diff --git a/kmix/mixer_alsa9.cpp b/kmix/mixer_alsa9.cpp index 22303b43..54af7161 100644 --- a/kmix/mixer_alsa9.cpp +++ b/kmix/mixer_alsa9.cpp @@ -833,16 +833,20 @@ ALSA_DevIterator::ALSA_DevIterator() NMax = 31; } +ALSA_DevIterator::~ALSA_DevIterator() +{ + snd_config_update_free_global(); +} + void ALSA_DevIterator::next() { -#if 0 - int rc = snd_card_next(&N); - if (rc || (N == -1)) N = NMax + 1; -#else - if ((snd_card_next(&N) != 0) || (N == -1)) N = NMax + 1; -#endif + if ((snd_card_next(&N) != 0) || (N == -1)) + { + N = NMax + 1; + } } + DevIterator* ALSA_getDevIterator() { return new ALSA_DevIterator(); |