Changeset 3529:fba86b5b08a7 in roaraudio for roarclients/roarctl.c
- Timestamp:
- 02/19/10 17:36:33 (14 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roarclients/roarctl.c
r3517 r3529 429 429 430 430 int display_mixer (struct roar_connection * con, int stream) { 431 struct roar_mixer_settings mixer; 431 432 int channels; 432 struct roar_mixer_settings mixer;433 433 int i; 434 float fs; 434 435 435 436 if ( roar_get_vol(con, stream, &mixer, &channels) == -1 ) { … … 444 445 #endif 445 446 447 fs = (float)mixer.scale / 100.; 448 449 printf("Mixer ReplayGain : %i/%i (%.2f%%" _DB ")\n", mixer.rpg_mul, mixer.rpg_div, 450 100.*(float)mixer.rpg_mul/((float)mixer.rpg_div) 451 #ifdef ROAR_HAVE_LIBM 452 , 20*log10f((float)mixer.rpg_mul/(float)mixer.rpg_div) 453 #endif 454 ); 455 446 456 for (i = 0; i < channels; i++) 447 printf("Mixer volume chan %2i : %i (%.2f%%" _DB ")\n", i, mixer.mixer[i],448 (float)mixer.mixer[i]/ 655.35f457 printf("Mixer volume chan %2i : %i/%i (%.2f%%" _DB ")\n", i, mixer.mixer[i], mixer.scale, 458 (float)mixer.mixer[i]/fs 449 459 #ifdef ROAR_HAVE_LIBM 450 , 20*log10f((float)mixer.mixer[i]/ 65535.f)460 , 20*log10f((float)mixer.mixer[i]/(float)mixer.scale) 451 461 #endif 452 462 );
Note: See TracChangeset
for help on using the changeset viewer.