Changeset 2272:7fa0fd1e5a5d in roaraudio
- Timestamp:
- 08/04/09 13:06:48 (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/sources.c
r2271 r2272 85 85 86 86 int sources_add (char * driver, char * device, char * container, char * options, int primary) { 87 if (0) { 88 #ifdef ROAR_HAVE_IO_POSIX 89 } else if ( strcmp(driver, "raw") == 0 ) { 90 return sources_add_raw(driver, device, container, options, primary); 91 } else if ( strcmp(driver, "wav") == 0 ) { 92 return sources_add_wav(driver, device, container, options, primary); 93 #endif 94 } else if ( strcmp(driver, "cf") == 0 ) { 95 return sources_add_cf(driver, device, container, options, primary); 96 } else if ( strcmp(driver, "roar") == 0 ) { 97 return sources_add_roar(driver, device, container, options, primary); 98 } 99 87 int i; 88 89 for (i = 0; g_source[i].name != NULL; i++) { 90 if ( !strcmp(g_source[i].name, driver) ) { 91 if ( g_source[i].new_open != NULL ) { 92 // TODO: add code to open driver here... 93 } else if ( g_source[i].old_open != NULL ) { 94 return g_source[i].old_open(driver, device, container, options, primary); 95 } else { 96 ROAR_ERR("sources_add(driver='%s', ...): Found source but did not find any open rutine", driver); 97 return -1; 98 } 99 } 100 } 101 102 ROAR_ERR("sources_add(driver='%s', ...): Source not found", driver); 100 103 return -1; 101 104 }
Note: See TracChangeset
for help on using the changeset viewer.