From: Paul Brossier Date: Mon, 8 Apr 2013 15:27:35 +0000 (-0500) Subject: src/io/sink_apple_audio.c: warn before fixing size X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8a7b344eac245358903a1223b6d01b323bf4f7fb;p=aubio.git src/io/sink_apple_audio.c: warn before fixing size --- diff --git a/src/io/sink_apple_audio.c b/src/io/sink_apple_audio.c index b3e4aa36..93a3c6a0 100644 --- a/src/io/sink_apple_audio.c +++ b/src/io/sink_apple_audio.c @@ -39,7 +39,7 @@ extern CFURLRef getURLFromPath(const char * path); #define MAX_SIZE 4096 // the maximum number of frames that can be written at a time -struct _aubio_sink_apple_audio_t { +struct _aubio_sink_apple_audio_t { uint_t samplerate; uint_t channels; char_t *path; @@ -95,10 +95,9 @@ void aubio_sink_apple_audio_do(aubio_sink_apple_audio_t * s, fvec_t * write_data UInt32 c, v; bool async = true; short *data = (short*)s->bufferList.mBuffers[0].mData; - if (write > s->max_frames) { + if (write > s->max_frames) { + AUBIO_WRN("sink_apple_audio: trying to write %d frames, max %d\n", write, s->max_frames); write = s->max_frames; - AUBIO_WRN("trying to write %d frames, but only %d can be written at a time", - write, s->max_frames); } smpl_t *buf = write_data->data;