Changeset 9d46f60


Ignore:
Timestamp:
Aug 1, 2015, 11:17:22 AM (9 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
7aa4aaa
Parents:
e11ce489
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/io/audio_unit.c

    re11ce489 r9d46f60  
    234234  audioFormat.mChannelsPerFrame = 2;
    235235  audioFormat.mFormatID = kAudioFormatLinearPCM;
    236   audioFormat.mFormatFlags = kAudioFormatFlagsCanonical;
     236  audioFormat.mFormatFlags = kAudioFormatFlagIsSignedInteger | kAudioFormatFlagsNativeEndian | kAudioFormatFlagIsPacked;
    237237  audioFormat.mFramesPerPacket = 1;
    238   audioFormat.mBitsPerChannel = 8 * sizeof(AudioSampleType);
     238  audioFormat.mBitsPerChannel = 8 * sizeof(SInt16);
    239239#if 1  // interleaving
    240   audioFormat.mBytesPerFrame = 2 * sizeof(AudioSampleType);
    241   audioFormat.mBytesPerPacket = 2 * sizeof(AudioSampleType);
     240  audioFormat.mBytesPerFrame = 2 * sizeof(SInt16);
     241  audioFormat.mBytesPerPacket = 2 * sizeof(SInt16);
    242242#else
    243   audioFormat.mBytesPerPacket = audioFormat.mBytesPerFrame = sizeof(AudioUnitSampleType);
     243  audioFormat.mBytesPerPacket = audioFormat.mBytesPerFrame = sizeof(SInt32);
    244244  audioFormat.mFormatFlags |= kAudioFormatFlagIsNonInterleaved;
    245245#endif
Note: See TracChangeset for help on using the changeset viewer.