comparison src/OSS/configure.c @ 1385:f3c57bbb54d0

Check all known places for "sndstat" info.
author Christian Birchinger <joker@netswarm.net>
date Fri, 27 Jul 2007 04:53:35 +0200
parents 1a16893ac05f
children e8ea3a76a84e
comparison
equal deleted inserted replaced
1384:1a16893ac05f 1385:f3c57bbb54d0
129 gboolean found = FALSE; 129 gboolean found = FALSE;
130 gint index = 0; 130 gint index = 0;
131 131
132 menu = gtk_menu_new(); 132 menu = gtk_menu_new();
133 133
134 if ((file = fopen("/dev/sndstat", "r"))) { 134 if ((file = fopen("/dev/sndstat", "r")) ||
135 (file = fopen("/proc/asound/sndstat", "r")) ||
136 (file = fopen("/proc/asound/oss/sndstat", "r"))) {
135 while (fgets(buffer, 255, file)) { 137 while (fgets(buffer, 255, file)) {
136 if (found && buffer[0] == '\n') 138 if (found && buffer[0] == '\n')
137 break; 139 break;
138 if (buffer[strlen(buffer) - 1] == '\n') 140 if (buffer[strlen(buffer) - 1] == '\n')
139 buffer[strlen(buffer) - 1] = '\0'; 141 buffer[strlen(buffer) - 1] = '\0';