shithub: aubio

Download patch

ref: 8a7b344eac245358903a1223b6d01b323bf4f7fb
parent: 65108666ab0c42175d4218c752c56612b3d8509c
author: Paul Brossier <piem@piem.org>
date: Mon Apr 8 06:27:35 EDT 2013

src/io/sink_apple_audio.c: warn before fixing size

--- a/src/io/sink_apple_audio.c
+++ b/src/io/sink_apple_audio.c
@@ -39,7 +39,7 @@
 
 #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 @@
   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;