shithub: aubio

Download patch

ref: 9d46f6048003c64a00c9307ae07596c177ba2910
parent: e11ce4892883d5ab92c4e1cf45af8795d7d0b655
author: Paul Brossier <piem@piem.org>
date: Sat Aug 1 07:17:22 EDT 2015

src/io/audio_unit.c: fix deprecation warning (closes #16)

--- a/src/io/audio_unit.c
+++ b/src/io/audio_unit.c
@@ -233,14 +233,14 @@
   audioFormat.mSampleRate = (Float64)samplerate;
   audioFormat.mChannelsPerFrame = 2;
   audioFormat.mFormatID = kAudioFormatLinearPCM;
-  audioFormat.mFormatFlags = kAudioFormatFlagsCanonical;
+  audioFormat.mFormatFlags = kAudioFormatFlagIsSignedInteger | kAudioFormatFlagsNativeEndian | kAudioFormatFlagIsPacked;
   audioFormat.mFramesPerPacket = 1;
-  audioFormat.mBitsPerChannel = 8 * sizeof(AudioSampleType);
+  audioFormat.mBitsPerChannel = 8 * sizeof(SInt16);
 #if 1  // interleaving
-  audioFormat.mBytesPerFrame = 2 * sizeof(AudioSampleType);
-  audioFormat.mBytesPerPacket = 2 * sizeof(AudioSampleType);
+  audioFormat.mBytesPerFrame = 2 * sizeof(SInt16);
+  audioFormat.mBytesPerPacket = 2 * sizeof(SInt16);
 #else
-  audioFormat.mBytesPerPacket = audioFormat.mBytesPerFrame = sizeof(AudioUnitSampleType);
+  audioFormat.mBytesPerPacket = audioFormat.mBytesPerFrame = sizeof(SInt32);
   audioFormat.mFormatFlags |= kAudioFormatFlagIsNonInterleaved;
 #endif