From 9d46f6048003c64a00c9307ae07596c177ba2910 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Sat, 1 Aug 2015 11:17:22 +0200 Subject: [PATCH] src/io/audio_unit.c: fix deprecation warning (closes #16) --- src/io/audio_unit.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/io/audio_unit.c b/src/io/audio_unit.c index 00f742d8..eab299f3 100644 --- a/src/io/audio_unit.c +++ b/src/io/audio_unit.c @@ -233,14 +233,14 @@ sint_t aubio_audio_unit_init (aubio_audio_unit_t *o) 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 -- 2.11.0