Changeset 25:0e8582e163ea in roaraudio


Ignore:
Timestamp:
06/21/08 13:31:09 (16 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added code to use roar_get_vol()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roarclients/roarctl.c

    r0 r25  
    22 
    33#include <roaraudio.h> 
     4 
     5int display_mixer (struct roar_connection * con, int stream); 
    46 
    57void usage (void) { 
     
    105107  printf("Input codec           : %i (%s%s)\n", s.info.codec, roar_codec2str(s.info.codec), 
    106108                                      s.info.codec == ROAR_CODEC_DEFAULT ? " native" : ""); 
    107  } 
    108  
    109 } 
    110  
     109  display_mixer(con, id[i]); 
     110 } 
     111 
     112} 
     113 
     114int display_mixer (struct roar_connection * con, int stream) { 
     115 int channels; 
     116 struct roar_mixer_settings mixer; 
     117 int i; 
     118 
     119 if ( roar_get_vol(con, stream, &mixer, &channels) == -1 ) { 
     120  fprintf(stderr, "Error: can not get stream mixer info\n"); 
     121  return -1; 
     122 } 
     123 
     124 for (i = 0; i < channels; i++) 
     125  printf("Mixer volume chan %2i  : %i (%.2f%%)\n", i, mixer.mixer[i], (float)mixer.mixer[i]/655.35); 
     126 
     127 return 0; 
     128} 
    111129 
    112130int main (int argc, char * argv[]) { 
Note: See TracChangeset for help on using the changeset viewer.