Changeset 5268:f9de025a8da8 in roaraudio
- Timestamp:
- 11/15/11 13:30:31 (12 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/alsavs/ctl_roar.c
r5263 r5268 38 38 #include <string.h> 39 39 40 #ifdef DEBUG 41 static struct roar_vio_calls DEBUG_FH; 42 #endif 43 40 44 static void roar_plugin_close(snd_ctl_ext_t * ext) { 41 45 struct roar_alsa_ctl * self = ext->private_data; … … 63 67 } 64 68 69 // ALSA is strange here, this function makes keys (stream ID) from non-unique stream names... 65 70 static snd_ctl_ext_key_t roar_plugin_find_elem(snd_ctl_ext_t *ext, 66 71 const snd_ctl_elem_id_t *id) { 67 72 struct roar_alsa_ctl * self = ext->private_data; 68 int numid = snd_ctl_elem_id_get_numid(id); 69 70 return self->streams[numid].id; 73 // int numid = snd_ctl_elem_id_get_numid(id); 74 const char * name; 75 int i; 76 77 // ROAR_DBG("roar_plugin_find_elem(ext=%p, id=%p): numid=%i", ext, id, numid); 78 79 // return self->streams[numid].id; 80 81 name = snd_ctl_elem_id_get_name(id); 82 83 for (i = 0; i < MAX_STREAMS; i++) { 84 if ( !strcmp(self->streams[i].name, name) ) { 85 return self->streams[i].id; 86 } 87 } 88 89 return SND_CTL_EXT_KEY_NOT_FOUND; 71 90 } 72 91 … … 130 149 int i; 131 150 132 for (sid = 0; i < MAX_STREAMS && self->streams[sid].id != (int)key; sid++) 151 ROAR_DBG("roar_plugin_write_integer(ext=%p, key=%i, value=%p) = ?", ext, (int)key, value); 152 153 for (sid = 0; sid < MAX_STREAMS && self->streams[sid].id != (int)key; sid++) 133 154 134 155 if ( sid == MAX_STREAMS ) … … 175 196 default: 176 197 return; 198 break; 199 } 200 201 switch (s.dir) { 202 case ROAR_DIR_MIXING: 203 case ROAR_DIR_BRIDGE: 204 if ( strstr(name, "MIDI") != NULL || strstr(name, "Light") != NULL ) 205 return; 177 206 break; 178 207 } … … 236 265 (void)root; 237 266 267 #ifdef DEBUG 268 roar_vio_open_dstr_simple(&DEBUG_FH, "/tmp/alsamixer-roar.log", O_WRONLY|O_CREAT|O_APPEND); 269 roar_debug_set_stderr_vio(&DEBUG_FH); 270 roar_debug_set_stderr_mode(ROAR_DEBUG_MODE_VIO); 271 #endif 272 238 273 snd_config_for_each(i, next, conf) { 239 274 n = snd_config_iterator_entry(i);
Note: See TracChangeset
for help on using the changeset viewer.