From 8a7b344eac245358903a1223b6d01b323bf4f7fb Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Mon, 8 Apr 2013 10:27:35 -0500 Subject: [PATCH] src/io/sink_apple_audio.c: warn before fixing size --- src/io/sink_apple_audio.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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; -- 2.26.2