Changeset 1889:013723cb2b26 in roaraudio


Ignore:
Timestamp:
05/25/09 08:26:14 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

only show block size in case it is != 0, only show time in sec if we know a rate

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roarclients/roarctl.c

    r1883 r1889  
    262262   printf("Relativ position id   : %i (synchronized)\n", s.pos_rel_id); 
    263263  } 
    264   if ( g_verbose > 1 ) 
    265    printf("Position              : %lu S (%.3fs)\n", (unsigned long int) s.pos, (float)s.pos/(s.info.rate*s.info.channels)); 
     264  if ( g_verbose > 1 ) { 
     265   if ( s.info.rate && s.info.channels ) { 
     266    printf("Position              : %lu S (%.3fs)\n", (unsigned long int) s.pos, 
     267                                    (float)s.pos/(s.info.rate*s.info.channels)); 
     268   } else { 
     269    printf("Position              : %lu S\n", (unsigned long int) s.pos); 
     270   } 
     271  } 
    266272 
    267273  if ( s.dir != ROAR_DIR_LIGHT_IN && s.dir != ROAR_DIR_LIGHT_OUT && 
     
    282288 
    283289   if ( g_verbose ) { 
    284     printf("Input block size      : %i Byte\n", info.block_size); 
     290    if ( info.block_size ) 
     291     printf("Input block size      : %i Byte\n", info.block_size); 
     292 
    285293    printf("Underruns pre/post    : %i/%i\n",   info.pre_underruns, info.post_underruns); 
    286294    if ( g_verbose > 1 ) 
Note: See TracChangeset for help on using the changeset viewer.