Mercurial > audlegacy-plugins
diff src/alsa/audio.c @ 3003:8b7a44631121
Add hardware_present probe for a meaningful return code. Probe priority 1.
author | Tony Vroon <chainsaw@gentoo.org> |
---|---|
date | Sat, 28 Feb 2009 02:34:13 +0000 |
parents | 58c63fbbd3ce |
children | 919ec26c66c3 |
line wrap: on
line diff
--- a/src/alsa/audio.c Sat Mar 28 17:29:21 2009 +0900 +++ b/src/alsa/audio.c Sat Feb 28 02:34:13 2009 +0000 @@ -129,6 +129,16 @@ } } +int alsa_hardware_present(void) +{ + gint card = -1, err; + + if ((err = snd_card_next(&card)) != 0) + return 0; + + return 1; +} + int alsa_playing(void) { if (!going || paused || alsa_pcm == NULL)