Changeset 3136:e9b53172083c in roaraudio
- Timestamp:
- 01/15/10 10:40:14 (14 years ago)
- Branch:
- default
- Phase:
- public
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
include/libroar/config.h
r2962 r3136 91 91 struct roar_libroar_config_codec * codec; 92 92 } codecs; 93 struct roar_audio_info info; 93 94 }; 94 95 -
libroar/config.c
r2962 r3136 218 218 ROAR_WARN("roar_libroar_config_parse(*): Unknown warning option: %s", v); 219 219 } 220 } else if ( !strcmp(k, "force-rate") ) { 221 config->info.rate = atoi(v); 222 } else if ( !strcmp(k, "force-bits") ) { 223 config->info.bits = atoi(v); 224 } else if ( !strcmp(k, "force-channels") ) { 225 config->info.channels = atoi(v); 226 } else if ( !strcmp(k, "force-codec") ) { 227 config->info.codec = roar_str2codec(v); 220 228 } else if ( !strcmp(k, "codec") ) { 221 229 if ( roar_libroar_config_parse_codec(config, v) == -1 ) { -
libroar/stream.c
r2951 r3136 36 36 37 37 int roar_stream_connect (struct roar_connection * con, struct roar_stream * s, int dir) { 38 struct roar_libroar_config * config = roar_libroar_get_config(); 39 struct roar_stream ms; 38 40 struct roar_message m; 39 41 40 42 s->dir = dir; 43 44 memcpy(&ms, s, sizeof(ms)); 41 45 42 46 m.cmd = ROAR_CMD_NEW_STREAM; … … 44 48 m.pos = 0; 45 49 46 roar_stream_s2m(s, &m); 50 if ( config != NULL ) { 51 if ( config->info.rate ) 52 ms.info.rate = config->info.rate; 53 if ( config->info.bits ) 54 ms.info.bits = config->info.bits; 55 if ( config->info.channels ) 56 ms.info.channels = config->info.channels; 57 if ( config->info.codec ) 58 ms.info.codec = config->info.codec; 59 } 60 61 roar_stream_s2m(&ms, &m); 47 62 48 63 if ( roar_req(con, &m, NULL) != 0 )
Note: See TracChangeset
for help on using the changeset viewer.