- Timestamp:
- Feb 11, 2013, 11:06:28 AM (12 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- 050a8f3
- Parents:
- 5314432 (diff), 88fc249 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- src
- Files:
-
- 1 deleted
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
src/aubio.h
r5314432 rfc117d0 1 1 /* 2 Copyright (C) 2003-20 09Paul Brossier <piem@aubio.org>2 Copyright (C) 2003-2013 Paul Brossier <piem@aubio.org> 3 3 4 4 This file is part of aubio. -
src/io/sink.c
r5314432 rfc117d0 45 45 #endif /* HAVE_SNDFILE */ 46 46 #endif /* __APPLE__ */ 47 AUBIO_ERROR("failed creating aubio sink with %s ", uri);47 AUBIO_ERROR("failed creating aubio sink with %s\n", uri); 48 48 AUBIO_FREE(s); 49 49 return NULL; -
src/io/sink_apple_audio.c
r5314432 rfc117d0 53 53 aubio_sink_apple_audio_t * new_aubio_sink_apple_audio(char_t * uri, uint_t samplerate) { 54 54 aubio_sink_apple_audio_t * s = AUBIO_NEW(aubio_sink_apple_audio_t); 55 s->samplerate ;55 s->samplerate = samplerate; 56 56 s->channels = 1; 57 57 s->path = uri; … … 59 59 60 60 AudioStreamBasicDescription clientFormat; 61 UInt32 propSize = sizeof(clientFormat);62 61 memset(&clientFormat, 0, sizeof(AudioStreamBasicDescription)); 63 62 clientFormat.mFormatID = kAudioFormatLinearPCM; … … 78 77 overwrite ? kAudioFileFlags_EraseFile : 0, &s->audioFile); 79 78 if (err) { 80 AUBIO_ERR("error when trying to access %s, in ExtAudioFileOpenURL, %d\n", s->path, (int)err);79 AUBIO_ERR("error when trying to create %s, in ExtAudioFileCreateWithURL, %d\n", s->path, (int)err); 81 80 goto beach; 82 81 } -
src/io/source.c
r5314432 rfc117d0 45 45 #endif /* HAVE_SNDFILE */ 46 46 #endif /* __APPLE__ */ 47 AUBIO_ERROR("failed creating aubio source with %s ", uri);47 AUBIO_ERROR("failed creating aubio source with %s\n", uri); 48 48 AUBIO_FREE(s); 49 49 return NULL; -
src/io/source.h
r5314432 rfc117d0 38 38 void del_aubio_source(aubio_source_t * s); 39 39 40 uint_t aubio_source_get_samplerate(aubio_source_t * s); 41 40 42 #ifdef __cplusplus 41 43 } -
src/io/source_apple_audio.c
r5314432 rfc117d0 55 55 56 56 s->path = path; 57 s->samplerate = samplerate;58 57 s->block_size = block_size; 59 58 s->channels = 1; … … 61 60 OSStatus err = noErr; 62 61 UInt32 propSize; 63 64 AudioStreamBasicDescription clientFormat;65 propSize = sizeof(clientFormat);66 memset(&clientFormat, 0, sizeof(AudioStreamBasicDescription));67 clientFormat.mFormatID = kAudioFormatLinearPCM;68 clientFormat.mSampleRate = (Float64)(s->samplerate);69 clientFormat.mFormatFlags = kAudioFormatFlagIsSignedInteger | kAudioFormatFlagIsPacked;70 clientFormat.mChannelsPerFrame = s->channels;71 clientFormat.mBitsPerChannel = sizeof(short) * 8;72 clientFormat.mFramesPerPacket = 1;73 clientFormat.mBytesPerFrame = clientFormat.mBitsPerChannel * clientFormat.mChannelsPerFrame / 8;74 clientFormat.mBytesPerPacket = clientFormat.mFramesPerPacket * clientFormat.mBytesPerFrame;75 clientFormat.mReserved = 0;76 62 77 63 // open the resource url … … 90 76 if (err) { AUBIO_ERROR("error in ExtAudioFileGetProperty, %d\n", (int)err); goto beach;} 91 77 92 if (s ->samplerate == 1) {93 clientFormat.mSampleRate = fileFormat.mSampleRate;94 s->samplerate = fileFormat.mSampleRate;78 if (samplerate == 0) { 79 samplerate = fileFormat.mSampleRate; 80 //AUBIO_DBG("sampling rate set to 0, automagically adjusting to %d\n", samplerate); 95 81 } 82 s->samplerate = samplerate; 83 84 AudioStreamBasicDescription clientFormat; 85 propSize = sizeof(clientFormat); 86 memset(&clientFormat, 0, sizeof(AudioStreamBasicDescription)); 87 clientFormat.mFormatID = kAudioFormatLinearPCM; 88 clientFormat.mSampleRate = (Float64)(s->samplerate); 89 clientFormat.mFormatFlags = kAudioFormatFlagIsSignedInteger | kAudioFormatFlagIsPacked; 90 clientFormat.mChannelsPerFrame = s->channels; 91 clientFormat.mBitsPerChannel = sizeof(short) * 8; 92 clientFormat.mFramesPerPacket = 1; 93 clientFormat.mBytesPerFrame = clientFormat.mBitsPerChannel * clientFormat.mChannelsPerFrame / 8; 94 clientFormat.mBytesPerPacket = clientFormat.mFramesPerPacket * clientFormat.mBytesPerFrame; 95 clientFormat.mReserved = 0; 96 96 97 97 // set the client format description -
src/io/source_apple_audio.h
r5314432 rfc117d0 28 28 void del_aubio_source_apple_audio(aubio_source_apple_audio_t * s); 29 29 30 uint_t aubio_source_apple_audio_get_samplerate(aubio_source_apple_audio_t * s); 31 30 32 #endif /* _AUBIO_SOURCE_APPLE_AUDIO_H */ -
src/io/source_sndfile.c
r5314432 rfc117d0 70 70 71 71 s->hop_size = hop_size; 72 s->samplerate = samplerate;73 72 s->channels = 1; 74 73 s->path = path; … … 90 89 s->input_format = sfinfo.format; 91 90 92 if (s->samplerate == 1) s->samplerate = s->input_samplerate; 93 91 if (samplerate == 0) { 92 samplerate = s->input_samplerate; 93 //AUBIO_DBG("sampling rate set to 0, automagically adjusting to %d\n", samplerate); 94 } 95 s->samplerate = samplerate; 94 96 /* compute input block size required before resampling */ 95 97 s->ratio = s->samplerate/(float)s->input_samplerate; … … 192 194 } 193 195 196 uint_t aubio_source_sndfile_get_samplerate(aubio_source_sndfile_t * s) { 197 return s->samplerate; 198 } 199 194 200 #endif /* HAVE_SNDFILE */ -
src/io/source_sndfile.h
r5314432 rfc117d0 28 28 void del_aubio_source_sndfile(aubio_source_sndfile_t * s); 29 29 30 uint_t aubio_source_sndfile_get_samplerate(aubio_source_sndfile_t * s); 31 30 32 #endif /* _AUBIO_SOURCE_SNDFILE_H */ -
src/tempo/beattracking.c
r5314432 rfc117d0 136 136 smpl_t beat; // beat position 137 137 smpl_t bp; // beat period 138 uint_t a ; sint_t b;// used to build shift invariant comb filterbank138 uint_t a, b; // used to build shift invariant comb filterbank 139 139 uint_t kmax; // number of elements used to find beat phase 140 140 … … 160 160 for (i = 1; i < laglen - 1; i++) { 161 161 for (a = 1; a <= numelem; a++) { 162 for (b = (1 - a); b < (sint_t)a; b++) {163 bt->acfout->data[i] += bt->acf->data[ a * (i + 1)+ b - 1]162 for (b = 1; b < 2 * a; b++) { 163 bt->acfout->data[i] += bt->acf->data[i * a + b - 1] 164 164 * 1. / (2. * a - 1.); 165 165 } … … 276 276 aubio_beattracking_checkstate (aubio_beattracking_t * bt) 277 277 { 278 uint_t i, j, a ; sint_tb;278 uint_t i, j, a, b; 279 279 uint_t flagconst = 0; 280 280 sint_t counter = bt->counter; … … 300 300 for (i = 1; i < laglen - 1; i++) { 301 301 for (a = 1; a <= bt->timesig; a++) { 302 for (b = (1 - a); b < (sint_t)a; b++) {303 acfout->data[i] += acf->data[ a * (i + 1)+ b - 1];302 for (b = 1; b < 2 * a; b++) { 303 acfout->data[i] += acf->data[i * a + b - 1]; 304 304 } 305 305 } -
src/temporal/resampler.c
r5314432 rfc117d0 43 43 int error = 0; 44 44 s->stat = src_new (type, 1, &error); /* only one channel */ 45 if (error) { 46 AUBIO_ERR ("Failed creating resampler: %s\n", src_strerror (error)); 47 del_aubio_resampler(s); 48 return NULL; 49 } 45 50 s->proc = AUBIO_NEW (SRC_DATA); 46 if (error)47 AUBIO_ERR ("%s\n", src_strerror (error));48 51 s->ratio = ratio; 49 52 return s; … … 53 56 del_aubio_resampler (aubio_resampler_t * s) 54 57 { 55 src_delete (s->stat);58 if (s->stat) src_delete (s->stat); 56 59 AUBIO_FREE (s->proc); 57 60 AUBIO_FREE (s); -
src/wscript_build
r5314432 rfc117d0 25 25 # install headers, except _priv.h ones 26 26 ctx.install_files('${PREFIX}/include/aubio/', 27 ctx.path.ant_glob('**/*.h', 28 exclude = ['_priv.h', 'config.h']),29 27 28 ctx.path.ant_glob('**/*.h', excl = ['**_priv.h', 'config.h']), 29 relative_trick=True)
Note: See TracChangeset
for help on using the changeset viewer.