Changeset ad65346 for python/ext/aubiomodule.c
- Timestamp:
- Sep 23, 2016, 6:57:20 AM (8 years ago)
- Branches:
- feature/cnn, feature/crepe, feature/pitchshift, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch
- Children:
- 7d01fdf
- Parents:
- 3ffedf22 (diff), bd8a92d (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/ext/aubiomodule.c
r3ffedf22 rad65346 257 257 #endif 258 258 259 void 260 aubio_log_function(int level, const char *message, void *data) 261 { 262 // remove trailing \n 263 char *pos; 264 if ((pos=strchr(message, '\n')) != NULL) { 265 *pos = '\0'; 266 } 267 // warning or error 268 if (level == AUBIO_LOG_ERR) { 269 PyErr_Format(PyExc_RuntimeError, "%s", message); 270 } else { 271 PyErr_WarnEx(PyExc_UserWarning, message, 1); 272 } 273 } 274 259 275 static PyObject * 260 276 initaubio (void) … … 316 332 add_ufuncs(m); 317 333 334 aubio_log_set_level_function(AUBIO_LOG_ERR, aubio_log_function, NULL); 335 aubio_log_set_level_function(AUBIO_LOG_WRN, aubio_log_function, NULL); 318 336 return m; 319 337 }
Note: See TracChangeset
for help on using the changeset viewer.