ref: 961cff13406964758b30e176bf287797fb06f136
parent: 58c408db3534f6da7c5d68db05d25485a07bf43a
author: Paul Brossier <piem@piem.org>
date: Sun Jul 20 16:55:06 EDT 2014
src/io/source_apple_audio.c: set s->path, quiet
--- a/src/io/source_apple_audio.c
+++ b/src/io/source_apple_audio.c
@@ -60,8 +60,26 @@
{
aubio_source_apple_audio_t * s = AUBIO_NEW(aubio_source_apple_audio_t);
+ if (path == NULL) {
+ AUBIO_ERROR("source_apple_audio: Aborted opening null path\n");
+ goto beach;
+ }
+
+ if ( (sint_t)block_size <= 0 ) {
+ AUBIO_ERROR("source_apple_audio: Can not open %s with null or negative block_size %d\n",
+ path, block_size);
+ goto beach;
+ }
+
+ if ( (sint_t)samplerate < 0 ) {
+ AUBIO_ERROR("source_apple_audio: Can not open %s with negative samplerate %d\n",
+ path, samplerate);
+ goto beach;
+ }
+
s->block_size = block_size;
s->samplerate = samplerate;
+ s->path = path;
if ( aubio_source_apple_audio_open ( s, path ) ) {
goto beach;
@@ -139,7 +157,7 @@
AUBIO_ERROR("source_apple_audio: Failed opening %s, "
"error in ExtAudioFileSetProperty (%s)\n", s->path,
getPrintableOSStatusError(errorstr, err));
-#if 1
+#if 0
// print client and format descriptions
AUBIO_DBG("Opened %s\n", s->path);
AUBIO_DBG("file/client Format.mFormatID: : %3c%c%c%c / %c%c%c%c\n",