Changes in / [b4f621b:512ab15]


Ignore:
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • examples/utils.c

    rb4f621b r512ab15  
    197197#endif
    198198  if (velo == 0) {
    199     outmsg ("%f\n", blocks * hop_size / (float) samplerate);
     199    verbmsg ("%f\n", blocks * hop_size / (float) samplerate);
    200200  } else {
    201     outmsg ("%f\t%f\t", mpitch, blocks * hop_size / (float) samplerate);
     201    verbmsg ("%f\t%f\t", mpitch, blocks * hop_size / (float) samplerate);
    202202  }
    203203}
  • python/demos/demo_mfcc.py

    rb4f621b r512ab15  
    2525m = mfcc(win_s, n_filters, n_coeffs, samplerate)
    2626
    27 mfccs = zeros([n_coeffs,])
     27mfccs = zeros([13,])
    2828frames_read = 0
    2929while True:
  • src/io/source_apple_audio.c

    rb4f621b r512ab15  
    6161  aubio_source_apple_audio_t * s = AUBIO_NEW(aubio_source_apple_audio_t);
    6262
    63   if (path == NULL) {
    64     AUBIO_ERROR("source_apple_audio: Aborted opening null path\n");
    65     goto beach;
    66   }
    67 
    68   if ( (sint_t)block_size <= 0 ) {
    69     AUBIO_ERROR("source_apple_audio: Can not open %s with null or negative block_size %d\n",
    70         path, block_size);
    71     goto beach;
    72   }
    73 
    74   if ( (sint_t)samplerate < 0 ) {
    75     AUBIO_ERROR("source_apple_audio: Can not open %s with negative samplerate %d\n",
    76         path, samplerate);
    77     goto beach;
    78   }
    79 
    8063  s->block_size = block_size;
    8164  s->samplerate = samplerate;
    82   s->path = path;
    8365
    8466  if ( aubio_source_apple_audio_open ( s, path ) ) {
     
    158140        "error in ExtAudioFileSetProperty (%s)\n", s->path,
    159141        getPrintableOSStatusError(errorstr, err));
    160 #if 0
     142#if 1
    161143  // print client and format descriptions
    162144  AUBIO_DBG("Opened %s\n", s->path);
     
    299281
    300282uint_t aubio_source_apple_audio_seek (aubio_source_apple_audio_t * s, uint_t pos) {
    301   OSStatus err = noErr;
    302   if ((sint_t)pos < 0) {
    303     AUBIO_ERROR("source_apple_audio: error while seeking in %s "
    304         "(can not seek at negative position %d)\n",
    305         s->path, pos);
    306     err = -1;
    307     goto beach;
    308   }
    309   // check if we are not seeking out of the file
    310   SInt64 fileLengthFrames = 0;
    311   UInt32 propSize = sizeof(fileLengthFrames);
    312   ExtAudioFileGetProperty(s->audioFile,
    313       kExtAudioFileProperty_FileLengthFrames, &propSize, &fileLengthFrames);
     283  // after a short read, the bufferList size needs to resetted to prepare for a full read
     284  AudioBufferList *bufferList = &s->bufferList;
     285  bufferList->mBuffers[0].mDataByteSize = s->block_size * s->channels * sizeof (short);
    314286  // compute position in the source file, before resampling
    315287  smpl_t ratio = s->source_samplerate * 1. / s->samplerate;
    316288  SInt64 resampled_pos = (SInt64)ROUND( pos * ratio );
    317   if (resampled_pos > fileLengthFrames) {
    318     AUBIO_ERR("source_apple_audio: trying to seek in %s at pos %d, "
    319         "but file has only %d frames\n",
    320         s->path, pos, (uint_t)(fileLengthFrames / ratio));
    321     err = -1;
    322     goto beach;
    323   }
    324   // after a short read, the bufferList size needs to resetted to prepare for a full read
    325   AudioBufferList *bufferList = &s->bufferList;
    326   bufferList->mBuffers[0].mDataByteSize = s->block_size * s->channels * sizeof (short);
    327   // do the actual seek
    328   err = ExtAudioFileSeek(s->audioFile, resampled_pos);
     289  OSStatus err = ExtAudioFileSeek(s->audioFile, resampled_pos);
    329290  if (err) {
    330291    char_t errorstr[20];
     
    333294        getPrintableOSStatusError(errorstr, err));
    334295  }
    335 #if 0
    336   // check position after seek
    337   {
    338     SInt64 outFrameOffset = 0;
    339     err = ExtAudioFileTell(s->audioFile, &outFrameOffset);
    340     if (err) {
    341       char_t errorstr[20];
    342       AUBIO_ERROR("source_apple_audio: error while seeking %s at %d "
    343           "in ExtAudioFileTell (%s)\n", s->path, pos,
    344           getPrintableOSStatusError(errorstr, err));
    345     }
    346     AUBIO_DBG("source_apple_audio: asked seek at %d, tell got %d\n",
    347         pos, (uint_t)(outFrameOffset / ratio + .5));
    348   }
    349 #endif
    350 beach:
    351296  return err;
    352297}
  • src/io/source_sndfile.c

    rb4f621b r512ab15  
    185185  if (*read < s->hop_size) {
    186186    for (j = *read; j < s->hop_size; j++) {
    187       read_data->data[j] = 0;
     187      data[j] = 0;
    188188    }
    189189  }
     
    248248    for (i = 0; i < read_data->height; i++) {
    249249      for (j = *read; j < s->hop_size; j++) {
    250         read_data->data[i][j] = 0.;
     250        data[i][j] = 0.;
    251251      }
    252252    }
  • src/spectral/phasevoc.c

    rb4f621b r512ab15  
    7777  } */
    7878
    79   if ((sint_t)hop_s < 1) {
     79  if (hop_s < 1) {
    8080    AUBIO_ERR("got hop_size %d, but can not be < 1\n", hop_s);
    8181    goto beach;
    82   } else if ((sint_t)win_s < 1) {
    83     AUBIO_ERR("got buffer_size %d, but can not be < 1\n", win_s);
     82  } else if (win_s < 1) {
     83    AUBIO_ERR("got buffer_size %d, but can not be < 2\n", win_s);
    8484    goto beach;
    8585  } else if (win_s < hop_s) {
  • tests/src/io/test-source_avcodec.c

    rb4f621b r512ab15  
    2424  }
    2525
    26 #ifdef HAVE_LIBAV
     26#ifdef HAVE_AVCODEC
    2727  uint_t samplerate = 0;
    2828  uint_t hop_size = 256;
     
    5353  del_aubio_source_avcodec (s);
    5454beach:
    55 #else /* HAVE_LIBAV */
     55#else
    5656  err = 3;
    5757  PRINT_ERR("aubio was not compiled with aubio_source_avcodec\n");
    58 #endif /* HAVE_LIBAV */
     58#endif /* HAVE_AVCODEC */
    5959  return err;
    6060}
  • wscript

    rb4f621b r512ab15  
    118118    if target_platform in [ 'ios', 'iosimulator' ]:
    119119        ctx.define('TARGET_OS_IPHONE', 1)
    120         SDKVER="7.1"
     120        SDKVER="7.0"
    121121        MINSDKVER="6.1"
    122122        ctx.env.CFLAGS += ['-std=c99']
     
    125125            DEVROOT += "/Developer/Platforms/iPhoneOS.platform/Developer"
    126126            SDKROOT = "%(DEVROOT)s/SDKs/iPhoneOS%(SDKVER)s.sdk" % locals()
    127             #ctx.env.CFLAGS += [ '-arch', 'arm64' ]
     127            ctx.env.CFLAGS += [ '-arch', 'arm64' ]
    128128            ctx.env.CFLAGS += [ '-arch', 'armv7' ]
    129129            ctx.env.CFLAGS += [ '-arch', 'armv7s' ]
    130             #ctx.env.LINKFLAGS += [ '-arch', 'arm64' ]
     130            ctx.env.LINKFLAGS += [ '-arch', 'arm64' ]
    131131            ctx.env.LINKFLAGS += ['-arch', 'armv7']
    132132            ctx.env.LINKFLAGS += ['-arch', 'armv7s']
Note: See TracChangeset for help on using the changeset viewer.