Changeset 491e6ea
- Timestamp:
- Jan 26, 2014, 9:18:22 PM (11 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:
- 2e17371
- Parents:
- c038740
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/io/sink_sndfile.c
rc038740 r491e6ea 50 50 51 51 if (path == NULL) { 52 AUBIO_ERR(" Aborted opening null path\n");52 AUBIO_ERR("sink_sndfile: Aborted opening null path\n"); 53 53 return NULL; 54 54 } … … 70 70 if (s->handle == NULL) { 71 71 /* show libsndfile err msg */ 72 AUBIO_ERR(" Failed opening %s. %s\n", s->path, sf_strerror (NULL));72 AUBIO_ERR("sink_sndfile: Failed opening %s. %s\n", s->path, sf_strerror (NULL)); 73 73 AUBIO_FREE(s); 74 74 return NULL; … … 78 78 /* allocate data for de/interleaving reallocated when needed. */ 79 79 if (s->scratch_size >= MAX_SIZE * MAX_CHANNELS) { 80 AUBIO_ERR(" %d x %d exceeds maximum aubio_sink_sndfile buffer size %d\n",80 AUBIO_ERR("sink_sndfile: %d x %d exceeds maximum aubio_sink_sndfile buffer size %d\n", 81 81 s->max_size, s->channels, MAX_CHANNELS * MAX_CHANNELS); 82 82 AUBIO_FREE(s); … … 110 110 written_frames = sf_write_float (s->handle, s->scratch_data, nsamples); 111 111 if (written_frames/channels != write) { 112 AUBIO_WRN(" trying to write %d frames to %s, but only %d could be written",112 AUBIO_WRN("sink_sndfile: trying to write %d frames to %s, but only %d could be written", 113 113 write, s->path, (uint_t)written_frames); 114 114 } … … 121 121 } 122 122 if (sf_close(s->handle)) { 123 AUBIO_ERR(" Error closing file %s: %s", s->path, sf_strerror (NULL));123 AUBIO_ERR("sink_sndfile: Error closing file %s: %s", s->path, sf_strerror (NULL)); 124 124 return AUBIO_FAIL; 125 125 } -
src/io/source_avcodec.c
rc038740 r491e6ea 68 68 int err; 69 69 if (path == NULL) { 70 AUBIO_ERR(" Aborted opening null path\n");70 AUBIO_ERR("source_avcodec: Aborted opening null path\n"); 71 71 goto beach; 72 72 } 73 73 if ((sint_t)samplerate < 0) { 74 AUBIO_ERR(" Can not open %s with samplerate %d\n", path, samplerate);74 AUBIO_ERR("source_avcodec: Can not open %s with samplerate %d\n", path, samplerate); 75 75 goto beach; 76 76 } 77 77 if ((sint_t)hop_size <= 0) { 78 AUBIO_ERR(" Can not open %s with hop_size %d\n", path, hop_size);78 AUBIO_ERR("source_avcodec: Can not open %s with hop_size %d\n", path, hop_size); 79 79 goto beach; 80 80 } … … 96 96 char errorstr[256]; 97 97 av_strerror (err, errorstr, sizeof(errorstr)); 98 AUBIO_ERR(" Failed opening %s (%s)\n", s->path, errorstr);98 AUBIO_ERR("source_avcodec: Failed opening %s (%s)\n", s->path, errorstr); 99 99 goto beach; 100 100 } … … 107 107 char errorstr[256]; 108 108 av_strerror (err, errorstr, sizeof(errorstr)); 109 AUBIO_ERR(" Could not find stream information " "for %s (%s)\n", s->path,109 AUBIO_ERR("source_avcodec: Could not find stream information " "for %s (%s)\n", s->path, 110 110 errorstr); 111 111 goto beach; … … 123 123 selected_stream = i; 124 124 } else { 125 AUBIO_WRN(" More than one audio stream in %s, "125 AUBIO_WRN("source_avcodec: More than one audio stream in %s, " 126 126 "taking the first one\n", s->path); 127 127 } … … 129 129 } 130 130 if (selected_stream == -1) { 131 AUBIO_ERR(" No audio stream in %s\n", s->path);131 AUBIO_ERR("source_avcodec: No audio stream in %s\n", s->path); 132 132 goto beach; 133 133 } … … 139 139 AVCodec *codec = avcodec_find_decoder(avCodecCtx->codec_id); 140 140 if (codec == NULL) { 141 AUBIO_ERR(" Could not find decoder for %s", s->path);141 AUBIO_ERR("source_avcodec: Could not find decoder for %s", s->path); 142 142 goto beach; 143 143 } … … 146 146 char errorstr[256]; 147 147 av_strerror (err, errorstr, sizeof(errorstr)); 148 AUBIO_ERR(" Could not load codec for %s (%s)\n", s->path, errorstr);148 AUBIO_ERR("source_avcodec: Could not load codec for %s (%s)\n", s->path, errorstr); 149 149 goto beach; 150 150 } … … 163 163 164 164 if (s->samplerate > s->input_samplerate) { 165 AUBIO_WRN(" upsampling %s from %d to %d\n", s->path,165 AUBIO_WRN("source_avcodec: upsampling %s from %d to %d\n", s->path, 166 166 s->input_samplerate, s->samplerate); 167 167 } … … 170 170 avFrame = avcodec_alloc_frame(); 171 171 if (!avFrame) { 172 AUBIO_ERR(" Could not allocate frame for (%s)\n", s->path);172 AUBIO_ERR("source_avcodec: Could not allocate frame for (%s)\n", s->path); 173 173 } 174 174 … … 223 223 char errorstr[256]; 224 224 av_strerror (err, errorstr, sizeof(errorstr)); 225 AUBIO_ERR(" Could not open AVAudioResampleContext for %s (%s)\n",225 AUBIO_ERR("source_avcodec: Could not open AVAudioResampleContext for %s (%s)\n", 226 226 s->path, errorstr); 227 227 //goto beach; -
src/io/source_sndfile.c
rc038740 r491e6ea 67 67 68 68 if (path == NULL) { 69 AUBIO_ERR(" Aborted opening null path\n");69 AUBIO_ERR("source_sndfile: Aborted opening null path\n"); 70 70 goto beach; 71 71 } 72 72 if ((sint_t)samplerate < 0) { 73 AUBIO_ERR(" Can not open %s with samplerate %d\n", path, samplerate);73 AUBIO_ERR("source_sndfile: Can not open %s with samplerate %d\n", path, samplerate); 74 74 goto beach; 75 75 } 76 76 if ((sint_t)hop_size <= 0) { 77 AUBIO_ERR(" Can not open %s with hop_size %d\n", path, hop_size);77 AUBIO_ERR("source_sndfile: Can not open %s with hop_size %d\n", path, hop_size); 78 78 goto beach; 79 79 } … … 89 89 if (s->handle == NULL) { 90 90 /* show libsndfile err msg */ 91 AUBIO_ERR(" Failed opening %s: %s\n", s->path, sf_strerror (NULL));91 AUBIO_ERR("source_sndfile: Failed opening %s: %s\n", s->path, sf_strerror (NULL)); 92 92 goto beach; 93 93 } … … 108 108 109 109 if (s->input_hop_size * s->input_channels > MAX_SAMPLES) { 110 AUBIO_ERR(" Not able to process more than %d frames of %d channels\n",110 AUBIO_ERR("source_sndfile: Not able to process more than %d frames of %d channels\n", 111 111 MAX_SAMPLES / s->input_channels, s->input_channels); 112 112 goto beach; … … 122 122 // we would need to add a ring buffer for these 123 123 if ( (uint_t)(s->input_hop_size * s->ratio + .5) != s->hop_size ) { 124 AUBIO_ERR(" can not upsample %s from %d to %d\n", s->path,124 AUBIO_ERR("source_sndfile: can not upsample %s from %d to %d\n", s->path, 125 125 s->input_samplerate, s->samplerate); 126 126 goto beach; 127 127 } 128 AUBIO_WRN(" upsampling %s from %d to %d\n", s->path,128 AUBIO_WRN("source_sndfile: upsampling %s from %d to %d\n", s->path, 129 129 s->input_samplerate, s->samplerate); 130 130 } … … 132 132 #else 133 133 if (s->ratio != 1) { 134 AUBIO_ERR(" aubio was compiled without aubio_resampler\n");134 AUBIO_ERR("source_sndfile: aubio was compiled without aubio_resampler\n"); 135 135 goto beach; 136 136 } … … 273 273 } 274 274 if(sf_close(s->handle)) { 275 AUBIO_ERR(" Error closing file %s: %s", s->path, sf_strerror (NULL));275 AUBIO_ERR("source_sndfile: Error closing file %s: %s", s->path, sf_strerror (NULL)); 276 276 return AUBIO_FAIL; 277 277 } -
tests/src/test-cvec.c
rc038740 r491e6ea 5 5 { 6 6 uint_t i, window_size = 16; // window size 7 utils_init_random();8 7 cvec_t * complex_vector = new_cvec (window_size); // input buffer 9 8 uint_t rand_times = 4; 9 10 utils_init_random(); 10 11 11 12 while (rand_times -- ) {
Note: See TracChangeset
for help on using the changeset viewer.