Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/src/io/test-source_multi.c

    ra06ab19 r59c4e5d  
    1717    PRINT_MSG(" - read file.wav at original samplerate with 4096 blocks\n");
    1818    PRINT_MSG("       %s file.wav 0 4096 \n", argv[0]);
    19     PRINT_MSG(" - read file.wav at original samplerate with 256 frames blocks, mono\n");
    20     PRINT_MSG("       %s file.wav 0 4096 1\n", argv[0]);
    2119    return err;
    2220  }
     
    2523  uint_t hop_size = 256;
    2624  uint_t n_frames = 0, read = 0;
    27   uint_t n_channels = 0;
    28   if ( argc >= 3 ) samplerate = atoi(argv[2]);
    29   if ( argc >= 4 ) hop_size   = atoi(argv[3]);
    30   if ( argc >= 5 ) n_channels = atoi(argv[4]);
     25  if ( argc == 3 ) samplerate = atoi(argv[2]);
     26  if ( argc == 4 ) hop_size = atoi(argv[3]);
    3127
    3228  char_t *source_path = argv[1];
     
    3531  if (!s) { err = -1; goto beach; }
    3632
    37   if ( samplerate == 0 ) samplerate = aubio_source_get_samplerate(s);
     33  if (samplerate == 0 ) samplerate = aubio_source_get_samplerate(s);
    3834
    39   if ( n_channels == 0 ) n_channels = aubio_source_get_channels(s);
    40 
    41   fmat_t *mat = new_fmat(hop_size, n_channels);
     35  fmat_t *mat = new_fmat(hop_size, aubio_source_get_channels(s) );
    4236
    4337  do {
     
    4741  } while ( read == hop_size );
    4842
    49   PRINT_MSG("read %d frames in %d channels at %dHz (%d blocks) from %s\n",
    50       n_frames, n_channels, samplerate, n_frames / hop_size, source_path);
     43  PRINT_MSG("read %d frames at %dHz (%d blocks) from %s\n", n_frames, samplerate,
     44    n_frames / hop_size, source_path);
    5145
    5246  del_fmat (mat);
Note: See TracChangeset for help on using the changeset viewer.