Changeset 1203:3cbf465d9e4e in roaraudio
- Timestamp:
- 02/04/09 17:09:55 (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roarclients/roarctl.c
r1202 r1203 266 266 267 267 268 // TODO: clean up code here as the % vs. abs code is very duplicate... 269 268 270 if ( strcmp(k, "mono") == 0 && old_chans != 1 ) { 269 271 chans = 1; … … 286 288 287 289 chans = old_chans; 290 291 } else if ( strcmp(k, "stereo") == 0 && old_chans == 4 ) { 292 chans = 4; 293 294 if ( *cur + 2 > max ) 295 return -1; 296 297 k = arg[++(*cur)]; 298 len = strlen(k); 299 300 if ( k[len - 1] == '%' ) { 301 k[len - 1] = 0; 302 vol_l = (atof(k)*65535)/100; 303 } else { 304 vol_l = atoi(k); 305 } 306 307 k = arg[++(*cur)]; 308 len = strlen(k); 309 310 if ( k[len - 1] == '%' ) { 311 k[len - 1] = 0; 312 vol_r = (atof(k)*65535)/100; 313 } else { 314 vol_r = atoi(k); 315 } 316 317 mixer.mixer[0] = vol_l; 318 mixer.mixer[1] = vol_r; 319 mixer.mixer[2] = vol_l; 320 mixer.mixer[3] = vol_r; 288 321 289 322 } else if ( strcmp(k, "stereo") == 0 && old_chans != 2 ) {
Note: See TracChangeset
for help on using the changeset viewer.