From 45e8614b878e3bdabc2fc44fdfb9501dcdeddfa1 Mon Sep 17 00:00:00 2001 From: Michael Tyson Date: Sat, 2 Jul 2016 17:29:59 +1000 Subject: [PATCH] Renamed AEExtAudioFileRefCreate to AEExtAudioFileCreate --- .../Modules/Taps/AEAudioFileRecorderModule.m | 2 +- TheAmazingAudioEngine/Outputs/AEAudioFileOutput.m | 2 +- TheAmazingAudioEngine/Utilities/AEUtilities.h | 6 ++++-- TheAmazingAudioEngine/Utilities/AEUtilities.m | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/TheAmazingAudioEngine/Modules/Taps/AEAudioFileRecorderModule.m b/TheAmazingAudioEngine/Modules/Taps/AEAudioFileRecorderModule.m index c9ca037..86b025f 100644 --- a/TheAmazingAudioEngine/Modules/Taps/AEAudioFileRecorderModule.m +++ b/TheAmazingAudioEngine/Modules/Taps/AEAudioFileRecorderModule.m @@ -39,7 +39,7 @@ - (instancetype)initWithRenderer:(AERenderer *)renderer URL:(NSURL *)url type:(A if ( !(self = [super initWithRenderer:renderer]) ) return nil; - if ( !(_audioFile = AEExtAudioFileRefCreate(url, type, self.renderer.sampleRate, numberOfChannels, error)) ) return nil; + if ( !(_audioFile = AEExtAudioFileCreate(url, type, self.renderer.sampleRate, numberOfChannels, error)) ) return nil; // Prime async recording ExtAudioFileWriteAsync(_audioFile, 0, NULL); diff --git a/TheAmazingAudioEngine/Outputs/AEAudioFileOutput.m b/TheAmazingAudioEngine/Outputs/AEAudioFileOutput.m index 8110e0b..2483653 100644 --- a/TheAmazingAudioEngine/Outputs/AEAudioFileOutput.m +++ b/TheAmazingAudioEngine/Outputs/AEAudioFileOutput.m @@ -29,7 +29,7 @@ - (instancetype)initWithRenderer:(AERenderer *)renderer URL:(NSURL *)url type:(A error:(NSError *__autoreleasing _Nullable *)error { if ( !(self = [super init]) ) return nil; - if ( !(_audioFile = AEExtAudioFileRefCreate(url, type, sampleRate, channelCount, error)) ) return nil; + if ( !(_audioFile = AEExtAudioFileCreate(url, type, sampleRate, channelCount, error)) ) return nil; self.fileURL = url; self.sampleRate = sampleRate; diff --git a/TheAmazingAudioEngine/Utilities/AEUtilities.h b/TheAmazingAudioEngine/Utilities/AEUtilities.h index 1964b84..b08c3f7 100644 --- a/TheAmazingAudioEngine/Utilities/AEUtilities.h +++ b/TheAmazingAudioEngine/Utilities/AEUtilities.h @@ -90,8 +90,10 @@ static inline BOOL _AECheckOSStatus(OSStatus result, const char * _Nonnull opera * @param error If not NULL, the error on output * @return The initialized ExtAudioFileRef, or NULL on error */ -ExtAudioFileRef _Nullable AEExtAudioFileRefCreate(NSURL * _Nonnull url, AEAudioFileType fileType, double sampleRate, - int channelCount, NSError * _Nullable * _Nullable error); +ExtAudioFileRef _Nullable AEExtAudioFileCreate(NSURL * _Nonnull url, AEAudioFileType fileType, double sampleRate, + int channelCount, NSError * _Nullable * _Nullable error); + +#define AEExtAudioFileRefCreate AEExtAudioFileCreate #ifdef __cplusplus } diff --git a/TheAmazingAudioEngine/Utilities/AEUtilities.m b/TheAmazingAudioEngine/Utilities/AEUtilities.m index b5eae37..eede585 100644 --- a/TheAmazingAudioEngine/Utilities/AEUtilities.m +++ b/TheAmazingAudioEngine/Utilities/AEUtilities.m @@ -53,7 +53,7 @@ BOOL AERateLimit(void) { return YES; } -ExtAudioFileRef AEExtAudioFileRefCreate(NSURL * url, AEAudioFileType fileType, double sampleRate, int channelCount, +ExtAudioFileRef AEExtAudioFileCreate(NSURL * url, AEAudioFileType fileType, double sampleRate, int channelCount, NSError ** error) { AudioStreamBasicDescription asbd = {