Compare commits
54 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5672adc2f1 | |||
| 332b92b020 | |||
| c281f2efff | |||
| ca5ef4222c | |||
| c23c9f4c8e | |||
| cf8be4dae4 | |||
| d9f3b09662 | |||
| be39027784 | |||
| 95e3a07320 | |||
| 4348ff9c61 | |||
| 5cd1b80bae | |||
| 806351a127 | |||
| 89cfe10ed8 | |||
| 93a107d84b | |||
| 136268a254 | |||
| 4c12aab364 | |||
| c22d27568f | |||
| e6fb492400 | |||
| 43dd6f54dc | |||
| cb1af623af | |||
| e45309232a | |||
| 8e1222de99 | |||
| 8a78bec866 | |||
| 1bfc7f67ec | |||
| b0fb209739 | |||
| fd0cc9d03d | |||
| e115045cd5 | |||
| 27f043552b | |||
| 15cae1cbd0 | |||
| 143285d1dc | |||
| 27e1f252f2 | |||
| c61bd3ac80 | |||
| b264972d6a | |||
| d47c07c9b3 | |||
| bc893d116d | |||
| a6252b02dd | |||
| 7f0bf3bb6c | |||
| 62b79ce6c2 | |||
| 1415b5591e | |||
| ab892b9f74 | |||
| fde27c2db7 | |||
| 1055e3b1dc | |||
| ceba0dd415 | |||
| 6d6ae3e761 | |||
| 5261cb2961 | |||
| 65491d453d | |||
| 4389a48875 | |||
| 3b4382986f | |||
| b327e5b140 | |||
| 73adf239ec | |||
| c2c05b683b | |||
| 0bdade977d | |||
| 3b0f32abaa | |||
| 804cb1c3ef |
+18
@@ -1 +1,19 @@
|
||||
# Xcode
|
||||
#
|
||||
build/
|
||||
*.pbxuser
|
||||
!default.pbxuser
|
||||
*.mode1v3
|
||||
!default.mode1v3
|
||||
*.mode2v3
|
||||
!default.mode2v3
|
||||
*.perspectivev3
|
||||
!default.perspectivev3
|
||||
xcuserdata
|
||||
*.xccheckout
|
||||
*.moved-aside
|
||||
DerivedData
|
||||
*.hmap
|
||||
*.ipa
|
||||
*.xcuserstate
|
||||
.DS_Store
|
||||
|
||||
@@ -1,124 +0,0 @@
|
||||
//
|
||||
// AEFloatConverter.h
|
||||
// The Amazing Audio Engine
|
||||
//
|
||||
// Created by Michael Tyson on 25/10/2012.
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied
|
||||
// warranty. In no event will the authors be held liable for any damages
|
||||
// arising from the use of this software.
|
||||
//
|
||||
// Permission is granted to anyone to use this software for any purpose,
|
||||
// including commercial applications, and to alter it and redistribute it
|
||||
// freely, subject to the following restrictions:
|
||||
//
|
||||
// 1. The origin of this software must not be misrepresented; you must not
|
||||
// claim that you wrote the original software. If you use this software
|
||||
// in a product, an acknowledgment in the product documentation would be
|
||||
// appreciated but is not required.
|
||||
//
|
||||
// 2. Altered source versions must be plainly marked as such, and must not be
|
||||
// misrepresented as being the original software.
|
||||
//
|
||||
// 3. This notice may not be removed or altered from any source distribution.
|
||||
//
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <AudioToolbox/AudioToolbox.h>
|
||||
|
||||
/*!
|
||||
* Universal converter to float format
|
||||
*
|
||||
* Use this class to easily convert arbitrary audio formats to floating point
|
||||
* for use with utilities like the Accelerate framework.
|
||||
*/
|
||||
@interface AEFloatConverter : NSObject
|
||||
|
||||
/*!
|
||||
* Initialize
|
||||
*
|
||||
* @param sourceFormat The audio format to use
|
||||
*/
|
||||
- (id)initWithSourceFormat:(AudioStreamBasicDescription)sourceFormat;
|
||||
|
||||
/*!
|
||||
* Convert audio to floating-point
|
||||
*
|
||||
* This C function, safe to use in a Core Audio realtime thread context, will take
|
||||
* an audio buffer list of audio in the format you provided at initialisation, and
|
||||
* convert it into a noninterleaved float array.
|
||||
*
|
||||
* @param converter Pointer to the converter object.
|
||||
* @param sourceBuffer An audio buffer list containing the source audio.
|
||||
* @param targetBuffers An array of floating-point arrays to store the converted float audio into.
|
||||
* Note that you must provide the correct number of arrays, to match the number of channels.
|
||||
* @param frames The number of frames to convert.
|
||||
* @return YES on success; NO on failure
|
||||
*/
|
||||
BOOL AEFloatConverterToFloat(AEFloatConverter* converter, AudioBufferList *sourceBuffer, float * const * targetBuffers, UInt32 frames);
|
||||
|
||||
/*!
|
||||
* Convert audio to floating-point, in a buffer list
|
||||
*
|
||||
* This C function, safe to use in a Core Audio realtime thread context, will take
|
||||
* an audio buffer list of audio in the format you provided at initialisation, and
|
||||
* convert it into a noninterleaved float format.
|
||||
*
|
||||
* @param converter Pointer to the converter object.
|
||||
* @param sourceBuffer An audio buffer list containing the source audio.
|
||||
* @param targetBuffer An audio buffer list to store the converted floating-point audio.
|
||||
* @param frames The number of frames to convert.
|
||||
* @return YES on success; NO on failure
|
||||
*/
|
||||
BOOL AEFloatConverterToFloatBufferList(AEFloatConverter* converter, AudioBufferList *sourceBuffer, AudioBufferList *targetBuffer, UInt32 frames);
|
||||
|
||||
/*!
|
||||
* Convert audio from floating-point
|
||||
*
|
||||
* This C function, safe to use in a Core Audio realtime thread context, will take
|
||||
* an audio buffer list of audio in the format you provided at initialisation, and
|
||||
* convert it into a float array.
|
||||
*
|
||||
* @param converter Pointer to the converter object.
|
||||
* @param sourceBuffers An array of floating-point arrays containing the floating-point audio to convert.
|
||||
* Note that you must provide the correct number of arrays, to match the number of channels.
|
||||
* @param targetBuffer An audio buffer list to store the converted audio into.
|
||||
* @param frames The number of frames to convert.
|
||||
* @return YES on success; NO on failure
|
||||
*/
|
||||
BOOL AEFloatConverterFromFloat(AEFloatConverter* converter, float * const * sourceBuffers, AudioBufferList *targetBuffer, UInt32 frames);
|
||||
|
||||
/*!
|
||||
* Convert audio from floating-point, in a buffer list
|
||||
*
|
||||
* This C function, safe to use in a Core Audio realtime thread context, will take
|
||||
* an audio buffer list of audio in the format you provided at initialisation, and
|
||||
* convert it into a float array.
|
||||
*
|
||||
* @param converter Pointer to the converter object.
|
||||
* @param sourceBuffer An audio buffer list containing the source audio.
|
||||
* @param targetBuffer An audio buffer list to store the converted audio into.
|
||||
* @param frames The number of frames to convert.
|
||||
* @return YES on success; NO on failure
|
||||
*/
|
||||
BOOL AEFloatConverterFromFloatBufferList(AEFloatConverter* converter, AudioBufferList *sourceBuffer, AudioBufferList *targetBuffer, UInt32 frames);
|
||||
|
||||
/*!
|
||||
* The AudioStreamBasicDescription representing the converted floating-point format
|
||||
*/
|
||||
@property (nonatomic, readonly) AudioStreamBasicDescription floatingPointAudioDescription;
|
||||
|
||||
/*!
|
||||
* The source audio format set at initialization
|
||||
*/
|
||||
@property (nonatomic, readonly) AudioStreamBasicDescription sourceFormat;
|
||||
|
||||
@end
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
@@ -1,211 +0,0 @@
|
||||
//
|
||||
// AEFloatConverter.m
|
||||
// The Amazing Audio Engine
|
||||
//
|
||||
// Created by Michael Tyson on 25/10/2012.
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied
|
||||
// warranty. In no event will the authors be held liable for any damages
|
||||
// arising from the use of this software.
|
||||
//
|
||||
// Permission is granted to anyone to use this software for any purpose,
|
||||
// including commercial applications, and to alter it and redistribute it
|
||||
// freely, subject to the following restrictions:
|
||||
//
|
||||
// 1. The origin of this software must not be misrepresented; you must not
|
||||
// claim that you wrote the original software. If you use this software
|
||||
// in a product, an acknowledgment in the product documentation would be
|
||||
// appreciated but is not required.
|
||||
//
|
||||
// 2. Altered source versions must be plainly marked as such, and must not be
|
||||
// misrepresented as being the original software.
|
||||
//
|
||||
// 3. This notice may not be removed or altered from any source distribution.
|
||||
//
|
||||
|
||||
#import "AEFloatConverter.h"
|
||||
|
||||
#define checkResult(result,operation) (_checkResult((result),(operation),strrchr(__FILE__, '/')+1,__LINE__))
|
||||
static inline BOOL _checkResult(OSStatus result, const char *operation, const char* file, int line) {
|
||||
if ( result != noErr ) {
|
||||
NSLog(@"%s:%d: %s result %d %08X %4.4s", file, line, operation, (int)result, (int)result, (char*)&result);
|
||||
return NO;
|
||||
}
|
||||
return YES;
|
||||
}
|
||||
|
||||
#define kNoMoreDataErr -2222
|
||||
|
||||
struct complexInputDataProc_t {
|
||||
AudioBufferList *sourceBuffer;
|
||||
};
|
||||
|
||||
@interface AEFloatConverter () {
|
||||
AudioStreamBasicDescription _sourceAudioDescription;
|
||||
AudioStreamBasicDescription _floatAudioDescription;
|
||||
AudioConverterRef _toFloatConverter;
|
||||
AudioConverterRef _fromFloatConverter;
|
||||
AudioBufferList *_scratchFloatBufferList;
|
||||
}
|
||||
|
||||
static OSStatus complexInputDataProc(AudioConverterRef inAudioConverter,
|
||||
UInt32 *ioNumberDataPackets,
|
||||
AudioBufferList *ioData,
|
||||
AudioStreamPacketDescription **outDataPacketDescription,
|
||||
void *inUserData);
|
||||
@end
|
||||
|
||||
@implementation AEFloatConverter
|
||||
@synthesize sourceFormat = _sourceAudioDescription;
|
||||
|
||||
-(id)initWithSourceFormat:(AudioStreamBasicDescription)sourceFormat {
|
||||
if ( !(self = [super init]) ) return nil;
|
||||
|
||||
_floatAudioDescription.mFormatID = kAudioFormatLinearPCM;
|
||||
_floatAudioDescription.mFormatFlags = kAudioFormatFlagIsFloat | kAudioFormatFlagIsPacked | kAudioFormatFlagIsNonInterleaved;
|
||||
_floatAudioDescription.mChannelsPerFrame = sourceFormat.mChannelsPerFrame;
|
||||
_floatAudioDescription.mBytesPerPacket = sizeof(float);
|
||||
_floatAudioDescription.mFramesPerPacket = 1;
|
||||
_floatAudioDescription.mBytesPerFrame = sizeof(float);
|
||||
_floatAudioDescription.mBitsPerChannel = 8 * sizeof(float);
|
||||
_floatAudioDescription.mSampleRate = sourceFormat.mSampleRate;
|
||||
|
||||
_sourceAudioDescription = sourceFormat;
|
||||
|
||||
if ( memcmp(&sourceFormat, &_floatAudioDescription, sizeof(AudioStreamBasicDescription)) != 0 ) {
|
||||
checkResult(AudioConverterNew(&sourceFormat, &_floatAudioDescription, &_toFloatConverter), "AudioConverterNew");
|
||||
checkResult(AudioConverterNew(&_floatAudioDescription, &sourceFormat, &_fromFloatConverter), "AudioConverterNew");
|
||||
_scratchFloatBufferList = (AudioBufferList*)malloc(sizeof(AudioBufferList) + (_floatAudioDescription.mChannelsPerFrame-1)*sizeof(AudioBuffer));
|
||||
_scratchFloatBufferList->mNumberBuffers = _floatAudioDescription.mChannelsPerFrame;
|
||||
for ( int i=0; i<_scratchFloatBufferList->mNumberBuffers; i++ ) {
|
||||
_scratchFloatBufferList->mBuffers[i].mNumberChannels = 1;
|
||||
}
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
-(void)dealloc {
|
||||
if ( _toFloatConverter ) AudioConverterDispose(_toFloatConverter);
|
||||
if ( _fromFloatConverter ) AudioConverterDispose(_fromFloatConverter);
|
||||
if ( _scratchFloatBufferList ) free(_scratchFloatBufferList);
|
||||
// [super dealloc];
|
||||
}
|
||||
|
||||
|
||||
BOOL AEFloatConverterToFloat(AEFloatConverter* THIS, AudioBufferList *sourceBuffer, float * const * targetBuffers, UInt32 frames) {
|
||||
if ( frames == 0 ) return YES;
|
||||
|
||||
if ( THIS->_toFloatConverter ) {
|
||||
UInt32 priorDataByteSize = sourceBuffer->mBuffers[0].mDataByteSize;
|
||||
for ( int i=0; i<sourceBuffer->mNumberBuffers; i++ ) {
|
||||
sourceBuffer->mBuffers[i].mDataByteSize = frames * THIS->_sourceAudioDescription.mBytesPerFrame;
|
||||
}
|
||||
|
||||
for ( int i=0; i<THIS->_scratchFloatBufferList->mNumberBuffers; i++ ) {
|
||||
THIS->_scratchFloatBufferList->mBuffers[i].mData = targetBuffers[i];
|
||||
THIS->_scratchFloatBufferList->mBuffers[i].mDataByteSize = frames * sizeof(float);
|
||||
}
|
||||
|
||||
OSStatus result = AudioConverterFillComplexBuffer(THIS->_toFloatConverter,
|
||||
complexInputDataProc,
|
||||
&(struct complexInputDataProc_t) { .sourceBuffer = sourceBuffer },
|
||||
&frames,
|
||||
THIS->_scratchFloatBufferList,
|
||||
NULL);
|
||||
|
||||
for ( int i=0; i<sourceBuffer->mNumberBuffers; i++ ) {
|
||||
sourceBuffer->mBuffers[i].mDataByteSize = priorDataByteSize;
|
||||
}
|
||||
|
||||
if ( !checkResult(result, "AudioConverterConvertComplexBuffer") ) {
|
||||
return NO;
|
||||
}
|
||||
|
||||
} else {
|
||||
for ( int i=0; i<sourceBuffer->mNumberBuffers; i++ ) {
|
||||
memcpy(targetBuffers[i], sourceBuffer->mBuffers[i].mData, frames * sizeof(float));
|
||||
}
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
BOOL AEFloatConverterToFloatBufferList(AEFloatConverter* converter, AudioBufferList *sourceBuffer, AudioBufferList *targetBuffer, UInt32 frames) {
|
||||
assert(targetBuffer->mNumberBuffers == converter->_floatAudioDescription.mChannelsPerFrame);
|
||||
|
||||
float *targetBuffers[targetBuffer->mNumberBuffers];
|
||||
for ( int i=0; i<targetBuffer->mNumberBuffers; i++ ) {
|
||||
targetBuffers[i] = (float*)targetBuffer->mBuffers[i].mData;
|
||||
}
|
||||
return AEFloatConverterToFloat(converter, sourceBuffer, targetBuffers, frames);
|
||||
}
|
||||
|
||||
BOOL AEFloatConverterFromFloat(AEFloatConverter* THIS, float * const * sourceBuffers, AudioBufferList *targetBuffer, UInt32 frames) {
|
||||
if ( frames == 0 ) return YES;
|
||||
|
||||
if ( THIS->_fromFloatConverter ) {
|
||||
for ( int i=0; i<THIS->_scratchFloatBufferList->mNumberBuffers; i++ ) {
|
||||
THIS->_scratchFloatBufferList->mBuffers[i].mData = sourceBuffers[i];
|
||||
THIS->_scratchFloatBufferList->mBuffers[i].mDataByteSize = frames * sizeof(float);
|
||||
}
|
||||
|
||||
UInt32 priorDataByteSize = targetBuffer->mBuffers[0].mDataByteSize;
|
||||
for ( int i=0; i<targetBuffer->mNumberBuffers; i++ ) {
|
||||
targetBuffer->mBuffers[i].mDataByteSize = frames * THIS->_sourceAudioDescription.mBytesPerFrame;
|
||||
}
|
||||
|
||||
OSStatus result = AudioConverterFillComplexBuffer(THIS->_fromFloatConverter,
|
||||
complexInputDataProc,
|
||||
&(struct complexInputDataProc_t) { .sourceBuffer = THIS->_scratchFloatBufferList },
|
||||
&frames,
|
||||
targetBuffer,
|
||||
NULL);
|
||||
|
||||
for ( int i=0; i<targetBuffer->mNumberBuffers; i++ ) {
|
||||
targetBuffer->mBuffers[i].mDataByteSize = priorDataByteSize;
|
||||
}
|
||||
|
||||
if ( !checkResult(result, "AudioConverterConvertComplexBuffer") ) {
|
||||
return NO;
|
||||
}
|
||||
} else {
|
||||
for ( int i=0; i<targetBuffer->mNumberBuffers; i++ ) {
|
||||
memcpy(targetBuffer->mBuffers[i].mData, sourceBuffers[i], frames * sizeof(float));
|
||||
}
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
BOOL AEFloatConverterFromFloatBufferList(AEFloatConverter* converter, AudioBufferList *sourceBuffer, AudioBufferList *targetBuffer, UInt32 frames) {
|
||||
assert(sourceBuffer->mNumberBuffers == converter->_floatAudioDescription.mChannelsPerFrame);
|
||||
|
||||
float *sourceBuffers[sourceBuffer->mNumberBuffers];
|
||||
for ( int i=0; i<sourceBuffer->mNumberBuffers; i++ ) {
|
||||
sourceBuffers[i] = (float*)sourceBuffer->mBuffers[i].mData;
|
||||
}
|
||||
return AEFloatConverterFromFloat(converter, sourceBuffers, targetBuffer, frames);
|
||||
}
|
||||
|
||||
static OSStatus complexInputDataProc(AudioConverterRef inAudioConverter,
|
||||
UInt32 *ioNumberDataPackets,
|
||||
AudioBufferList *ioData,
|
||||
AudioStreamPacketDescription **outDataPacketDescription,
|
||||
void *inUserData) {
|
||||
struct complexInputDataProc_t *arg = (struct complexInputDataProc_t*)inUserData;
|
||||
if ( !arg->sourceBuffer ) {
|
||||
return kNoMoreDataErr;
|
||||
}
|
||||
|
||||
memcpy(ioData, arg->sourceBuffer, sizeof(AudioBufferList) + (arg->sourceBuffer->mNumberBuffers-1)*sizeof(AudioBuffer));
|
||||
arg->sourceBuffer = NULL;
|
||||
|
||||
return noErr;
|
||||
}
|
||||
|
||||
-(AudioStreamBasicDescription)floatingPointAudioDescription {
|
||||
return _floatAudioDescription;
|
||||
}
|
||||
|
||||
@end
|
||||
+101
-24
@@ -26,14 +26,15 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#pragma mark - 3rd Party Utilties
|
||||
#import "AEFloatConverter.h"
|
||||
#import "TPCircularBuffer.h"
|
||||
|
||||
#pragma mark - Core Components
|
||||
#import "EZAudioFile.h"
|
||||
#import "EZAudioFloatData.h"
|
||||
#import "EZMicrophone.h"
|
||||
#import "EZOutput.h"
|
||||
#import "EZRecorder.h"
|
||||
#import "EZAudioUtilities.h"
|
||||
|
||||
#pragma mark - Extended Components
|
||||
#import "EZAudioPlayer.h"
|
||||
@@ -44,13 +45,24 @@
|
||||
#import "EZAudioPlotGL.h"
|
||||
#import "EZAudioPlotGLKViewController.h"
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
EZAudio is a simple, intuitive framework for iOS and OSX. The goal of EZAudio was to provide a modular, cross-platform framework to simplify performing everyday audio operations like getting microphone input, creating audio waveforms, recording/playing audio files, etc. The visualization tools like the EZAudioPlot and EZAudioPlotGL were created to plug right into the framework's various components and provide highly optimized drawing routines that work in harmony with audio callback loops. All components retain the same namespace whether you're on an iOS device or a Mac computer so an EZAudioPlot understands it will subclass an UIView on an iOS device or an NSView on a Mac.
|
||||
|
||||
Class methods for EZAudio are provided as utility methods used throughout the other modules within the framework. For instance, these methods help make sense of error codes (checkResult:operation:), map values betwen coordinate systems (MAP:leftMin:leftMax:rightMin:rightMax:), calculate root mean squared values for buffers (RMS:length:), etc.
|
||||
|
||||
@warning As of 1.0 these methods have been moved over to `EZAudioUtilities` to allow using modules without requiring the whole library.
|
||||
*/
|
||||
@interface EZAudio : NSObject
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Debugging
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// TODO: document
|
||||
+ (void)setShouldExitOnCheckResultFail:(BOOL)shouldExitOnCheckResultFail __deprecated_msg("Utility methods such as this have moved to the `EZAudioUtilities` class. This method is supported for now, but will be removed in a future version of EZAudio");
|
||||
|
||||
#pragma mark - AudioBufferList Utility
|
||||
///-----------------------------------------------------------
|
||||
/// @name AudioBufferList Utility
|
||||
@@ -65,13 +77,25 @@
|
||||
*/
|
||||
+(AudioBufferList *)audioBufferListWithNumberOfFrames:(UInt32)frames
|
||||
numberOfChannels:(UInt32)channels
|
||||
interleaved:(BOOL)interleaved;
|
||||
interleaved:(BOOL)interleaved __deprecated_msg("Utility methods such as this have moved to the `EZAudioUtilities` class. This method is supported for now, but will be removed in a future version of EZAudio");
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
+(float **)floatBuffersWithNumberOfFrames:(UInt32)frames
|
||||
numberOfChannels:(UInt32)channels __deprecated_msg("Utility methods such as this have moved to the `EZAudioUtilities` class. This method is supported for now, but will be removed in a future version of EZAudio");
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Deallocates an AudioBufferList structure from memory.
|
||||
@param bufferList A pointer to the buffer list you would like to free
|
||||
*/
|
||||
+(void)freeBufferList:(AudioBufferList*)bufferList;
|
||||
+(void)freeBufferList:(AudioBufferList*)bufferList __deprecated_msg("Utility methods such as this have moved to the `EZAudioUtilities` class. This method is supported for now, but will be removed in a future version of EZAudio");
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
+(void)freeFloatBuffers:(float **)buffers
|
||||
numberOfChannels:(UInt32)channels __deprecated_msg("Utility methods such as this have moved to the `EZAudioUtilities` class. This method is supported for now, but will be removed in a future version of EZAudio");
|
||||
|
||||
#pragma mark - AudioStreamBasicDescription Utilties
|
||||
///-----------------------------------------------------------
|
||||
@@ -85,14 +109,41 @@
|
||||
@return A new AudioStreamBasicDescription with the specified format.
|
||||
*/
|
||||
+(AudioStreamBasicDescription)AIFFFormatWithNumberOfChannels:(UInt32)channels
|
||||
sampleRate:(float)sampleRate;
|
||||
sampleRate:(float)sampleRate __deprecated_msg("Utility methods such as this have moved to the `EZAudioUtilities` class. This method is supported for now, but will be removed in a future version of EZAudio");
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
|
||||
@param sampleRate The desired sample rate
|
||||
@return A new AudioStreamBasicDescription with the specified format.
|
||||
*/
|
||||
+(AudioStreamBasicDescription)iLBCFormatWithSampleRate:(float)sampleRate;
|
||||
+(AudioStreamBasicDescription)iLBCFormatWithSampleRate:(float)sampleRate __deprecated_msg("Utility methods such as this have moved to the `EZAudioUtilities` class. This method is supported for now, but will be removed in a future version of EZAudio");
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
+ (BOOL) isFloatFormat:(AudioStreamBasicDescription)asbd __deprecated_msg("Utility methods such as this have moved to the `EZAudioUtilities` class. This method is supported for now, but will be removed in a future version of EZAudio");
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Checks an AudioStreamBasicDescription to check for an interleaved flag (samples are
|
||||
stored in one buffer one after another instead of two (or n channels) parallel buffers
|
||||
@param asbd A valid AudioStreamBasicDescription
|
||||
@return A BOOL indicating whether or not the AudioStreamBasicDescription is interleaved
|
||||
*/
|
||||
+ (BOOL) isInterleaved:(AudioStreamBasicDescription)asbd __deprecated_msg("Utility methods such as this have moved to the `EZAudioUtilities` class. This method is supported for now, but will be removed in a future version of EZAudio");
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
+ (BOOL) isLinearPCM:(AudioStreamBasicDescription)asbd __deprecated_msg("Utility methods such as this have moved to the `EZAudioUtilities` class. This method is supported for now, but will be removed in a future version of EZAudio");
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
+(AudioStreamBasicDescription)floatFormatWithNumberOfChannels:(UInt32)channels
|
||||
sampleRate:(float)sampleRate __deprecated_msg("Utility methods such as this have moved to the `EZAudioUtilities` class. This method is supported for now, but will be removed in a future version of EZAudio");
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
|
||||
@@ -101,42 +152,52 @@
|
||||
@return A new AudioStreamBasicDescription with the specified format.
|
||||
*/
|
||||
+(AudioStreamBasicDescription)M4AFormatWithNumberOfChannels:(UInt32)channels
|
||||
sampleRate:(float)sampleRate;
|
||||
sampleRate:(float)sampleRate __deprecated_msg("Utility methods such as this have moved to the `EZAudioUtilities` class. This method is supported for now, but will be removed in a future version of EZAudio");
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
|
||||
@param sampleRate The desired sample rate
|
||||
@return A new AudioStreamBasicDescription with the specified format.
|
||||
*/
|
||||
+(AudioStreamBasicDescription)monoFloatFormatWithSampleRate:(float)sampleRate;
|
||||
+(AudioStreamBasicDescription)monoFloatFormatWithSampleRate:(float)sampleRate __deprecated_msg("Utility methods such as this have moved to the `EZAudioUtilities` class. This method is supported for now, but will be removed in a future version of EZAudio");
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
|
||||
@param sampleRate The desired sample rate
|
||||
@return A new AudioStreamBasicDescription with the specified format.
|
||||
*/
|
||||
+(AudioStreamBasicDescription)monoCanonicalFormatWithSampleRate:(float)sampleRate;
|
||||
+(AudioStreamBasicDescription)monoCanonicalFormatWithSampleRate:(float)sampleRate __deprecated_msg("Utility methods such as this have moved to the `EZAudioUtilities` class. This method is supported for now, but will be removed in a future version of EZAudio");
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
|
||||
@param sampleRate The desired sample rate
|
||||
@return A new AudioStreamBasicDescription with the specified format.
|
||||
*/
|
||||
+(AudioStreamBasicDescription)stereoCanonicalNonInterleavedFormatWithSampleRate:(float)sampleRate;
|
||||
+(AudioStreamBasicDescription)stereoCanonicalNonInterleavedFormatWithSampleRate:(float)sampleRate __deprecated_msg("Utility methods such as this have moved to the `EZAudioUtilities` class. This method is supported for now, but will be removed in a future version of EZAudio");
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
|
||||
@param sampleRate The desired sample rate
|
||||
@return A new AudioStreamBasicDescription with the specified format.
|
||||
*/
|
||||
+(AudioStreamBasicDescription)stereoFloatInterleavedFormatWithSampleRate:(float)sampleRate;
|
||||
+(AudioStreamBasicDescription)stereoFloatInterleavedFormatWithSampleRate:(float)sampleRate __deprecated_msg("Utility methods such as this have moved to the `EZAudioUtilities` class. This method is supported for now, but will be removed in a future version of EZAudio");
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
|
||||
@param sampleRate The desired sample rate
|
||||
@return A new AudioStreamBasicDescription with the specified format.
|
||||
*/
|
||||
+(AudioStreamBasicDescription)stereoFloatNonInterleavedFormatWithSampleRate:(float)sameRate;
|
||||
+(AudioStreamBasicDescription)stereoFloatNonInterleavedFormatWithSampleRate:(float)sameRate __deprecated_msg("Utility methods such as this have moved to the `EZAudioUtilities` class. This method is supported for now, but will be removed in a future version of EZAudio");
|
||||
|
||||
///-----------------------------------------------------------
|
||||
/// @name AudioStreamBasicDescription Utilities
|
||||
@@ -146,7 +207,9 @@
|
||||
Nicely logs out the contents of an AudioStreamBasicDescription struct
|
||||
@param asbd The AudioStreamBasicDescription struct with content to print out
|
||||
*/
|
||||
+(void)printASBD:(AudioStreamBasicDescription)asbd;
|
||||
+(void)printASBD:(AudioStreamBasicDescription)asbd __deprecated_msg("Utility methods such as this have moved to the `EZAudioUtilities` class. This method is supported for now, but will be removed in a future version of EZAudio");
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Just a wrapper around the setCanonical function provided in the Core Audio Utility C++ class.
|
||||
@@ -156,7 +219,7 @@
|
||||
*/
|
||||
+(void)setCanonicalAudioStreamBasicDescription:(AudioStreamBasicDescription*)asbd
|
||||
numberOfChannels:(UInt32)nChannels
|
||||
interleaved:(BOOL)interleaved;
|
||||
interleaved:(BOOL)interleaved __deprecated_msg("Utility methods such as this have moved to the `EZAudioUtilities` class. This method is supported for now, but will be removed in a future version of EZAudio");
|
||||
|
||||
#pragma mark - Math Utilities
|
||||
///-----------------------------------------------------------
|
||||
@@ -173,7 +236,9 @@
|
||||
+(void)appendBufferAndShift:(float*)buffer
|
||||
withBufferSize:(int)bufferLength
|
||||
toScrollHistory:(float*)scrollHistory
|
||||
withScrollHistorySize:(int)scrollHistoryLength;
|
||||
withScrollHistorySize:(int)scrollHistoryLength __deprecated_msg("Utility methods such as this have moved to the `EZAudioUtilities` class. This method is supported for now, but will be removed in a future version of EZAudio");
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Appends a value to a history buffer and performs an internal shift to add the value to the tail and remove the 0th value.
|
||||
@@ -183,7 +248,9 @@
|
||||
*/
|
||||
+(void) appendValue:(float)value
|
||||
toScrollHistory:(float*)scrollHistory
|
||||
withScrollHistorySize:(int)scrollHistoryLength;
|
||||
withScrollHistorySize:(int)scrollHistoryLength __deprecated_msg("Utility methods such as this have moved to the `EZAudioUtilities` class. This method is supported for now, but will be removed in a future version of EZAudio");
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Maps a value from one coordinate system into another one. Takes in the current value to map, the minimum and maximum values of the first coordinate system, and the minimum and maximum values of the second coordinate system and calculates the mapped value in the second coordinate system's constraints.
|
||||
@@ -198,7 +265,9 @@
|
||||
leftMin:(float)leftMin
|
||||
leftMax:(float)leftMax
|
||||
rightMin:(float)rightMin
|
||||
rightMax:(float)rightMax;
|
||||
rightMax:(float)rightMax __deprecated_msg("Utility methods such as this have moved to the `EZAudioUtilities` class. This method is supported for now, but will be removed in a future version of EZAudio");
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Calculates the root mean squared for a buffer.
|
||||
@@ -207,7 +276,9 @@
|
||||
@return The root mean squared of the buffer
|
||||
*/
|
||||
+(float)RMS:(float*)buffer
|
||||
length:(int)bufferSize;
|
||||
length:(int)bufferSize __deprecated_msg("Utility methods such as this have moved to the `EZAudioUtilities` class. This method is supported for now, but will be removed in a future version of EZAudio");
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Calculate the sign function sgn(x) =
|
||||
@@ -217,7 +288,7 @@
|
||||
@param value The float value for which to use as x
|
||||
@return The float sign value
|
||||
*/
|
||||
+(float)SGN:(float)value;
|
||||
+(float)SGN:(float)value __deprecated_msg("Utility methods such as this have moved to the `EZAudioUtilities` class. This method is supported for now, but will be removed in a future version of EZAudio");
|
||||
|
||||
#pragma mark - OSStatus Utility
|
||||
///-----------------------------------------------------------
|
||||
@@ -230,7 +301,7 @@
|
||||
@param operation A string (const char, not NSString) describing the operation taking place (will print if fails)
|
||||
*/
|
||||
+(void)checkResult:(OSStatus)result
|
||||
operation:(const char*)operation;
|
||||
operation:(const char*)operation __deprecated_msg("Utility methods such as this have moved to the `EZAudioUtilities` class. This method is supported for now, but will be removed in a future version of EZAudio");
|
||||
|
||||
#pragma mark - Plot Utility
|
||||
///-----------------------------------------------------------
|
||||
@@ -242,7 +313,7 @@
|
||||
atIndex:(int*)index
|
||||
withBuffer:(float*)buffer
|
||||
withBufferSize:(int)bufferSize
|
||||
isResolutionChanging:(BOOL*)isChanging;
|
||||
isResolutionChanging:(BOOL*)isChanging __deprecated_msg("Utility methods such as this have moved to the `EZAudioUtilities` class. This method is supported for now, but will be removed in a future version of EZAudio");
|
||||
|
||||
#pragma mark - TPCircularBuffer Utility
|
||||
///-----------------------------------------------------------
|
||||
@@ -255,7 +326,9 @@
|
||||
@param audioBufferList Pointer to the instance of the AudioBufferList with the audio data
|
||||
*/
|
||||
+(void)appendDataToCircularBuffer:(TPCircularBuffer*)circularBuffer
|
||||
fromAudioBufferList:(AudioBufferList*)audioBufferList;
|
||||
fromAudioBufferList:(AudioBufferList*)audioBufferList __deprecated_msg("Utility methods such as this have moved to the `EZAudioUtilities` class. This method is supported for now, but will be removed in a future version of EZAudio");
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Initializes the circular buffer (just a wrapper around the C method)
|
||||
@@ -263,12 +336,16 @@
|
||||
* @param size The length of the TPCircularBuffer (usually 1024)
|
||||
*/
|
||||
+(void)circularBuffer:(TPCircularBuffer*)circularBuffer
|
||||
withSize:(int)size;
|
||||
withSize:(int)size __deprecated_msg("Utility methods such as this have moved to the `EZAudioUtilities` class. This method is supported for now, but will be removed in a future version of EZAudio");
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Frees a circular buffer
|
||||
@param circularBuffer Pointer to the circular buffer to clear
|
||||
*/
|
||||
+(void)freeCircularBuffer:(TPCircularBuffer*)circularBuffer;
|
||||
+(void)freeCircularBuffer:(TPCircularBuffer*)circularBuffer __deprecated_msg("Utility methods such as this have moved to the `EZAudioUtilities` class. This method is supported for now, but will be removed in a future version of EZAudio");
|
||||
|
||||
@end
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@end
|
||||
+122
-269
@@ -1,359 +1,212 @@
|
||||
//
|
||||
// EZAudio.m
|
||||
// EZAudio
|
||||
// EZAudioCoreGraphicsWaveformExample
|
||||
//
|
||||
// Created by Syed Haris Ali on 11/21/13.
|
||||
// Copyright (c) 2013 Syed Haris Ali. All rights reserved.
|
||||
// Created by Syed Haris Ali on 5/13/15.
|
||||
// Copyright (c) 2015 Syed Haris Ali. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#import "EZAudio.h"
|
||||
|
||||
@implementation EZAudio
|
||||
|
||||
#pragma mark - AudioBufferList Utility
|
||||
+ (void)setShouldExitOnCheckResultFail:(BOOL)shouldExitOnCheckResultFail
|
||||
{
|
||||
[EZAudioUtilities setShouldExitOnCheckResultFail:shouldExitOnCheckResultFail];
|
||||
}
|
||||
|
||||
+(AudioBufferList *)audioBufferListWithNumberOfFrames:(UInt32)frames
|
||||
numberOfChannels:(UInt32)channels
|
||||
interleaved:(BOOL)interleaved
|
||||
{
|
||||
AudioBufferList *audioBufferList = (AudioBufferList*)malloc(sizeof(AudioBufferList));
|
||||
UInt32 outputBufferSize = 32 * frames; // 32 KB
|
||||
audioBufferList->mNumberBuffers = interleaved ? 1 : channels;
|
||||
for( int i = 0; i < audioBufferList->mNumberBuffers; i++ )
|
||||
{
|
||||
audioBufferList->mBuffers[i].mNumberChannels = channels;
|
||||
audioBufferList->mBuffers[i].mDataByteSize = channels * outputBufferSize;
|
||||
audioBufferList->mBuffers[i].mData = (float*)malloc(channels * sizeof(float) *outputBufferSize);
|
||||
}
|
||||
return audioBufferList;
|
||||
return [EZAudioUtilities audioBufferListWithNumberOfFrames:frames
|
||||
numberOfChannels:channels
|
||||
interleaved:interleaved];
|
||||
}
|
||||
|
||||
+(void)freeBufferList:(AudioBufferList *)bufferList
|
||||
+(float **)floatBuffersWithNumberOfFrames:(UInt32)frames
|
||||
numberOfChannels:(UInt32)channels
|
||||
{
|
||||
if( bufferList )
|
||||
{
|
||||
if( bufferList->mNumberBuffers )
|
||||
{
|
||||
for( int i = 0; i < bufferList->mNumberBuffers; i++ )
|
||||
{
|
||||
if( bufferList->mBuffers[i].mData )
|
||||
{
|
||||
free(bufferList->mBuffers[i].mData);
|
||||
}
|
||||
}
|
||||
}
|
||||
free(bufferList);
|
||||
}
|
||||
bufferList = NULL;
|
||||
return [EZAudioUtilities floatBuffersWithNumberOfFrames:frames
|
||||
numberOfChannels:channels];
|
||||
}
|
||||
|
||||
+(void)freeBufferList:(AudioBufferList*)bufferList
|
||||
{
|
||||
[EZAudioUtilities freeBufferList:bufferList];
|
||||
}
|
||||
|
||||
+(void)freeFloatBuffers:(float **)buffers
|
||||
numberOfChannels:(UInt32)channels
|
||||
{
|
||||
[EZAudioUtilities freeFloatBuffers:buffers
|
||||
numberOfChannels:channels];
|
||||
}
|
||||
|
||||
#pragma mark - AudioStreamBasicDescription Utility
|
||||
+(AudioStreamBasicDescription)AIFFFormatWithNumberOfChannels:(UInt32)channels
|
||||
sampleRate:(float)sampleRate
|
||||
{
|
||||
AudioStreamBasicDescription asbd;
|
||||
memset(&asbd, 0, sizeof(asbd));
|
||||
asbd.mFormatID = kAudioFormatLinearPCM;
|
||||
asbd.mFormatFlags = kAudioFormatFlagIsBigEndian|kAudioFormatFlagIsPacked|kAudioFormatFlagIsSignedInteger;
|
||||
asbd.mSampleRate = sampleRate;
|
||||
asbd.mChannelsPerFrame = channels;
|
||||
asbd.mBitsPerChannel = 32;
|
||||
asbd.mBytesPerPacket = (asbd.mBitsPerChannel / 8) * asbd.mChannelsPerFrame;
|
||||
asbd.mFramesPerPacket = 1;
|
||||
asbd.mBytesPerFrame = (asbd.mBitsPerChannel / 8) * asbd.mChannelsPerFrame;
|
||||
return asbd;
|
||||
return [EZAudioUtilities AIFFFormatWithNumberOfChannels:channels
|
||||
sampleRate:sampleRate];
|
||||
}
|
||||
|
||||
+(AudioStreamBasicDescription)iLBCFormatWithSampleRate:(float)sampleRate
|
||||
{
|
||||
AudioStreamBasicDescription asbd;
|
||||
memset(&asbd, 0, sizeof(asbd));
|
||||
asbd.mFormatID = kAudioFormatiLBC;
|
||||
asbd.mChannelsPerFrame = 1;
|
||||
asbd.mSampleRate = sampleRate;
|
||||
|
||||
// Fill in the rest of the descriptions using the Audio Format API
|
||||
UInt32 propSize = sizeof(asbd);
|
||||
[EZAudio checkResult:AudioFormatGetProperty(kAudioFormatProperty_FormatInfo,
|
||||
0,
|
||||
NULL,
|
||||
&propSize,
|
||||
&asbd)
|
||||
operation:"Failed to fill out the rest of the m4a AudioStreamBasicDescription"];
|
||||
|
||||
return asbd;
|
||||
return [EZAudioUtilities iLBCFormatWithSampleRate:sampleRate];
|
||||
}
|
||||
|
||||
+ (BOOL) isFloatFormat:(AudioStreamBasicDescription)asbd
|
||||
{
|
||||
return [EZAudioUtilities isFloatFormat:asbd];
|
||||
}
|
||||
|
||||
+ (BOOL) isInterleaved:(AudioStreamBasicDescription)asbd
|
||||
{
|
||||
return [EZAudioUtilities isInterleaved:asbd];
|
||||
}
|
||||
|
||||
+ (BOOL) isLinearPCM:(AudioStreamBasicDescription)asbd
|
||||
{
|
||||
return [EZAudioUtilities isLinearPCM:asbd];
|
||||
}
|
||||
|
||||
+(AudioStreamBasicDescription)floatFormatWithNumberOfChannels:(UInt32)channels
|
||||
sampleRate:(float)sampleRate
|
||||
{
|
||||
return [EZAudioUtilities floatFormatWithNumberOfChannels:channels
|
||||
sampleRate:sampleRate];
|
||||
}
|
||||
|
||||
+(AudioStreamBasicDescription)M4AFormatWithNumberOfChannels:(UInt32)channels
|
||||
sampleRate:(float)sampleRate
|
||||
{
|
||||
AudioStreamBasicDescription asbd;
|
||||
memset(&asbd, 0, sizeof(asbd));
|
||||
asbd.mFormatID = kAudioFormatMPEG4AAC;
|
||||
asbd.mChannelsPerFrame = channels;
|
||||
asbd.mSampleRate = sampleRate;
|
||||
|
||||
// Fill in the rest of the descriptions using the Audio Format API
|
||||
UInt32 propSize = sizeof(asbd);
|
||||
[EZAudio checkResult:AudioFormatGetProperty(kAudioFormatProperty_FormatInfo,
|
||||
0,
|
||||
NULL,
|
||||
&propSize,
|
||||
&asbd)
|
||||
operation:"Failed to fill out the rest of the m4a AudioStreamBasicDescription"];
|
||||
|
||||
return asbd;
|
||||
return [EZAudioUtilities M4AFormatWithNumberOfChannels:channels
|
||||
sampleRate:sampleRate];
|
||||
}
|
||||
|
||||
+(AudioStreamBasicDescription)monoFloatFormatWithSampleRate:(float)sampleRate
|
||||
{
|
||||
AudioStreamBasicDescription asbd;
|
||||
UInt32 byteSize = sizeof(float);
|
||||
asbd.mBitsPerChannel = 8 * byteSize;
|
||||
asbd.mBytesPerFrame = byteSize;
|
||||
asbd.mBytesPerPacket = byteSize;
|
||||
asbd.mChannelsPerFrame = 1;
|
||||
asbd.mFormatFlags = kAudioFormatFlagIsPacked|kAudioFormatFlagIsFloat;
|
||||
asbd.mFormatID = kAudioFormatLinearPCM;
|
||||
asbd.mFramesPerPacket = 1;
|
||||
asbd.mSampleRate = sampleRate;
|
||||
return asbd;
|
||||
return [EZAudioUtilities monoFloatFormatWithSampleRate:sampleRate];
|
||||
}
|
||||
|
||||
+(AudioStreamBasicDescription)monoCanonicalFormatWithSampleRate:(float)sampleRate
|
||||
{
|
||||
AudioStreamBasicDescription asbd;
|
||||
UInt32 byteSize = sizeof(float);
|
||||
asbd.mBitsPerChannel = 8 * byteSize;
|
||||
asbd.mBytesPerFrame = byteSize;
|
||||
asbd.mBytesPerPacket = byteSize;
|
||||
asbd.mChannelsPerFrame = 1;
|
||||
asbd.mFormatFlags = kAudioFormatFlagsNativeFloatPacked|kAudioFormatFlagIsNonInterleaved;
|
||||
asbd.mFormatID = kAudioFormatLinearPCM;
|
||||
asbd.mFramesPerPacket = 1;
|
||||
asbd.mSampleRate = sampleRate;
|
||||
return asbd;
|
||||
return [EZAudioUtilities monoCanonicalFormatWithSampleRate:sampleRate];
|
||||
}
|
||||
|
||||
+(AudioStreamBasicDescription)stereoCanonicalNonInterleavedFormatWithSampleRate:(float)sampleRate
|
||||
{
|
||||
AudioStreamBasicDescription asbd;
|
||||
UInt32 byteSize = sizeof(float);
|
||||
asbd.mBitsPerChannel = 8 * byteSize;
|
||||
asbd.mBytesPerFrame = byteSize;
|
||||
asbd.mBytesPerPacket = byteSize;
|
||||
asbd.mChannelsPerFrame = 2;
|
||||
asbd.mFormatFlags = kAudioFormatFlagsNativeFloatPacked|kAudioFormatFlagIsNonInterleaved;
|
||||
asbd.mFormatID = kAudioFormatLinearPCM;
|
||||
asbd.mFramesPerPacket = 1;
|
||||
asbd.mSampleRate = sampleRate;
|
||||
return asbd;
|
||||
return [EZAudioUtilities stereoCanonicalNonInterleavedFormatWithSampleRate:sampleRate];
|
||||
}
|
||||
|
||||
+(AudioStreamBasicDescription)stereoFloatInterleavedFormatWithSampleRate:(float)sampleRate
|
||||
{
|
||||
AudioStreamBasicDescription asbd;
|
||||
UInt32 floatByteSize = sizeof(float);
|
||||
asbd.mChannelsPerFrame = 2;
|
||||
asbd.mBitsPerChannel = 8 * floatByteSize;
|
||||
asbd.mBytesPerFrame = asbd.mChannelsPerFrame * floatByteSize;
|
||||
asbd.mBytesPerPacket = asbd.mChannelsPerFrame * floatByteSize;
|
||||
asbd.mFormatFlags = kAudioFormatFlagIsPacked|kAudioFormatFlagIsFloat;
|
||||
asbd.mFormatID = kAudioFormatLinearPCM;
|
||||
asbd.mFramesPerPacket = 1;
|
||||
asbd.mSampleRate = sampleRate;
|
||||
return asbd;
|
||||
return [EZAudioUtilities stereoFloatInterleavedFormatWithSampleRate:sampleRate];
|
||||
}
|
||||
|
||||
+(AudioStreamBasicDescription)stereoFloatNonInterleavedFormatWithSampleRate:(float)sampleRate
|
||||
{
|
||||
AudioStreamBasicDescription asbd;
|
||||
UInt32 floatByteSize = sizeof(float);
|
||||
asbd.mBitsPerChannel = 8 * floatByteSize;
|
||||
asbd.mBytesPerFrame = floatByteSize;
|
||||
asbd.mBytesPerPacket = floatByteSize;
|
||||
asbd.mChannelsPerFrame = 2;
|
||||
asbd.mFormatFlags = kAudioFormatFlagIsFloat|kAudioFormatFlagIsNonInterleaved;
|
||||
asbd.mFormatID = kAudioFormatLinearPCM;
|
||||
asbd.mFramesPerPacket = 1;
|
||||
asbd.mSampleRate = sampleRate;
|
||||
return asbd;
|
||||
return [EZAudioUtilities stereoFloatNonInterleavedFormatWithSampleRate:sampleRate];
|
||||
}
|
||||
|
||||
+(void)printASBD:(AudioStreamBasicDescription)asbd {
|
||||
char formatIDString[5];
|
||||
UInt32 formatID = CFSwapInt32HostToBig(asbd.mFormatID);
|
||||
bcopy (&formatID, formatIDString, 4);
|
||||
formatIDString[4] = '\0';
|
||||
NSLog (@" Sample Rate: %10.0f", asbd.mSampleRate);
|
||||
NSLog (@" Format ID: %10s", formatIDString);
|
||||
NSLog (@" Format Flags: %10X", (unsigned int)asbd.mFormatFlags);
|
||||
NSLog (@" Bytes per Packet: %10d", (unsigned int)asbd.mBytesPerPacket);
|
||||
NSLog (@" Frames per Packet: %10d", (unsigned int)asbd.mFramesPerPacket);
|
||||
NSLog (@" Bytes per Frame: %10d", (unsigned int)asbd.mBytesPerFrame);
|
||||
NSLog (@" Channels per Frame: %10d", (unsigned int)asbd.mChannelsPerFrame);
|
||||
NSLog (@" Bits per Channel: %10d", (unsigned int)asbd.mBitsPerChannel);
|
||||
+(void)printASBD:(AudioStreamBasicDescription)asbd
|
||||
{
|
||||
[EZAudioUtilities printASBD:asbd];
|
||||
}
|
||||
|
||||
+(void)setCanonicalAudioStreamBasicDescription:(AudioStreamBasicDescription*)asbd
|
||||
numberOfChannels:(UInt32)nChannels
|
||||
interleaved:(BOOL)interleaved {
|
||||
|
||||
asbd->mFormatID = kAudioFormatLinearPCM;
|
||||
#if TARGET_OS_IPHONE
|
||||
int sampleSize = sizeof(float);
|
||||
asbd->mFormatFlags = kAudioFormatFlagsNativeFloatPacked;
|
||||
#elif TARGET_OS_MAC
|
||||
int sampleSize = sizeof(Float32);
|
||||
asbd->mFormatFlags = kAudioFormatFlagsNativeFloatPacked;
|
||||
#endif
|
||||
asbd->mBitsPerChannel = 8 * sampleSize;
|
||||
asbd->mChannelsPerFrame = nChannels;
|
||||
asbd->mFramesPerPacket = 1;
|
||||
if (interleaved)
|
||||
asbd->mBytesPerPacket = asbd->mBytesPerFrame = nChannels * sampleSize;
|
||||
else {
|
||||
asbd->mBytesPerPacket = asbd->mBytesPerFrame = sampleSize;
|
||||
asbd->mFormatFlags |= kAudioFormatFlagIsNonInterleaved;
|
||||
}
|
||||
interleaved:(BOOL)interleaved
|
||||
{
|
||||
[EZAudioUtilities setCanonicalAudioStreamBasicDescription:asbd
|
||||
numberOfChannels:nChannels
|
||||
interleaved:interleaved];
|
||||
}
|
||||
|
||||
#pragma mark - OSStatus Utility
|
||||
+(void)checkResult:(OSStatus)result
|
||||
operation:(const char *)operation {
|
||||
if (result == noErr) return;
|
||||
char errorString[20];
|
||||
// see if it appears to be a 4-char-code
|
||||
*(UInt32 *)(errorString + 1) = CFSwapInt32HostToBig(result);
|
||||
if (isprint(errorString[1]) && isprint(errorString[2]) && isprint(errorString[3]) && isprint(errorString[4])) {
|
||||
errorString[0] = errorString[5] = '\'';
|
||||
errorString[6] = '\0';
|
||||
} else
|
||||
// no, format it as an integer
|
||||
sprintf(errorString, "%d", (int)result);
|
||||
fprintf(stderr, "Error: %s (%s)\n", operation, errorString);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
#pragma mark - Math Utility
|
||||
+(void)appendBufferAndShift:(float*)buffer
|
||||
withBufferSize:(int)bufferLength
|
||||
toScrollHistory:(float*)scrollHistory
|
||||
withScrollHistorySize:(int)scrollHistoryLength {
|
||||
NSAssert(scrollHistoryLength>=bufferLength,@"Scroll history array length must be greater buffer length");
|
||||
NSAssert(scrollHistoryLength>0,@"Scroll history array length must be greater than 0");
|
||||
NSAssert(bufferLength>0,@"Buffer array length must be greater than 0");
|
||||
int shiftLength = scrollHistoryLength - bufferLength;
|
||||
size_t floatByteSize = sizeof(float);
|
||||
size_t shiftByteSize = shiftLength * floatByteSize;
|
||||
size_t bufferByteSize = bufferLength * floatByteSize;
|
||||
memmove(&scrollHistory[0],
|
||||
&scrollHistory[bufferLength],
|
||||
shiftByteSize);
|
||||
memmove(&scrollHistory[shiftLength],
|
||||
&buffer[0],
|
||||
bufferByteSize);
|
||||
withScrollHistorySize:(int)scrollHistoryLength
|
||||
{
|
||||
[EZAudioUtilities appendBufferAndShift:buffer
|
||||
withBufferSize:bufferLength
|
||||
toScrollHistory:scrollHistory
|
||||
withScrollHistorySize:scrollHistoryLength];
|
||||
}
|
||||
|
||||
+(void) appendValue:(float)value
|
||||
toScrollHistory:(float*)scrollHistory
|
||||
withScrollHistorySize:(int)scrollHistoryLength {
|
||||
float val[1]; val[0] = value;
|
||||
[self appendBufferAndShift:val
|
||||
withBufferSize:1
|
||||
toScrollHistory:scrollHistory
|
||||
withScrollHistorySize:scrollHistoryLength];
|
||||
withScrollHistorySize:(int)scrollHistoryLength
|
||||
{
|
||||
[EZAudioUtilities appendValue:value
|
||||
toScrollHistory:scrollHistory
|
||||
withScrollHistorySize:scrollHistoryLength];
|
||||
}
|
||||
|
||||
+(float)MAP:(float)value
|
||||
leftMin:(float)leftMin
|
||||
leftMax:(float)leftMax
|
||||
rightMin:(float)rightMin
|
||||
rightMax:(float)rightMax {
|
||||
float leftSpan = leftMax - leftMin;
|
||||
float rightSpan = rightMax - rightMin;
|
||||
float valueScaled = ( value - leftMin ) / leftSpan;
|
||||
return rightMin + (valueScaled * rightSpan);
|
||||
rightMax:(float)rightMax
|
||||
{
|
||||
return [EZAudioUtilities MAP:value
|
||||
leftMin:leftMin
|
||||
leftMax:leftMax
|
||||
rightMin:rightMin
|
||||
rightMax:rightMax];
|
||||
}
|
||||
|
||||
+(float)RMS:(float *)buffer
|
||||
length:(int)bufferSize {
|
||||
float sum = 0.0;
|
||||
for(int i = 0; i < bufferSize; i++)
|
||||
sum += buffer[i] * buffer[i];
|
||||
return sqrtf( sum / bufferSize );
|
||||
+(float)RMS:(float*)buffer
|
||||
length:(int)bufferSize
|
||||
{
|
||||
return [EZAudioUtilities RMS:buffer
|
||||
length:bufferSize];
|
||||
}
|
||||
|
||||
+(float)SGN:(float)value
|
||||
{
|
||||
return value < 0 ? -1.0f : ( value > 0 ? 1.0f : 0.0f );
|
||||
return [EZAudioUtilities SGN:value];
|
||||
}
|
||||
|
||||
#pragma mark - Plot Utility
|
||||
+(void)updateScrollHistory:(float **)scrollHistory
|
||||
+(void)checkResult:(OSStatus)result
|
||||
operation:(const char*)operation
|
||||
{
|
||||
[EZAudioUtilities checkResult:result
|
||||
operation:operation];
|
||||
}
|
||||
|
||||
+(void)updateScrollHistory:(float**)scrollHistory
|
||||
withLength:(int)scrollHistoryLength
|
||||
atIndex:(int*)index
|
||||
withBuffer:(float *)buffer
|
||||
withBuffer:(float*)buffer
|
||||
withBufferSize:(int)bufferSize
|
||||
isResolutionChanging:(BOOL*)isChanging {
|
||||
|
||||
//
|
||||
size_t floatByteSize = sizeof(float);
|
||||
|
||||
//
|
||||
if( *scrollHistory == NULL ){
|
||||
// Create the history buffer
|
||||
*scrollHistory = (float*)calloc(kEZAudioPlotMaxHistoryBufferLength,floatByteSize);
|
||||
}
|
||||
|
||||
//
|
||||
if( !*isChanging ){
|
||||
float rms = [EZAudio RMS:buffer length:bufferSize];
|
||||
if( *index < scrollHistoryLength ){
|
||||
float *hist = *scrollHistory;
|
||||
hist[*index] = rms;
|
||||
(*index)++;
|
||||
}
|
||||
else {
|
||||
[EZAudio appendValue:rms
|
||||
toScrollHistory:*scrollHistory
|
||||
withScrollHistorySize:scrollHistoryLength];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - TPCircularBuffer Utility
|
||||
+(void)circularBuffer:(TPCircularBuffer *)circularBuffer withSize:(int)size {
|
||||
TPCircularBufferInit(circularBuffer,size);
|
||||
isResolutionChanging:(BOOL*)isChanging
|
||||
{
|
||||
[EZAudioUtilities updateScrollHistory:scrollHistory
|
||||
withLength:scrollHistoryLength
|
||||
atIndex:index
|
||||
withBuffer:buffer
|
||||
withBufferSize:bufferSize
|
||||
isResolutionChanging:isChanging];
|
||||
}
|
||||
|
||||
+(void)appendDataToCircularBuffer:(TPCircularBuffer*)circularBuffer
|
||||
fromAudioBufferList:(AudioBufferList*)audioBufferList {
|
||||
TPCircularBufferProduceBytes(circularBuffer,
|
||||
audioBufferList->mBuffers[0].mData,
|
||||
audioBufferList->mBuffers[0].mDataByteSize);
|
||||
fromAudioBufferList:(AudioBufferList*)audioBufferList
|
||||
{
|
||||
[EZAudioUtilities appendDataToCircularBuffer:circularBuffer
|
||||
fromAudioBufferList:audioBufferList];
|
||||
}
|
||||
|
||||
+(void)freeCircularBuffer:(TPCircularBuffer *)circularBuffer {
|
||||
TPCircularBufferClear(circularBuffer);
|
||||
TPCircularBufferCleanup(circularBuffer);
|
||||
+(void)circularBuffer:(TPCircularBuffer*)circularBuffer
|
||||
withSize:(int)size
|
||||
{
|
||||
[EZAudioUtilities circularBuffer:circularBuffer
|
||||
withSize:size];
|
||||
}
|
||||
|
||||
+(void)freeCircularBuffer:(TPCircularBuffer*)circularBuffer
|
||||
{
|
||||
[EZAudioUtilities freeCircularBuffer:circularBuffer];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,45 @@
|
||||
//
|
||||
// EZAudioDevice.h
|
||||
// MicrophoneTest
|
||||
//
|
||||
// Created by Syed Haris Ali on 4/3/15.
|
||||
// Copyright (c) 2015 Syed Haris Ali. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <AudioToolbox/AudioToolbox.h>
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
#import <AVFoundation/AVFoundation.h>
|
||||
#elif TARGET_OS_MAC
|
||||
#endif
|
||||
|
||||
@interface EZAudioDevice : NSObject
|
||||
|
||||
+ (NSArray *)inputDevices;
|
||||
|
||||
@property (nonatomic, copy, readonly) NSString *name;
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
|
||||
+ (EZAudioDevice *)currentInputDevice;
|
||||
+ (void)enumerateInputDevicesUsingBlock:(void(^)(EZAudioDevice *device,
|
||||
BOOL *stop))block;
|
||||
|
||||
@property (nonatomic, strong, readonly) AVAudioSessionPortDescription *port;
|
||||
@property (nonatomic, strong, readonly) AVAudioSessionDataSourceDescription *dataSource;
|
||||
|
||||
#elif TARGET_OS_MAC
|
||||
+ (NSArray *)devices;
|
||||
+ (NSArray *)outputDevices;
|
||||
+ (void)enumerateDevicesUsingBlock:(void(^)(EZAudioDevice *device,
|
||||
BOOL *stop))block;
|
||||
|
||||
@property (nonatomic, assign, readonly) AudioDeviceID deviceID;
|
||||
@property (nonatomic, copy, readonly) NSString *manufacturer;
|
||||
@property (nonatomic, assign, readonly) NSInteger inputChannelCount;
|
||||
@property (nonatomic, assign, readonly) NSInteger outputChannelCount;
|
||||
@property (nonatomic, copy, readonly) NSString *UID;
|
||||
#endif
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,359 @@
|
||||
//
|
||||
// EZAudioDevice.m
|
||||
// MicrophoneTest
|
||||
//
|
||||
// Created by Syed Haris Ali on 4/3/15.
|
||||
// Copyright (c) 2015 Syed Haris Ali. All rights reserved.
|
||||
//
|
||||
|
||||
#import "EZAudioDevice.h"
|
||||
#import "EZAudioUtilities.h"
|
||||
|
||||
@interface EZAudioDevice ()
|
||||
|
||||
@property (nonatomic, copy, readwrite) NSString *name;
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
|
||||
@property (nonatomic, strong, readwrite) AVAudioSessionPortDescription *port;
|
||||
@property (nonatomic, strong, readwrite) AVAudioSessionDataSourceDescription *dataSource;
|
||||
|
||||
#elif TARGET_OS_MAC
|
||||
|
||||
@property (nonatomic, assign, readwrite) AudioDeviceID deviceID;
|
||||
@property (nonatomic, copy, readwrite) NSString *manufacturer;
|
||||
@property (nonatomic, assign, readwrite) NSInteger inputChannelCount;
|
||||
@property (nonatomic, assign, readwrite) NSInteger outputChannelCount;
|
||||
@property (nonatomic, copy, readwrite) NSString *UID;
|
||||
|
||||
#endif
|
||||
|
||||
@end
|
||||
|
||||
@implementation EZAudioDevice
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
+ (EZAudioDevice *)currentInputDevice
|
||||
{
|
||||
AVAudioSession *session = [AVAudioSession sharedInstance];
|
||||
AVAudioSessionPortDescription *port = [[[session currentRoute] inputs] firstObject];
|
||||
AVAudioSessionDataSourceDescription *dataSource = [session inputDataSource];
|
||||
EZAudioDevice *device = [[EZAudioDevice alloc] init];
|
||||
device.port = port;
|
||||
device.dataSource = dataSource;
|
||||
return device;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
+ (NSArray *)inputDevices
|
||||
{
|
||||
__block NSMutableArray *devices = [NSMutableArray array];
|
||||
[self enumerateInputDevicesUsingBlock:^(EZAudioDevice *device, BOOL *stop)
|
||||
{
|
||||
[devices addObject:device];
|
||||
}];
|
||||
return devices;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
+ (void)enumerateInputDevicesUsingBlock:(void (^)(EZAudioDevice *, BOOL *))block
|
||||
{
|
||||
if (!block)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
NSArray *inputs = [[AVAudioSession sharedInstance] availableInputs];
|
||||
if (inputs == nil)
|
||||
{
|
||||
NSLog(@"Audio session is not active! In order to enumerate the audio devices you must set the category and set active the audio session for your iOS app before calling this function.");
|
||||
return;
|
||||
}
|
||||
|
||||
BOOL stop;
|
||||
for (AVAudioSessionPortDescription *inputDevicePortDescription in inputs)
|
||||
{
|
||||
// add any additional sub-devices
|
||||
NSArray *dataSources = [inputDevicePortDescription dataSources];
|
||||
if (dataSources.count)
|
||||
{
|
||||
for (AVAudioSessionDataSourceDescription *inputDeviceDataSourceDescription in dataSources)
|
||||
{
|
||||
EZAudioDevice *device = [[EZAudioDevice alloc] init];
|
||||
device.port = inputDevicePortDescription;
|
||||
device.dataSource = inputDeviceDataSourceDescription;
|
||||
block(device, &stop);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
EZAudioDevice *device = [[EZAudioDevice alloc] init];
|
||||
device.port = inputDevicePortDescription;
|
||||
block(device, &stop);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (NSString *)name
|
||||
{
|
||||
NSMutableString *name = [NSMutableString string];
|
||||
if (self.port)
|
||||
{
|
||||
[name appendString:self.port.portName];
|
||||
}
|
||||
if (self.dataSource)
|
||||
{
|
||||
[name appendFormat:@": %@", self.dataSource.dataSourceName];
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (NSString *)description
|
||||
{
|
||||
return [NSString stringWithFormat:@"%@ { port: %@, data source: %@ }",
|
||||
[super description],
|
||||
self.port,
|
||||
self.dataSource];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (BOOL)isEqual:(id)object
|
||||
{
|
||||
if ([object isKindOfClass:self.class])
|
||||
{
|
||||
EZAudioDevice *device = (EZAudioDevice *)object;
|
||||
BOOL isPortUIDEqual = [device.port.UID isEqualToString:self.port.UID];
|
||||
BOOL isDataSourceIDEqual = device.dataSource.dataSourceID.longValue == self.dataSource.dataSourceID.longValue;
|
||||
return isPortUIDEqual && isDataSourceIDEqual;
|
||||
}
|
||||
else
|
||||
{
|
||||
return [super isEqual:object];
|
||||
}
|
||||
}
|
||||
|
||||
#elif TARGET_OS_MAC
|
||||
|
||||
+ (void)enumerateDevicesUsingBlock:(void(^)(EZAudioDevice *device,
|
||||
BOOL *stop))block
|
||||
{
|
||||
if (!block)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// get the present system devices
|
||||
AudioObjectPropertyAddress address = [self addressForPropertySelector:kAudioHardwarePropertyDevices];
|
||||
UInt32 devicesDataSize;
|
||||
[EZAudioUtilities checkResult:AudioObjectGetPropertyDataSize(kAudioObjectSystemObject,
|
||||
&address,
|
||||
0,
|
||||
NULL,
|
||||
&devicesDataSize)
|
||||
operation:"Failed to get data size"];
|
||||
|
||||
// enumerate devices
|
||||
NSInteger count = devicesDataSize / sizeof(AudioDeviceID);
|
||||
AudioDeviceID *deviceIDs = (AudioDeviceID *)malloc(devicesDataSize);
|
||||
|
||||
// fill in the devices
|
||||
[EZAudioUtilities checkResult:AudioObjectGetPropertyData(kAudioObjectSystemObject,
|
||||
&address,
|
||||
0,
|
||||
NULL,
|
||||
&devicesDataSize,
|
||||
deviceIDs)
|
||||
operation:""];
|
||||
|
||||
BOOL stop = NO;
|
||||
for (UInt32 i = 0; i < count; i++)
|
||||
{
|
||||
AudioDeviceID deviceID = deviceIDs[i];
|
||||
EZAudioDevice *device = [[EZAudioDevice alloc] init];
|
||||
device.deviceID = deviceID;
|
||||
device.manufacturer = [self manufacturerForDeviceID:deviceID];
|
||||
device.name = [self namePropertyForDeviceID:deviceID];
|
||||
device.UID = [self UIDPropertyForDeviceID:deviceID];
|
||||
device.inputChannelCount = [self channelCountForScope:kAudioObjectPropertyScopeInput forDeviceID:deviceID];
|
||||
device.outputChannelCount = [self channelCountForScope:kAudioObjectPropertyScopeOutput forDeviceID:deviceID];
|
||||
block(device, &stop);
|
||||
if (stop)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
free(deviceIDs);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
+ (NSArray *)devices
|
||||
{
|
||||
__block NSMutableArray *devices = [NSMutableArray array];
|
||||
[self enumerateDevicesUsingBlock:^(EZAudioDevice *device, BOOL *stop)
|
||||
{
|
||||
[devices addObject:device];
|
||||
}];
|
||||
return devices;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
+ (NSArray *)inputDevices
|
||||
{
|
||||
__block NSMutableArray *devices = [NSMutableArray array];
|
||||
[self enumerateDevicesUsingBlock:^(EZAudioDevice *device, BOOL *stop)
|
||||
{
|
||||
if (device.inputChannelCount > 0)
|
||||
{
|
||||
[devices addObject:device];
|
||||
}
|
||||
}];
|
||||
return devices;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
+ (NSArray *)outputDevices
|
||||
{
|
||||
__block NSMutableArray *devices = [NSMutableArray array];
|
||||
[self enumerateDevicesUsingBlock:^(EZAudioDevice *device, BOOL *stop)
|
||||
{
|
||||
if (device.outputChannelCount > 0)
|
||||
{
|
||||
[devices addObject:device];
|
||||
}
|
||||
}];
|
||||
return devices;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Utility
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
+ (AudioObjectPropertyAddress)addressForPropertySelector:(AudioObjectPropertySelector)selector
|
||||
{
|
||||
AudioObjectPropertyAddress address;
|
||||
address.mScope = kAudioObjectPropertyScopeGlobal;
|
||||
address.mElement = kAudioObjectPropertyElementMaster;
|
||||
address.mSelector = selector;
|
||||
return address;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
+ (NSString *)stringPropertyForSelector:(AudioObjectPropertySelector)selector
|
||||
withDeviceID:(AudioDeviceID)deviceID
|
||||
{
|
||||
AudioObjectPropertyAddress address = [self addressForPropertySelector:selector];
|
||||
CFStringRef string;
|
||||
UInt32 propSize = sizeof(CFStringRef);
|
||||
NSString *errorString = [NSString stringWithFormat:@"Failed to get device property (%u)",(unsigned int)selector];
|
||||
[EZAudioUtilities checkResult:AudioObjectGetPropertyData(deviceID,
|
||||
&address,
|
||||
0,
|
||||
NULL,
|
||||
&propSize,
|
||||
&string)
|
||||
operation:errorString.UTF8String];
|
||||
return (__bridge_transfer NSString *)string;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
+ (NSInteger)channelCountForScope:(AudioObjectPropertyScope)scope
|
||||
forDeviceID:(AudioDeviceID)deviceID
|
||||
{
|
||||
AudioObjectPropertyAddress address;
|
||||
address.mScope = scope;
|
||||
address.mElement = kAudioObjectPropertyElementMaster;
|
||||
address.mSelector = kAudioDevicePropertyStreamConfiguration;
|
||||
|
||||
AudioBufferList streamConfiguration;
|
||||
UInt32 propSize = sizeof(streamConfiguration);
|
||||
[EZAudioUtilities checkResult:AudioObjectGetPropertyData(deviceID,
|
||||
&address,
|
||||
0,
|
||||
NULL,
|
||||
&propSize,
|
||||
&streamConfiguration)
|
||||
operation:"Failed to get frame size"];
|
||||
|
||||
NSInteger channelCount = 0;
|
||||
for (NSInteger i = 0; i < streamConfiguration.mNumberBuffers; i++)
|
||||
{
|
||||
channelCount += streamConfiguration.mBuffers[i].mNumberChannels;
|
||||
}
|
||||
|
||||
return channelCount;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
+ (NSString *)manufacturerForDeviceID:(AudioDeviceID)deviceID
|
||||
{
|
||||
return [self stringPropertyForSelector:kAudioDevicePropertyDeviceManufacturerCFString
|
||||
withDeviceID:deviceID];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
+ (NSString *)namePropertyForDeviceID:(AudioDeviceID)deviceID
|
||||
{
|
||||
return [self stringPropertyForSelector:kAudioDevicePropertyDeviceNameCFString
|
||||
withDeviceID:deviceID];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
+ (NSString *)UIDPropertyForDeviceID:(AudioDeviceID)deviceID
|
||||
{
|
||||
return [self stringPropertyForSelector:kAudioDevicePropertyDeviceUID
|
||||
withDeviceID:deviceID];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (NSString *)description
|
||||
{
|
||||
return [NSString stringWithFormat:@"%@ { deviceID: %i, manufacturer: %@, name: %@, UID: %@, inputChannelCount: %ld, outputChannelCount: %ld }",
|
||||
[super description],
|
||||
self.deviceID,
|
||||
self.manufacturer,
|
||||
self.name,
|
||||
self.UID,
|
||||
self.inputChannelCount,
|
||||
self.outputChannelCount];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (BOOL)isEqual:(id)object
|
||||
{
|
||||
if ([object isKindOfClass:self.class])
|
||||
{
|
||||
EZAudioDevice *device = (EZAudioDevice *)object;
|
||||
return [self.UID isEqualToString:device.UID];
|
||||
}
|
||||
else
|
||||
{
|
||||
return [super isEqual:object];
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#endif
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,33 @@
|
||||
//
|
||||
// EZAudioDisplayLink.h
|
||||
// EZAudioCoreGraphicsWaveformExample
|
||||
//
|
||||
// Created by Syed Haris Ali on 6/5/15.
|
||||
// Copyright (c) 2015 Syed Haris Ali. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <QuartzCore/QuartzCore.h>
|
||||
|
||||
@class EZAudioDisplayLink;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - EZAudioDisplayLinkDelegate
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@protocol EZAudioDisplayLinkDelegate <NSObject>
|
||||
|
||||
- (void)displayLinkNeedsDisplay:(EZAudioDisplayLink *)displayLink;
|
||||
|
||||
@end
|
||||
|
||||
@interface EZAudioDisplayLink : NSObject
|
||||
|
||||
+ (instancetype)displayLinkWithDelegate:(id<EZAudioDisplayLinkDelegate>)delegate;
|
||||
|
||||
@property (nonatomic, weak) id<EZAudioDisplayLinkDelegate> delegate;
|
||||
|
||||
- (void)start;
|
||||
- (void)stop;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,163 @@
|
||||
//
|
||||
// EZAudioDisplayLink.m
|
||||
// EZAudioCoreGraphicsWaveformExample
|
||||
//
|
||||
// Created by Syed Haris Ali on 6/5/15.
|
||||
// Copyright (c) 2015 Syed Haris Ali. All rights reserved.
|
||||
//
|
||||
|
||||
#import "EZAudioDisplayLink.h"
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - CVDisplayLink Callback (Implementation)
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
#elif TARGET_OS_MAC
|
||||
static CVReturn EZAudioDisplayLinkCallback(CVDisplayLinkRef displayLinkRef,
|
||||
const CVTimeStamp *now,
|
||||
const CVTimeStamp *outputTime,
|
||||
CVOptionFlags flagsIn,
|
||||
CVOptionFlags *flagsOut,
|
||||
void *displayLinkContext);
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - EZAudioDisplayLink (Interface Extension)
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@interface EZAudioDisplayLink ()
|
||||
#if TARGET_OS_IPHONE
|
||||
@property (nonatomic, strong) CADisplayLink *displayLink;
|
||||
#elif TARGET_OS_MAC
|
||||
@property (nonatomic, assign) CVDisplayLinkRef displayLink;
|
||||
#endif
|
||||
@property (nonatomic, assign) BOOL stopped;
|
||||
@end
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - EZAudioDisplayLink (Implementation)
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@implementation EZAudioDisplayLink
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Dealloc
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
#if TARGET_OS_IPHONE
|
||||
[self.displayLink invalidate];
|
||||
#elif TARGET_OS_MAC
|
||||
CVDisplayLinkStop(self.displayLink);
|
||||
CVDisplayLinkRelease(self.displayLink);
|
||||
self.displayLink = nil;
|
||||
#endif
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Class Initialization
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
+ (instancetype)displayLinkWithDelegate:(id<EZAudioDisplayLinkDelegate>)delegate
|
||||
{
|
||||
EZAudioDisplayLink *displayLink = [[self alloc] init];
|
||||
displayLink.delegate = delegate;
|
||||
return displayLink;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Initialization
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (instancetype) init
|
||||
{
|
||||
self = [super init];
|
||||
if (self)
|
||||
{
|
||||
[self setup];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Setup
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)setup
|
||||
{
|
||||
self.stopped = YES;
|
||||
#if TARGET_OS_IPHONE
|
||||
self.displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(update)];
|
||||
[self.displayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
|
||||
#elif TARGET_OS_MAC
|
||||
CVDisplayLinkCreateWithActiveCGDisplays(&_displayLink);
|
||||
CVDisplayLinkSetOutputCallback(self.displayLink,
|
||||
EZAudioDisplayLinkCallback,
|
||||
(__bridge void *)(self));
|
||||
CVDisplayLinkStart(self.displayLink);
|
||||
#endif
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Actions
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)start
|
||||
{
|
||||
#if TARGET_OS_IPHONE
|
||||
self.displayLink.paused = NO;
|
||||
#elif TARGET_OS_MAC
|
||||
CVDisplayLinkStart(self.displayLink);
|
||||
#endif
|
||||
self.stopped = NO;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)stop
|
||||
{
|
||||
#if TARGET_OS_IPHONE
|
||||
self.displayLink.paused = YES;
|
||||
#elif TARGET_OS_MAC
|
||||
CVDisplayLinkStop(self.displayLink);
|
||||
#endif
|
||||
self.stopped = YES;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)update
|
||||
{
|
||||
if (!self.stopped)
|
||||
{
|
||||
if ([self.delegate respondsToSelector:@selector(displayLinkNeedsDisplay:)])
|
||||
{
|
||||
[self.delegate displayLinkNeedsDisplay:self];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@end
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - CVDisplayLink Callback (Implementation)
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
#elif TARGET_OS_MAC
|
||||
static CVReturn EZAudioDisplayLinkCallback(CVDisplayLinkRef displayLinkRef,
|
||||
const CVTimeStamp *now,
|
||||
const CVTimeStamp *outputTime,
|
||||
CVOptionFlags flagsIn,
|
||||
CVOptionFlags *flagsOut,
|
||||
void *displayLinkContext)
|
||||
{
|
||||
EZAudioDisplayLink *displayLink = (__bridge EZAudioDisplayLink*)displayLinkContext;
|
||||
[displayLink update];
|
||||
return kCVReturnSuccess;
|
||||
}
|
||||
#endif
|
||||
+228
-77
@@ -25,10 +25,34 @@
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <AudioToolbox/AudioToolbox.h>
|
||||
#import "EZAudioFloatData.h"
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@class EZAudio;
|
||||
@class EZAudioFile;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
typedef NS_ENUM(NSUInteger, EZAudioFilePermission)
|
||||
{
|
||||
EZAudioFilePermissionRead = kAudioFileReadPermission,
|
||||
EZAudioFilePermissionWrite = kAudioFileWritePermission,
|
||||
EZAudioFilePermissionReadWrite = kAudioFileReadWritePermission,
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Blocks
|
||||
//------------------------------------------------------------------------------
|
||||
/**
|
||||
A block used when returning back the waveform data. The waveform data itself will be an array of float values and the length indicates the total length of the float array.
|
||||
@param waveformData An EZAudioFloatData instance containing the waveform data for all channels of audio
|
||||
*/
|
||||
typedef void (^WaveformDataCompletionBlock)(EZAudioFloatData *waveformData);
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - EZAudioFileDelegate
|
||||
//------------------------------------------------------------------------------
|
||||
/**
|
||||
The EZAudioFileDelegate provides event callbacks for the EZAudioFile object. These type of events are triggered by reads and seeks on the file and gives feedback such as the audio data read as a float array for visualizations and the new seek position for UI updating.
|
||||
*/
|
||||
@@ -42,102 +66,182 @@
|
||||
@param bufferSize The length of the buffers float arrays
|
||||
@param numberOfChannels The number of channels. 2 for stereo, 1 for mono.
|
||||
*/
|
||||
-(void) audioFile:(EZAudioFile*)audioFile
|
||||
readAudio:(float**)buffer
|
||||
withBufferSize:(UInt32)bufferSize
|
||||
withNumberOfChannels:(UInt32)numberOfChannels;
|
||||
- (void) audioFile:(EZAudioFile*)audioFile
|
||||
readAudio:(float**)buffer
|
||||
withBufferSize:(UInt32)bufferSize
|
||||
withNumberOfChannels:(UInt32)numberOfChannels;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Occurs when the audio file's internal seek position has been updated by the EZAudioFile functions `readFrames:audioBufferList:bufferSize:eof:` or `audioFile:updatedPosition:`.
|
||||
@param audioFile The instance of the EZAudio in which the change occured
|
||||
@param framePosition The new frame index as a 64-bit signed integer
|
||||
*/
|
||||
-(void)audioFile:(EZAudioFile*)audioFile
|
||||
updatedPosition:(SInt64)framePosition;
|
||||
- (void) audioFile:(EZAudioFile*)audioFile
|
||||
updatedPosition:(SInt64)framePosition;
|
||||
|
||||
@end
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - EZAudioFile
|
||||
//------------------------------------------------------------------------------
|
||||
/**
|
||||
The EZAudioFile provides a lightweight and intuitive way to asynchronously interact with audio files. These interactions included reading audio data, seeking within an audio file, getting information about the file, and pulling the waveform data for visualizing the contents of the audio file. The EZAudioFileDelegate provides event callbacks for when reads, seeks, and various updates happen within the audio file to allow the caller to interact with the action in meaningful ways. Common use cases here could be to read the audio file's data as AudioBufferList structures for output (see EZOutput) and visualizing the audio file's data as a float array using an audio plot (see EZAudioPlot).
|
||||
*/
|
||||
@interface EZAudioFile : NSObject
|
||||
|
||||
#pragma mark - Blocks
|
||||
/**
|
||||
A block used when returning back the waveform data. The waveform data itself will be an array of float values and the length indicates the total length of the float array.
|
||||
@param waveformData An array of float values representing the amplitude data from the audio waveform
|
||||
@param length The length of the waveform data's float array
|
||||
*/
|
||||
typedef void (^WaveformDataCompletionBlock)(float *waveformData, UInt32 length);
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Properties
|
||||
//------------------------------------------------------------------------------
|
||||
/**
|
||||
A EZAudioFileDelegate for the audio file that is used to return events such as new seek positions within the file and the read audio data as a float array.
|
||||
*/
|
||||
@property (nonatomic,assign) id<EZAudioFileDelegate> audioFileDelegate;
|
||||
@property (nonatomic, weak) id<EZAudioFileDelegate> delegate;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Initialization
|
||||
//------------------------------------------------------------------------------
|
||||
/**
|
||||
@name Initialization
|
||||
*/
|
||||
|
||||
/**
|
||||
The resolution of the waveform data. This value specifies how the recommendedDrawingFrameRate chooses itself. A low value like 128 will render a waveform containing 128 points representing a low resolution waveform while a high value like 4096 will render a high quality waveform. Higher resolutions provide more detail, but take more work to render in the audio waveform plots (EZAudioPlot or EZAudioPlotGL) while lower resolutions providel less detail, but work better for displaying many at a time (like in a UITableView)
|
||||
Creates a new instance of the EZAudioFile using a file path URL. Read only.
|
||||
@param url The file path reference of the audio file as an NSURL.
|
||||
@return The newly created EZAudioFile instance.
|
||||
*/
|
||||
@property (nonatomic,assign) UInt32 waveformResolution;
|
||||
- (instancetype)initWithURL:(NSURL*)url;
|
||||
|
||||
#pragma mark - Initializers
|
||||
///-----------------------------------------------------------
|
||||
/// @name Initializers
|
||||
///-----------------------------------------------------------
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Creates a new instance of the EZAudioFile using a file path URL.
|
||||
@param url The file path reference of the audio file as an NSURL.
|
||||
@param permission A constant describing what we intend on doing with the audio file (read, write, or both)
|
||||
@param fileFormat An AudioStreamBasicDescription that will be used to create the audio file if it does not exist if the permission argument is set to EZAudioFilePermissionWrite or EZAudioFilePermissionReadWrite. Not used for EZAudioFilePermissionRead permission.
|
||||
@return The newly created EZAudioFile instance.
|
||||
*/
|
||||
-(EZAudioFile*)initWithURL:(NSURL*)url;
|
||||
- (instancetype)initWithURL:(NSURL*)url
|
||||
permission:(EZAudioFilePermission)permission
|
||||
fileFormat:(AudioStreamBasicDescription)fileFormat;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Creates a new instance of the EZAudioFile using a file path URL and allows specifying an EZAudioFileDelegate.
|
||||
@param url The file path reference of the audio file as an NSURL.
|
||||
@param delegate The audio file delegate that receives events specified by the EZAudioFileDelegate protocol
|
||||
@param permission A constant describing what we intend on doing with the audio file (read, write, or both)
|
||||
@param fileFormat An AudioStreamBasicDescription that will be used to create the audio file if it does not exist if the permission argument is set to EZAudioFilePermissionWrite or EZAudioFilePermissionReadWrite. Not used for EZAudioFilePermissionRead permission.
|
||||
@return The newly created EZAudioFile instance.
|
||||
*/
|
||||
-(EZAudioFile*)initWithURL:(NSURL*)url
|
||||
andDelegate:(id<EZAudioFileDelegate>)delegate;
|
||||
- (instancetype)initWithURL:(NSURL*)url
|
||||
delegate:(id<EZAudioFileDelegate>)delegate
|
||||
permission:(EZAudioFilePermission)permission
|
||||
fileFormat:(AudioStreamBasicDescription)fileFormat;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Class method that creates a new instance of the EZAudioFile using a file path URL and allows specifying an EZAudioFileDelegate, a read/write permission, a file format incase a new file is being written, and a client format for a format that will be used when read samples (different from file format).
|
||||
@param url The file path reference of the audio file as an NSURL.
|
||||
@param delegate The audio file delegate that receives events specified by the EZAudioFileDelegate protocol
|
||||
@param permission A constant describing what we intend on doing with the audio file (read, write, or both)
|
||||
@param fileFormat An AudioStreamBasicDescription that will be used to create the audio file if it does not exist if the permission argument is set to EZAudioFilePermissionWrite or EZAudioFilePermissionReadWrite. Not used for EZAudioFilePermissionRead permission.
|
||||
@param clientFormat An AudioStreamBasicDescription that will be used as the client format on the audio file. For instance, the audio file might be in a 22.5 kHz sample rate format in its file format, but your app wants to read the samples at a sample rate of 44.1 kHz so it can iterate with other components (like a audio processing graph) without any weird playback effects. If this initializer is not used then a non-interleaved float format will be assumed.
|
||||
@return The newly created EZAudioFile instance.
|
||||
*/
|
||||
- (instancetype)initWithURL:(NSURL*)url
|
||||
delegate:(id<EZAudioFileDelegate>)delegate
|
||||
permission:(EZAudioFilePermission)permission
|
||||
fileFormat:(AudioStreamBasicDescription)fileFormat
|
||||
clientFormat:(AudioStreamBasicDescription)clientFormat;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Class Initializers
|
||||
///-----------------------------------------------------------
|
||||
/// @name Class Initializers
|
||||
///-----------------------------------------------------------
|
||||
//------------------------------------------------------------------------------
|
||||
/**
|
||||
@name Class Initializers
|
||||
*/
|
||||
|
||||
/**
|
||||
Class method that creates a new instance of the EZAudioFile using a file path URL.
|
||||
@param url The file path reference of the audio file as an NSURL.
|
||||
@return The newly created EZAudioFile instance.
|
||||
*/
|
||||
+(EZAudioFile*)audioFileWithURL:(NSURL*)url;
|
||||
+ (instancetype)audioFileWithURL:(NSURL*)url;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Class method that creates a new instance of the EZAudioFile using a file path URL.
|
||||
@param url The file path reference of the audio file as an NSURL.
|
||||
@param permission A constant describing what we intend on doing with the audio file (read, write, or both)
|
||||
@param fileFormat An AudioStreamBasicDescription that will be used to create the audio file if it does not exist if the permission argument is set to EZAudioFilePermissionWrite or EZAudioFilePermissionReadWrite. Not used for EZAudioFilePermissionRead permission.
|
||||
@return The newly created EZAudioFile instance.
|
||||
*/
|
||||
+ (instancetype)audioFileWithURL:(NSURL*)url
|
||||
permission:(EZAudioFilePermission)permission
|
||||
fileFormat:(AudioStreamBasicDescription)fileFormat;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Class method that creates a new instance of the EZAudioFile using a file path URL and allows specifying an EZAudioFileDelegate.
|
||||
@param url The file path reference of the audio file as an NSURL.
|
||||
@param delegate The audio file delegate that receives events specified by the EZAudioFileDelegate protocol
|
||||
@param permission A constant describing what we intend on doing with the audio file (read, write, or both)
|
||||
@param fileFormat An AudioStreamBasicDescription that will be used to create the audio file if it does not exist if the permission argument is set to EZAudioFilePermissionWrite or EZAudioFilePermissionReadWrite. Not used for EZAudioFilePermissionRead permission.
|
||||
@return The newly created EZAudioFile instance.
|
||||
*/
|
||||
+(EZAudioFile*)audioFileWithURL:(NSURL*)url
|
||||
andDelegate:(id<EZAudioFileDelegate>)delegate;
|
||||
+ (instancetype)audioFileWithURL:(NSURL*)url
|
||||
delegate:(id<EZAudioFileDelegate>)delegate
|
||||
permission:(EZAudioFilePermission)permission
|
||||
fileFormat:(AudioStreamBasicDescription)fileFormat;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Class method that creates a new instance of the EZAudioFile using a file path URL and allows specifying an EZAudioFileDelegate, a read/write permission, a file format incase a new file is being written, and a client format for a format that will be used when read samples (different from file format).
|
||||
@param url The file path reference of the audio file as an NSURL.
|
||||
@param delegate The audio file delegate that receives events specified by the EZAudioFileDelegate protocol
|
||||
@param permission A constant describing what we intend on doing with the audio file (read, write, or both)
|
||||
@param fileFormat An AudioStreamBasicDescription that will be used to create the audio file if it does not exist if the permission argument is set to EZAudioFilePermissionWrite or EZAudioFilePermissionReadWrite. Not used for EZAudioFilePermissionRead permission.
|
||||
@param clientFormat An AudioStreamBasicDescription that will be used as the client format on the audio file. A client format is different from the file format in that it is the format of the other components interacting with this file. For instance, the file on disk could be a 22.5 kHz, float format, but we might have an audio processing graph that has a 44.1 kHz, signed integer format that we'd like to interact with. The client format lets us set that 44.1 kHz format on the audio file to properly read samples from it with any interpolation or format conversion that must take place. If not specified the default value is equal to the class method, 'defaultClientFormat'
|
||||
@return The newly created EZAudioFile instance.
|
||||
*/
|
||||
+ (instancetype)audioFileWithURL:(NSURL*)url
|
||||
delegate:(id<EZAudioFileDelegate>)delegate
|
||||
permission:(EZAudioFilePermission)permission
|
||||
fileFormat:(AudioStreamBasicDescription)fileFormat
|
||||
clientFormat:(AudioStreamBasicDescription)clientFormat;;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Class Methods
|
||||
///-----------------------------------------------------------
|
||||
/// @name Class Methods
|
||||
///-----------------------------------------------------------
|
||||
//------------------------------------------------------------------------------
|
||||
/**
|
||||
@name Class Methods
|
||||
*/
|
||||
|
||||
/**
|
||||
A class method that subclasses can override to specify the default client format that will be used to read audio data from this file. A client format is different from the file format in that it is the format of the other components interacting with this file. For instance, the file on disk could be a 22.5 kHz, float format, but we might have an audio processing graph that has a 44.1 kHz, signed integer format that we'd like to interact with. The client format lets us set that 44.1 kHz format on the audio file to properly read samples from it with any interpolation or format conversion that must take place. Default is stereo, non-interleaved, 44.1 kHz.
|
||||
@return An AudioStreamBasicDescription that serves as the audio file's client format.
|
||||
*/
|
||||
+ (AudioStreamBasicDescription)defaultClientFormat;
|
||||
|
||||
/**
|
||||
Provides an array of the supported audio files types. Each audio file type is provided as a string, i.e. @"caf". Useful for filtering lists of files in an open panel to only the types allowed.
|
||||
@return An array of NSString objects representing the represented file types.
|
||||
*/
|
||||
+(NSArray*)supportedAudioFileTypes;
|
||||
+ (NSArray *)supportedAudioFileTypes;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Events
|
||||
///-----------------------------------------------------------
|
||||
/// @name Reading The Audio File
|
||||
///-----------------------------------------------------------
|
||||
//------------------------------------------------------------------------------
|
||||
/**
|
||||
@name Reading The Audio File
|
||||
*/
|
||||
|
||||
/**
|
||||
Reads a specified number of frames from the audio file. In addition, this will notify the EZAudioFileDelegate (if specified) of the read data as a float array with the audioFile:readAudio:withBufferSize:withNumberOfChannels: event and the new seek position within the file with the audioFile:updatedPosition: event.
|
||||
@@ -147,95 +251,142 @@ typedef void (^WaveformDataCompletionBlock)(float *waveformData, UInt32 length);
|
||||
@param eof A pointer to a BOOL in which to store whether the read operation reached the end of the audio file.
|
||||
*/
|
||||
-(void)readFrames:(UInt32)frames
|
||||
audioBufferList:(AudioBufferList*)audioBufferList
|
||||
bufferSize:(UInt32*)bufferSize
|
||||
eof:(BOOL*)eof;
|
||||
audioBufferList:(AudioBufferList *)audioBufferList
|
||||
bufferSize:(UInt32 *)bufferSize
|
||||
eof:(BOOL *)eof;
|
||||
|
||||
///-----------------------------------------------------------
|
||||
/// @name Seeking Through The Audio File
|
||||
///-----------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Seeking Through The Audio File
|
||||
//------------------------------------------------------------------------------
|
||||
/**
|
||||
@name Seeking Through The Audio File
|
||||
*/
|
||||
|
||||
/**
|
||||
Seeks through an audio file to a specified frame. This will notify the EZAudioFileDelegate (if specified) with the audioFile:updatedPosition: function.
|
||||
@param frame The new frame position to seek to as a SInt64.
|
||||
*/
|
||||
-(void)seekToFrame:(SInt64)frame;
|
||||
- (void)seekToFrame:(SInt64)frame;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Getters
|
||||
///-----------------------------------------------------------
|
||||
/// @name Getting Information About The Audio File
|
||||
///-----------------------------------------------------------
|
||||
//------------------------------------------------------------------------------
|
||||
/**
|
||||
@name Getting Information About The Audio File
|
||||
*/
|
||||
|
||||
/**
|
||||
Provides the AudioStreamBasicDescription structure used within the app. The file's format will be converted to this format and then sent back as either a float array or a `AudioBufferList` pointer. Use this when communicating with other EZAudio components.
|
||||
@warning This must be a linear PCM format!
|
||||
@return An AudioStreamBasicDescription structure describing the format of the audio file.
|
||||
*/
|
||||
-(AudioStreamBasicDescription)clientFormat;
|
||||
- (AudioStreamBasicDescription)clientFormat;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Provides the AudioStreamBasicDescription structure containing the format of the file.
|
||||
@return An AudioStreamBasicDescription structure describing the format of the audio file.
|
||||
*/
|
||||
-(AudioStreamBasicDescription)fileFormat;
|
||||
- (AudioStreamBasicDescription)fileFormat;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Provides the frame index (a.k.a the seek positon) within the audio file as an integer. This can be helpful when seeking through the audio file.
|
||||
@return The current frame index within the audio file as a SInt64.
|
||||
*/
|
||||
-(SInt64)frameIndex;
|
||||
- (SInt64)frameIndex;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Provides a dictionary containing the metadata (ID3) tags that are included in the header for the audio file. Typically this contains stuff like artist, title, release year, etc.
|
||||
@return An NSDictionary containing the metadata for the audio file.
|
||||
*/
|
||||
-(NSDictionary *)metadata;
|
||||
- (NSDictionary *)metadata;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Provides the total duration of the audio file in seconds.
|
||||
@return The total duration of the audio file as a Float32.
|
||||
*/
|
||||
-(Float32)totalDuration;
|
||||
- (NSTimeInterval)totalDuration;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Provides the total frame count of the audio file.
|
||||
@return The total number of frames in the audio file as a SInt64.
|
||||
Provides the total frame count of the audio file in the client format.
|
||||
@return The total number of frames in the audio file in the AudioStreamBasicDescription representing the client format as a SInt64.
|
||||
*/
|
||||
-(SInt64)totalFrames;
|
||||
- (SInt64)totalClientFrames;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Provides the total frame count of the audio file in the file format.
|
||||
@return The total number of frames in the audio file in the AudioStreamBasicDescription representing the file format as a SInt64.
|
||||
*/
|
||||
- (SInt64)totalFrames;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Provides the NSURL for the audio file.
|
||||
@return An NSURL representing the path of the EZAudioFile instance.
|
||||
*/
|
||||
-(NSURL*)url;
|
||||
- (NSURL*)url;
|
||||
|
||||
#pragma mark - Helpers
|
||||
///-----------------------------------------------------------
|
||||
/// @name Manipulating The Audio Data
|
||||
///-----------------------------------------------------------
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Setters
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Tells the caller whether the EZAudioFile has cached waveform data that was loaded via the getWaveformDataWithCompletionBlock: function.
|
||||
* @return A BOOL indicating whether there is cached waveform data
|
||||
A client format is different from the file format in that it is the format of the other components interacting with this file. For instance, the file on disk could be a 22.5 kHz, float format, but we might have an audio processing graph that has a 44.1 kHz, signed integer format that we'd like to interact with. The client format lets us set that 44.1 kHz format on the audio file to properly read samples from it with any interpolation or format conversion that must take place. Default is stereo, non-interleaved, 44.1 kHz.
|
||||
@param clientFormat An AudioStreamBasicDescription that should serve as the audio file's client format.
|
||||
*/
|
||||
-(BOOL)hasLoadedAudioData;
|
||||
- (void)setClientFormat:(AudioStreamBasicDescription)clientFormat;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Helpers
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Synchronously pulls the waveform amplitude data into a float array for the receiver. This returns a waveform with a default resolution of 1024, meaning there are 1024 data points to plot the waveform.
|
||||
@param numberOfPoints A UInt32 representing the number of data points you need. The higher the number of points the more detailed the waveform will be.
|
||||
@return A EZAudioFloatData instance containing the audio data for all channels of the audio.
|
||||
*/
|
||||
- (EZAudioFloatData *)getWaveformData;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Synchronously pulls the waveform amplitude data into a float array for the receiver.
|
||||
@param numberOfPoints A UInt32 representing the number of data points you need. The higher the number of points the more detailed the waveform will be.
|
||||
@return A EZAudioFloatData instance containing the audio data for all channels of the audio.
|
||||
*/
|
||||
- (EZAudioFloatData *)getWaveformDataWithNumberOfPoints:(UInt32)numberOfPoints;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Asynchronously pulls the waveform amplitude data into a float array for the receiver. This returns a waveform with a default resolution of 1024, meaning there are 1024 data points to plot the waveform.
|
||||
@param completion A WaveformDataCompletionBlock that executes when the waveform data has been extracted. Provides a `EZAudioFloatData` instance containing the waveform data for all audio channels.
|
||||
*/
|
||||
- (void)getWaveformDataWithCompletionBlock:(WaveformDataCompletionBlock)completion;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Asynchronously pulls the waveform amplitude data into a float array for the receiver.
|
||||
@param waveformDataCompletionBlock A WaveformDataCompletionBlock that executes when the waveform data has been extracted. Provides the waveform data as a float array and the length of the array.
|
||||
@param numberOfPoints A UInt32 representing the number of data points you need. The higher the number of points the more detailed the waveform will be.
|
||||
@param completion A WaveformDataCompletionBlock that executes when the waveform data has been extracted. Provides a `EZAudioFloatData` instance containing the waveform data for all audio channels.
|
||||
*/
|
||||
-(void)getWaveformDataWithCompletionBlock:(WaveformDataCompletionBlock)waveformDataCompletionBlock;
|
||||
- (void)getWaveformDataWithNumberOfPoints:(UInt32)numberOfPoints
|
||||
completion:(WaveformDataCompletionBlock)completion;
|
||||
|
||||
/**
|
||||
Provides the minimum number of buffers that would be required with the constant frames read rate provided.
|
||||
@param frameRate A constant frame rate to use when calculating the number of buffers needed as a UInt32.
|
||||
@return The minimum number of buffers required for the constant frames read rate provided as a UInt32.
|
||||
*/
|
||||
-(UInt32)minBuffersWithFrameRate:(UInt32)frameRate;
|
||||
|
||||
/**
|
||||
Provides a frame rate to use when drawing and averaging a bin of values to create each point in a graph. The ideal amount of end buffers seems to be between 1000-3000 so we determine a frame rate per audio file that can achieve a high degree of detail for the entire waveform.
|
||||
@return A frame rate value as a UInt32 to use when reading frames in a file.
|
||||
*/
|
||||
-(UInt32)recommendedDrawingFrameRate;
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@end
|
||||
|
||||
+616
-320
@@ -25,342 +25,638 @@
|
||||
|
||||
#import "EZAudioFile.h"
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#import "EZAudio.h"
|
||||
#import "EZAudioFloatConverter.h"
|
||||
#import "EZAudioFloatData.h"
|
||||
#include <pthread.h>
|
||||
|
||||
#define kEZAudioFileWaveformDefaultResolution (1024)
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@interface EZAudioFile (){
|
||||
|
||||
// Reading from the audio file
|
||||
ExtAudioFileRef _audioFile;
|
||||
AudioStreamBasicDescription _clientFormat;
|
||||
AudioStreamBasicDescription _fileFormat;
|
||||
float **_floatBuffers;
|
||||
AEFloatConverter *_floatConverter;
|
||||
SInt64 _frameIndex;
|
||||
CFURLRef _sourceURL;
|
||||
Float32 _totalDuration;
|
||||
SInt64 _totalFrames;
|
||||
|
||||
// Waveform Data
|
||||
float *_waveformData;
|
||||
UInt32 _waveformFrameRate;
|
||||
UInt32 _waveformTotalBuffers;
|
||||
|
||||
}
|
||||
// errors
|
||||
static OSStatus EZAudioFileReadPermissionFileDoesNotExistCode = -88776;
|
||||
|
||||
// constants
|
||||
static UInt32 EZAudioFileWaveformDefaultResolution = 1024;
|
||||
static NSString *EZAudioFileWaveformDataQueueIdentifier = @"com.ezaudio.waveformQueue";
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
typedef struct
|
||||
{
|
||||
AudioFileID audioFileID;
|
||||
AudioStreamBasicDescription clientFormat;
|
||||
float duration;
|
||||
ExtAudioFileRef extAudioFileRef;
|
||||
AudioStreamBasicDescription fileFormat;
|
||||
SInt64 frames;
|
||||
EZAudioFilePermission permission;
|
||||
CFURLRef sourceURL;
|
||||
} EZAudioFileInfo;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - EZAudioFile
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@interface EZAudioFile ()
|
||||
@property (nonatomic, strong) EZAudioFloatConverter *floatConverter;
|
||||
@property (nonatomic) float **floatData;
|
||||
@property (nonatomic) EZAudioFileInfo *info;
|
||||
@property (nonatomic) pthread_mutex_t lock;
|
||||
@property (nonatomic) dispatch_queue_t waveformQueue;
|
||||
@end
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@implementation EZAudioFile
|
||||
@synthesize audioFileDelegate = _audioFileDelegate;
|
||||
@synthesize waveformResolution = _waveformResolution;
|
||||
|
||||
#pragma mark - Initializers
|
||||
-(EZAudioFile*)initWithURL:(NSURL*)url {
|
||||
self = [super init];
|
||||
if(self){
|
||||
_sourceURL = (__bridge CFURLRef)url;
|
||||
[self _configureAudioFile];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Initialization
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
-(EZAudioFile *)initWithURL:(NSURL *)url andDelegate:(id<EZAudioFileDelegate>)delegate {
|
||||
self = [self initWithURL:url];
|
||||
if(self){
|
||||
self.audioFileDelegate = delegate;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Class Initializers
|
||||
+(EZAudioFile*)audioFileWithURL:(NSURL*)url {
|
||||
return [[EZAudioFile alloc] initWithURL:url];
|
||||
}
|
||||
|
||||
+(EZAudioFile *)audioFileWithURL:(NSURL *)url andDelegate:(id<EZAudioFileDelegate>)delegate {
|
||||
return [[EZAudioFile alloc] initWithURL:url andDelegate:delegate];
|
||||
}
|
||||
|
||||
#pragma mark - Class Methods
|
||||
+(NSArray *)supportedAudioFileTypes {
|
||||
return @[ @"aac",
|
||||
@"caf",
|
||||
@"aif",
|
||||
@"aiff",
|
||||
@"aifc",
|
||||
@"mp3",
|
||||
@"mp4",
|
||||
@"m4a",
|
||||
@"snd",
|
||||
@"au",
|
||||
@"sd2",
|
||||
@"wav" ];
|
||||
}
|
||||
|
||||
#pragma mark - Private Configuation
|
||||
-(void)_configureAudioFile {
|
||||
|
||||
// Source URL should not be nil
|
||||
NSAssert(_sourceURL,@"Source URL was not specified correctly.");
|
||||
|
||||
// Try to open the file for reading
|
||||
[EZAudio checkResult:ExtAudioFileOpenURL(_sourceURL,&_audioFile)
|
||||
operation:"Failed to open audio file for reading"];
|
||||
|
||||
// Try pulling the stream description
|
||||
UInt32 size = sizeof(_fileFormat);
|
||||
[EZAudio checkResult:ExtAudioFileGetProperty(_audioFile,kExtAudioFileProperty_FileDataFormat, &size, &_fileFormat)
|
||||
operation:"Failed to get audio stream basic description of input file"];
|
||||
|
||||
// Try pulling the total frame size
|
||||
size = sizeof(_totalFrames);
|
||||
[EZAudio checkResult:ExtAudioFileGetProperty(_audioFile,kExtAudioFileProperty_FileLengthFrames, &size, &_totalFrames)
|
||||
operation:"Failed to get total frames of input file"];
|
||||
_totalFrames = MAX(1, _totalFrames);
|
||||
|
||||
// Total duration
|
||||
_totalDuration = _totalFrames / _fileFormat.mSampleRate;
|
||||
|
||||
// Set the client format on the stream
|
||||
switch (_fileFormat.mChannelsPerFrame) {
|
||||
case 1:
|
||||
_clientFormat = [EZAudio monoFloatFormatWithSampleRate:_fileFormat.mSampleRate];
|
||||
break;
|
||||
case 2:
|
||||
_clientFormat = [EZAudio stereoFloatInterleavedFormatWithSampleRate:_fileFormat.mSampleRate];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
[EZAudio checkResult:ExtAudioFileSetProperty(_audioFile,
|
||||
kExtAudioFileProperty_ClientDataFormat,
|
||||
sizeof (AudioStreamBasicDescription),
|
||||
&_clientFormat)
|
||||
operation:"Couldn't set client data format on input ext file"];
|
||||
|
||||
// Allocate the float buffers
|
||||
_floatConverter = [[AEFloatConverter alloc] initWithSourceFormat:_clientFormat];
|
||||
size_t sizeToAllocate = sizeof(float*) * _clientFormat.mChannelsPerFrame;
|
||||
sizeToAllocate = MAX(8, sizeToAllocate);
|
||||
_floatBuffers = (float**)malloc( sizeToAllocate );
|
||||
UInt32 outputBufferSize = 32 * 1024; // 32 KB
|
||||
for ( int i=0; i< _clientFormat.mChannelsPerFrame; i++ ) {
|
||||
_floatBuffers[i] = (float*)malloc(outputBufferSize);
|
||||
}
|
||||
|
||||
[EZAudio printASBD:_fileFormat];
|
||||
|
||||
// There's no waveform data yet
|
||||
_waveformData = NULL;
|
||||
|
||||
// Set the default resolution for the waveform data
|
||||
_waveformResolution = kEZAudioFileWaveformDefaultResolution;
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - Events
|
||||
-(void)readFrames:(UInt32)frames
|
||||
audioBufferList:(AudioBufferList *)audioBufferList
|
||||
bufferSize:(UInt32 *)bufferSize
|
||||
eof:(BOOL *)eof {
|
||||
[EZAudio checkResult:ExtAudioFileRead(_audioFile,
|
||||
&frames,
|
||||
audioBufferList)
|
||||
operation:"Failed to read audio data from audio file"];
|
||||
*bufferSize = audioBufferList->mBuffers[0].mDataByteSize/sizeof(float);
|
||||
*eof = frames == 0;
|
||||
_frameIndex += frames;
|
||||
if( self.audioFileDelegate ){
|
||||
if( [self.audioFileDelegate respondsToSelector:@selector(audioFile:updatedPosition:)] ){
|
||||
[self.audioFileDelegate audioFile:self
|
||||
updatedPosition:_frameIndex];
|
||||
}
|
||||
if( [self.audioFileDelegate respondsToSelector:@selector(audioFile:readAudio:withBufferSize:withNumberOfChannels:)] ){
|
||||
AEFloatConverterToFloat(_floatConverter,audioBufferList,_floatBuffers,frames);
|
||||
[self.audioFileDelegate audioFile:self
|
||||
readAudio:_floatBuffers
|
||||
withBufferSize:frames
|
||||
withNumberOfChannels:_clientFormat.mChannelsPerFrame];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-(void)seekToFrame:(SInt64)frame {
|
||||
[EZAudio checkResult:ExtAudioFileSeek(_audioFile,frame)
|
||||
operation:"Failed to seek frame position within audio file"];
|
||||
_frameIndex = frame;
|
||||
if( self.audioFileDelegate ){
|
||||
if( [self.audioFileDelegate respondsToSelector:@selector(audioFile:updatedPosition:)] ){
|
||||
[self.audioFileDelegate audioFile:self updatedPosition:_frameIndex];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Getters
|
||||
-(BOOL)hasLoadedAudioData {
|
||||
return _waveformData != NULL;
|
||||
}
|
||||
|
||||
-(void)getWaveformDataWithCompletionBlock:(WaveformDataCompletionBlock)waveformDataCompletionBlock {
|
||||
|
||||
SInt64 currentFramePosition = _frameIndex;
|
||||
|
||||
if( _waveformData != NULL ){
|
||||
waveformDataCompletionBlock( _waveformData, _waveformTotalBuffers );
|
||||
return;
|
||||
}
|
||||
|
||||
_waveformFrameRate = [self recommendedDrawingFrameRate];
|
||||
_waveformTotalBuffers = [self minBuffersWithFrameRate:_waveformFrameRate];
|
||||
_waveformData = (float*)malloc(sizeof(float)*_waveformTotalBuffers);
|
||||
|
||||
if( self.totalFrames == 0 ){
|
||||
waveformDataCompletionBlock( _waveformData, _waveformTotalBuffers );
|
||||
return;
|
||||
}
|
||||
|
||||
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT,0ul), ^{
|
||||
|
||||
for( int i = 0; i < _waveformTotalBuffers; i++ ){
|
||||
|
||||
// Take a snapshot of each buffer through the audio file to form the waveform
|
||||
AudioBufferList *bufferList = [EZAudio audioBufferListWithNumberOfFrames:_waveformFrameRate
|
||||
numberOfChannels:_clientFormat.mChannelsPerFrame
|
||||
interleaved:YES];
|
||||
UInt32 bufferSize;
|
||||
BOOL eof;
|
||||
|
||||
// Read in the specified number of frames
|
||||
[EZAudio checkResult:ExtAudioFileRead(_audioFile,
|
||||
&_waveformFrameRate,
|
||||
bufferList)
|
||||
operation:"Failed to read audio data from audio file"];
|
||||
bufferSize = bufferList->mBuffers[0].mDataByteSize/sizeof(float);
|
||||
bufferSize = MAX(1, bufferSize);
|
||||
eof = _waveformFrameRate == 0;
|
||||
_frameIndex += _waveformFrameRate;
|
||||
|
||||
// Calculate RMS of each buffer
|
||||
float rms = [EZAudio RMS:bufferList->mBuffers[0].mData
|
||||
length:bufferSize];
|
||||
_waveformData[i] = rms;
|
||||
|
||||
// Since we malloc'ed, we should cleanup
|
||||
[EZAudio freeBufferList:bufferList];
|
||||
|
||||
}
|
||||
|
||||
// Seek the audio file back to the beginning
|
||||
[EZAudio checkResult:ExtAudioFileSeek(_audioFile,currentFramePosition)
|
||||
operation:"Failed to seek frame position within audio file"];
|
||||
_frameIndex = currentFramePosition;
|
||||
|
||||
// Once we're done send off the waveform data
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
waveformDataCompletionBlock( _waveformData, _waveformTotalBuffers );
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
-(AudioStreamBasicDescription)clientFormat {
|
||||
return _clientFormat;
|
||||
}
|
||||
|
||||
-(AudioStreamBasicDescription)fileFormat {
|
||||
return _fileFormat;
|
||||
}
|
||||
|
||||
-(SInt64)frameIndex {
|
||||
return _frameIndex;
|
||||
}
|
||||
|
||||
-(NSDictionary *)metadata
|
||||
- (instancetype)init
|
||||
{
|
||||
AudioFileID audioFileID;
|
||||
UInt32 propSize = sizeof(audioFileID);
|
||||
[EZAudio checkResult:ExtAudioFileGetProperty(_audioFile,
|
||||
kExtAudioFileProperty_AudioFile,
|
||||
&propSize,
|
||||
&audioFileID)
|
||||
operation:"Failed to get audio file id"];
|
||||
|
||||
CFDictionaryRef metadata;
|
||||
UInt32 isWritable;
|
||||
[EZAudio checkResult:AudioFileGetPropertyInfo(audioFileID,
|
||||
kAudioFilePropertyInfoDictionary,
|
||||
&propSize,
|
||||
&isWritable)
|
||||
operation:"Failed to get the size of the metadata dictionary"];
|
||||
|
||||
[EZAudio checkResult:AudioFileGetProperty(audioFileID,
|
||||
kAudioFilePropertyInfoDictionary,
|
||||
&propSize,
|
||||
&metadata)
|
||||
operation:"Failed to get metadata dictionary"];
|
||||
|
||||
return (__bridge NSDictionary *)metadata;
|
||||
}
|
||||
|
||||
-(Float32)totalDuration {
|
||||
return _totalDuration;
|
||||
}
|
||||
|
||||
-(SInt64)totalFrames {
|
||||
return _totalFrames;
|
||||
}
|
||||
|
||||
-(NSURL *)url {
|
||||
return (__bridge NSURL*)_sourceURL;
|
||||
}
|
||||
|
||||
#pragma mark - Setters
|
||||
-(void)setWaveformResolution:(UInt32)waveformResolution {
|
||||
if( _waveformResolution != waveformResolution ){
|
||||
_waveformResolution = waveformResolution;
|
||||
if( _waveformData ){
|
||||
free(_waveformData);
|
||||
_waveformData = NULL;
|
||||
self = [super init];
|
||||
if (self)
|
||||
{
|
||||
self.info = (EZAudioFileInfo *)malloc(sizeof(EZAudioFileInfo));
|
||||
self.info->permission = EZAudioFilePermissionRead;
|
||||
_floatData = NULL;
|
||||
pthread_mutex_init(&_lock, NULL);
|
||||
_waveformQueue = dispatch_queue_create(EZAudioFileWaveformDataQueueIdentifier.UTF8String, DISPATCH_QUEUE_PRIORITY_DEFAULT);
|
||||
}
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Helpers
|
||||
-(UInt32)minBuffersWithFrameRate:(UInt32)frameRate {
|
||||
frameRate = frameRate > 0 ? frameRate : 1;
|
||||
UInt32 val = (UInt32) _totalFrames / frameRate + 1;
|
||||
return MAX(1, val);
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (instancetype)initWithURL:(NSURL *)url
|
||||
{
|
||||
AudioStreamBasicDescription asbd;
|
||||
return [self initWithURL:url
|
||||
permission:EZAudioFilePermissionRead
|
||||
fileFormat:asbd];
|
||||
}
|
||||
|
||||
-(UInt32)recommendedDrawingFrameRate {
|
||||
UInt32 val = 1;
|
||||
if(_waveformResolution > 0){
|
||||
val = (UInt32) _totalFrames / _waveformResolution;
|
||||
if(val > 1)
|
||||
--val;
|
||||
}
|
||||
return MAX(1, val);
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (instancetype)initWithURL:(NSURL*)url
|
||||
permission:(EZAudioFilePermission)permission
|
||||
fileFormat:(AudioStreamBasicDescription)fileFormat
|
||||
{
|
||||
return [self initWithURL:url
|
||||
delegate:nil
|
||||
permission:permission
|
||||
fileFormat:fileFormat];
|
||||
}
|
||||
|
||||
#pragma mark - Cleanup
|
||||
-(void)dealloc {
|
||||
if( _waveformData ){
|
||||
free(_waveformData);
|
||||
_waveformData = NULL;
|
||||
}
|
||||
// if( _floatBuffers ){
|
||||
// free(_floatBuffers);
|
||||
// _floatBuffers = NULL;
|
||||
// }
|
||||
_frameIndex = 0;
|
||||
_waveformFrameRate = 0;
|
||||
_waveformTotalBuffers = 0;
|
||||
if( _audioFile ){
|
||||
[EZAudio checkResult:ExtAudioFileDispose(_audioFile)
|
||||
operation:"Failed to dispose of audio file"];
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (instancetype)initWithURL:(NSURL*)url
|
||||
delegate:(id<EZAudioFileDelegate>)delegate
|
||||
permission:(EZAudioFilePermission)permission
|
||||
fileFormat:(AudioStreamBasicDescription)fileFormat
|
||||
{
|
||||
return [self initWithURL:url
|
||||
delegate:delegate
|
||||
permission:permission
|
||||
fileFormat:fileFormat
|
||||
clientFormat:[self.class defaultClientFormat]];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (instancetype)initWithURL:(NSURL*)url
|
||||
delegate:(id<EZAudioFileDelegate>)delegate
|
||||
permission:(EZAudioFilePermission)permission
|
||||
fileFormat:(AudioStreamBasicDescription)fileFormat
|
||||
clientFormat:(AudioStreamBasicDescription)clientFormat
|
||||
{
|
||||
self = [self init];
|
||||
if(self)
|
||||
{
|
||||
self.info->clientFormat = clientFormat;
|
||||
self.info->fileFormat = fileFormat;
|
||||
self.info->permission = permission;
|
||||
self.info->sourceURL = (__bridge CFURLRef)url;
|
||||
self.delegate = delegate;
|
||||
[self setup];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Class Initializers
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
+ (instancetype)audioFileWithURL:(NSURL*)url
|
||||
{
|
||||
return [[self alloc] initWithURL:url];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
+ (instancetype)audioFileWithURL:(NSURL*)url
|
||||
permission:(EZAudioFilePermission)permission
|
||||
fileFormat:(AudioStreamBasicDescription)fileFormat
|
||||
{
|
||||
return [[self alloc] initWithURL:url
|
||||
permission:permission
|
||||
fileFormat:fileFormat];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
+ (instancetype)audioFileWithURL:(NSURL*)url
|
||||
delegate:(id<EZAudioFileDelegate>)delegate
|
||||
permission:(EZAudioFilePermission)permission
|
||||
fileFormat:(AudioStreamBasicDescription)fileFormat
|
||||
{
|
||||
return [[self alloc] initWithURL:url
|
||||
delegate:delegate
|
||||
permission:permission
|
||||
fileFormat:fileFormat];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
+ (instancetype)audioFileWithURL:(NSURL*)url
|
||||
delegate:(id<EZAudioFileDelegate>)delegate
|
||||
permission:(EZAudioFilePermission)permission
|
||||
fileFormat:(AudioStreamBasicDescription)fileFormat
|
||||
clientFormat:(AudioStreamBasicDescription)clientFormat
|
||||
{
|
||||
return [[self alloc] initWithURL:url
|
||||
delegate:delegate
|
||||
permission:permission
|
||||
fileFormat:fileFormat
|
||||
clientFormat:clientFormat];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Class Methods
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
+ (AudioStreamBasicDescription)defaultClientFormat
|
||||
{
|
||||
return [EZAudioUtilities stereoFloatNonInterleavedFormatWithSampleRate:44100];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
+ (NSArray *)supportedAudioFileTypes
|
||||
{
|
||||
return @[
|
||||
@"aac",
|
||||
@"caf",
|
||||
@"aif",
|
||||
@"aiff",
|
||||
@"aifc",
|
||||
@"mp3",
|
||||
@"mp4",
|
||||
@"m4a",
|
||||
@"snd",
|
||||
@"au",
|
||||
@"sd2",
|
||||
@"wav"
|
||||
];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Setup
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)setup
|
||||
{
|
||||
// we open the file differently depending on the permissions specified
|
||||
[EZAudioUtilities checkResult:[self openAudioFile]
|
||||
operation:"Failed to create/open audio file"];
|
||||
|
||||
// set the client format
|
||||
self.clientFormat = self.info->clientFormat;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Creating/Opening Audio File
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (OSStatus)openAudioFile
|
||||
{
|
||||
// need a source url
|
||||
NSAssert(self.info->sourceURL, @"EZAudioFile cannot be created without a source url!");
|
||||
|
||||
// determine if the file actually exists
|
||||
CFURLRef url = self.info->sourceURL;
|
||||
NSURL *fileURL = (__bridge NSURL *)(url);
|
||||
BOOL fileExists = [[NSFileManager defaultManager] fileExistsAtPath:fileURL.path];
|
||||
|
||||
// create the file wrapper slightly differently depending what we are
|
||||
// trying to do with it
|
||||
OSStatus result = noErr;
|
||||
EZAudioFilePermission permission = self.info->permission;
|
||||
UInt32 propSize;
|
||||
if (fileExists)
|
||||
{
|
||||
result = AudioFileOpenURL(url,
|
||||
permission,
|
||||
0,
|
||||
&self.info->audioFileID);
|
||||
[EZAudioUtilities checkResult:result
|
||||
operation:"failed to open audio file"];
|
||||
}
|
||||
else
|
||||
{
|
||||
// read permission is not applicable because the file does not exist
|
||||
if (permission == EZAudioFilePermissionRead)
|
||||
{
|
||||
result = EZAudioFileReadPermissionFileDoesNotExistCode;
|
||||
}
|
||||
else
|
||||
{
|
||||
result = AudioFileCreateWithURL(url,
|
||||
0,
|
||||
&self.info->fileFormat,
|
||||
kAudioFileFlags_EraseFile,
|
||||
&self.info->audioFileID);
|
||||
}
|
||||
}
|
||||
|
||||
// get the ExtAudioFile wrapper
|
||||
if (result == noErr)
|
||||
{
|
||||
[EZAudioUtilities checkResult:ExtAudioFileWrapAudioFileID(self.info->audioFileID,
|
||||
false,
|
||||
&self.info->extAudioFileRef)
|
||||
operation:"Failed to wrap audio file ID in ext audio file ref"];
|
||||
}
|
||||
|
||||
// store the file format if we opened an existing file
|
||||
if (fileExists)
|
||||
{
|
||||
propSize = sizeof(self.info->fileFormat);
|
||||
[EZAudioUtilities checkResult:ExtAudioFileGetProperty(self.info->extAudioFileRef,
|
||||
kExtAudioFileProperty_FileDataFormat,
|
||||
&propSize,
|
||||
&self.info->fileFormat)
|
||||
operation:"Failed to get file audio format on existing audio file"];
|
||||
}
|
||||
|
||||
// done
|
||||
return result;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Events
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)readFrames:(UInt32)frames
|
||||
audioBufferList:(AudioBufferList *)audioBufferList
|
||||
bufferSize:(UInt32 *)bufferSize
|
||||
eof:(BOOL *)eof
|
||||
{
|
||||
if (pthread_mutex_trylock(&_lock) == 0)
|
||||
{
|
||||
// perform read
|
||||
[EZAudioUtilities checkResult:ExtAudioFileRead(self.info->extAudioFileRef,
|
||||
&frames,
|
||||
audioBufferList)
|
||||
operation:"Failed to read audio data from file"];
|
||||
*bufferSize = frames;
|
||||
*eof = frames == 0;
|
||||
|
||||
// notify delegate
|
||||
if ([self.delegate respondsToSelector:@selector(audioFile:updatedPosition:)])
|
||||
{
|
||||
[self.delegate audioFile:self
|
||||
updatedPosition:self.frameIndex];
|
||||
}
|
||||
|
||||
// convert into float data
|
||||
[self.floatConverter convertDataFromAudioBufferList:audioBufferList
|
||||
withNumberOfFrames:*bufferSize
|
||||
toFloatBuffers:self.floatData];
|
||||
|
||||
if ([self.delegate respondsToSelector:@selector(audioFile:readAudio:withBufferSize:withNumberOfChannels:)])
|
||||
{
|
||||
UInt32 channels = self.clientFormat.mChannelsPerFrame;
|
||||
[self.delegate audioFile:self
|
||||
readAudio:self.floatData
|
||||
withBufferSize:*bufferSize
|
||||
withNumberOfChannels:channels];
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&_lock);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)seekToFrame:(SInt64)frame
|
||||
{
|
||||
if (pthread_mutex_trylock(&_lock) == 0)
|
||||
{
|
||||
[EZAudioUtilities checkResult:ExtAudioFileSeek(self.info->extAudioFileRef,
|
||||
frame)
|
||||
operation:"Failed to seek frame position within audio file"];
|
||||
|
||||
pthread_mutex_unlock(&_lock);
|
||||
|
||||
// notify delegate
|
||||
if ([self.delegate respondsToSelector:@selector(audioFile:updatedPosition:)])
|
||||
{
|
||||
[self.delegate audioFile:self
|
||||
updatedPosition:self.frameIndex];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Getters
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (AudioStreamBasicDescription)floatFormat
|
||||
{
|
||||
return [EZAudioUtilities stereoFloatNonInterleavedFormatWithSampleRate:44100];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (EZAudioFloatData *)getWaveformData
|
||||
{
|
||||
return [self getWaveformDataWithNumberOfPoints:EZAudioFileWaveformDefaultResolution];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (EZAudioFloatData *)getWaveformDataWithNumberOfPoints:(UInt32)numberOfPoints
|
||||
{
|
||||
EZAudioFloatData *waveformData;
|
||||
if (pthread_mutex_trylock(&_lock) == 0)
|
||||
{
|
||||
// store current frame
|
||||
SInt64 currentFrame = self.frameIndex;
|
||||
UInt32 channels = self.clientFormat.mChannelsPerFrame;
|
||||
BOOL interleaved = [EZAudioUtilities isInterleaved:self.clientFormat];
|
||||
SInt64 totalFrames = self.totalClientFrames;
|
||||
SInt64 framesPerBuffer = ((SInt64) totalFrames / numberOfPoints);
|
||||
SInt64 framesPerChannel = framesPerBuffer / channels;
|
||||
float **data = (float **)malloc( sizeof(float *) * channels );
|
||||
for (int i = 0; i < channels; i++)
|
||||
{
|
||||
data[i] = (float *)malloc( sizeof(float) * numberOfPoints );
|
||||
}
|
||||
|
||||
// seek to 0
|
||||
[EZAudioUtilities checkResult:ExtAudioFileSeek(self.info->extAudioFileRef,
|
||||
0)
|
||||
operation:"Failed to seek frame position within audio file"];
|
||||
|
||||
// allocate an audio buffer list
|
||||
AudioBufferList *audioBufferList = [EZAudioUtilities audioBufferListWithNumberOfFrames:(UInt32)totalFrames
|
||||
numberOfChannels:self.info->clientFormat.mChannelsPerFrame
|
||||
interleaved:interleaved];
|
||||
|
||||
UInt32 bufferSize = (UInt32)totalFrames;
|
||||
[EZAudioUtilities checkResult:ExtAudioFileRead(self.info->extAudioFileRef,
|
||||
&bufferSize,
|
||||
audioBufferList)
|
||||
operation:"Failed to read audio data from file waveform"];
|
||||
|
||||
// read through file and calculate rms at each point
|
||||
SInt64 offset = 0;
|
||||
for (SInt64 i = 0; i < numberOfPoints; i++)
|
||||
{
|
||||
float buffer[framesPerBuffer];
|
||||
if (interleaved)
|
||||
{
|
||||
float *samples = (float *)audioBufferList->mBuffers[0].mData;
|
||||
memcpy(buffer, &samples[offset], (size_t)framesPerBuffer * sizeof(float));
|
||||
for (int channel = 0; channel < channels; channel++)
|
||||
{
|
||||
float channelData[framesPerChannel];
|
||||
for (int frame = 0; frame < framesPerChannel; frame++)
|
||||
{
|
||||
channelData[frame] = buffer[frame * channels + channel];
|
||||
}
|
||||
float rms = [EZAudioUtilities RMS:channelData length:(UInt32)framesPerChannel];
|
||||
data[channel][i] = rms;
|
||||
}
|
||||
offset += channels * framesPerBuffer;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int channel = 0; channel < channels; channel++)
|
||||
{
|
||||
float *samples = (float *)audioBufferList->mBuffers[channel].mData;
|
||||
memcpy(buffer, &samples[offset], (size_t)framesPerBuffer * sizeof(float));
|
||||
float rms = [EZAudioUtilities RMS:buffer length:(UInt32)framesPerBuffer];
|
||||
data[channel][i] = rms;
|
||||
}
|
||||
offset += framesPerBuffer;
|
||||
}
|
||||
}
|
||||
|
||||
// clean up
|
||||
[EZAudioUtilities freeBufferList:audioBufferList];
|
||||
|
||||
// seek back to previous position
|
||||
[EZAudioUtilities checkResult:ExtAudioFileSeek(self.info->extAudioFileRef,
|
||||
currentFrame)
|
||||
operation:"Failed to seek frame position within audio file"];
|
||||
|
||||
pthread_mutex_unlock(&_lock);
|
||||
|
||||
waveformData = [EZAudioFloatData dataWithNumberOfChannels:channels
|
||||
buffers:(float **)data
|
||||
bufferSize:numberOfPoints];
|
||||
|
||||
// cleanup
|
||||
[EZAudioUtilities freeFloatBuffers:data
|
||||
numberOfChannels:channels];
|
||||
}
|
||||
return waveformData;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)getWaveformDataWithCompletionBlock:(WaveformDataCompletionBlock)waveformDataCompletionBlock
|
||||
{
|
||||
[self getWaveformDataWithNumberOfPoints:EZAudioFileWaveformDefaultResolution
|
||||
completion:waveformDataCompletionBlock];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)getWaveformDataWithNumberOfPoints:(UInt32)numberOfPoints
|
||||
completion:(WaveformDataCompletionBlock)completion
|
||||
{
|
||||
if (!completion)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// async get waveform data
|
||||
__weak EZAudioFile *weakSelf = self;
|
||||
dispatch_async(self.waveformQueue, ^{
|
||||
EZAudioFloatData *waveformData = [weakSelf getWaveformDataWithNumberOfPoints:numberOfPoints];
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
completion(waveformData);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (AudioStreamBasicDescription)clientFormat
|
||||
{
|
||||
return self.info->clientFormat;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (AudioStreamBasicDescription)fileFormat
|
||||
{
|
||||
return self.info->fileFormat;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (SInt64)frameIndex
|
||||
{
|
||||
SInt64 frameIndex;
|
||||
[EZAudioUtilities checkResult:ExtAudioFileTell(self.info->extAudioFileRef, &frameIndex)
|
||||
operation:"Failed to get frame index"];
|
||||
return frameIndex;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (NSDictionary *)metadata
|
||||
{
|
||||
// get size of metadata property (dictionary)
|
||||
UInt32 propSize = sizeof(self.info->audioFileID);
|
||||
CFDictionaryRef metadata;
|
||||
UInt32 writable;
|
||||
[EZAudioUtilities checkResult:AudioFileGetPropertyInfo(self.info->audioFileID,
|
||||
kAudioFilePropertyInfoDictionary,
|
||||
&propSize,
|
||||
&writable)
|
||||
operation:"Failed to get the size of the metadata dictionary"];
|
||||
|
||||
// pull metadata
|
||||
[EZAudioUtilities checkResult:AudioFileGetProperty(self.info->audioFileID,
|
||||
kAudioFilePropertyInfoDictionary,
|
||||
&propSize,
|
||||
&metadata)
|
||||
operation:"Failed to get metadata dictionary"];
|
||||
|
||||
// cast to NSDictionary
|
||||
return (__bridge NSDictionary*)metadata;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (NSTimeInterval)totalDuration
|
||||
{
|
||||
SInt64 totalFrames = [self totalFrames];
|
||||
return (NSTimeInterval) totalFrames / self.info->fileFormat.mSampleRate;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (SInt64)totalClientFrames
|
||||
{
|
||||
SInt64 totalFrames = [self totalFrames];
|
||||
|
||||
// check sample rate of client vs file format
|
||||
AudioStreamBasicDescription clientFormat = self.info->clientFormat;
|
||||
AudioStreamBasicDescription fileFormat = self.info->fileFormat;
|
||||
BOOL sameSampleRate = clientFormat.mSampleRate == fileFormat.mSampleRate;
|
||||
if (!sameSampleRate)
|
||||
{
|
||||
NSTimeInterval duration = [self totalDuration];
|
||||
totalFrames = duration * clientFormat.mSampleRate;
|
||||
}
|
||||
|
||||
return totalFrames;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (SInt64)totalFrames
|
||||
{
|
||||
SInt64 totalFrames;
|
||||
UInt32 size = sizeof(SInt64);
|
||||
[EZAudioUtilities checkResult:ExtAudioFileGetProperty(self.info->extAudioFileRef,
|
||||
kExtAudioFileProperty_FileLengthFrames,
|
||||
&size,
|
||||
&totalFrames)
|
||||
operation:"Failed to get total frames"];
|
||||
return totalFrames;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (NSURL*)url
|
||||
{
|
||||
return (__bridge NSURL*)self.info->sourceURL;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Setters
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)setClientFormat:(AudioStreamBasicDescription)clientFormat
|
||||
{
|
||||
NSAssert([EZAudioUtilities isLinearPCM:clientFormat], @"Client format must be linear PCM");
|
||||
|
||||
// store the client format
|
||||
self.info->clientFormat = clientFormat;
|
||||
|
||||
// set the client format on the extended audio file ref
|
||||
[EZAudioUtilities checkResult:ExtAudioFileSetProperty(self.info->extAudioFileRef,
|
||||
kExtAudioFileProperty_ClientDataFormat,
|
||||
sizeof(clientFormat),
|
||||
&clientFormat)
|
||||
operation:"Couldn't set client data format on file"];
|
||||
|
||||
// create a new float converter using the client format as the input format
|
||||
self.floatConverter = [EZAudioFloatConverter converterWithInputFormat:clientFormat];
|
||||
|
||||
UInt32 maxPacketSize;
|
||||
UInt32 propSize = sizeof(maxPacketSize);
|
||||
[EZAudioUtilities checkResult:ExtAudioFileGetProperty(self.info->extAudioFileRef,
|
||||
kExtAudioFileProperty_ClientMaxPacketSize,
|
||||
&propSize,
|
||||
&maxPacketSize)
|
||||
operation:"Failed to get max packet size"];
|
||||
|
||||
|
||||
|
||||
// figure out what the max packet size is
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
self.floatData = [EZAudioUtilities floatBuffersWithNumberOfFrames:1024
|
||||
numberOfChannels:self.clientFormat.mChannelsPerFrame];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
-(void)dealloc
|
||||
{
|
||||
pthread_mutex_destroy(&_lock);
|
||||
[EZAudioUtilities freeFloatBuffers:self.floatData numberOfChannels:self.clientFormat.mChannelsPerFrame];
|
||||
[EZAudioUtilities checkResult:AudioFileClose(self.info->audioFileID) operation:"Failed to close audio file"];
|
||||
[EZAudioUtilities checkResult:ExtAudioFileDispose(self.info->extAudioFileRef) operation:"Failed to dispose of ext audio file"];
|
||||
free(self.info);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@end
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
//
|
||||
// EZAudioFloatConverter.h
|
||||
// EZAudioPlayFileExample
|
||||
//
|
||||
// Created by Syed Haris Ali on 2/14/15.
|
||||
// Copyright (c) 2015 Syed Haris Ali. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <AudioToolbox/AudioToolbox.h>
|
||||
|
||||
FOUNDATION_EXPORT UInt32 EZAudioFloatConverterDefaultPacketSize;
|
||||
|
||||
@interface EZAudioFloatConverter : NSObject
|
||||
|
||||
+ (instancetype)converterWithInputFormat:(AudioStreamBasicDescription)inputFormat;
|
||||
|
||||
@property (nonatomic, assign, readonly) AudioStreamBasicDescription inputFormat;
|
||||
@property (nonatomic, assign, readonly) AudioStreamBasicDescription floatFormat;
|
||||
|
||||
- (instancetype)initWithInputFormat:(AudioStreamBasicDescription)inputFormat;
|
||||
- (void)convertDataFromAudioBufferList:(AudioBufferList *)audioBufferList
|
||||
withNumberOfFrames:(UInt32)frames
|
||||
toFloatBuffers:(float **)buffers;
|
||||
- (void)convertDataFromAudioBufferList:(AudioBufferList *)audioBufferList
|
||||
withNumberOfFrames:(UInt32)frames
|
||||
toFloatBuffers:(float **)buffers
|
||||
packetDescriptions:(AudioStreamPacketDescription *)packetDescriptions;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,193 @@
|
||||
//
|
||||
// EZAudioFloatConverter.m
|
||||
// EZAudioPlayFileExample
|
||||
//
|
||||
// Created by Syed Haris Ali on 2/14/15.
|
||||
// Copyright (c) 2015 Syed Haris Ali. All rights reserved.
|
||||
//
|
||||
|
||||
#import "EZAudioFloatConverter.h"
|
||||
|
||||
#import "EZAudioUtilities.h"
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
static UInt32 EZAudioFloatConverterDefaultOutputBufferSize = 128 * 32;
|
||||
UInt32 EZAudioFloatConverterDefaultPacketSize = 2048;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
typedef struct
|
||||
{
|
||||
AudioConverterRef converterRef;
|
||||
AudioBufferList *floatAudioBufferList;
|
||||
AudioStreamBasicDescription inputFormat;
|
||||
AudioStreamBasicDescription outputFormat;
|
||||
AudioStreamPacketDescription *packetDescriptions;
|
||||
UInt32 packetsPerBuffer;
|
||||
} EZAudioFloatConverterInfo;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
OSStatus EZAudioFloatConverterCallback(AudioConverterRef inAudioConverter,
|
||||
UInt32 *ioNumberDataPackets,
|
||||
AudioBufferList *ioData,
|
||||
AudioStreamPacketDescription **outDataPacketDescription,
|
||||
void *inUserData)
|
||||
{
|
||||
AudioBufferList *sourceBuffer = (AudioBufferList *)inUserData;
|
||||
memcpy(ioData,
|
||||
sourceBuffer,
|
||||
sizeof(AudioBufferList) + (sourceBuffer->mNumberBuffers - 1)*sizeof(AudioBuffer));
|
||||
return noErr;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@interface EZAudioFloatConverter ()
|
||||
@property (nonatomic, assign) EZAudioFloatConverterInfo info;
|
||||
@end
|
||||
|
||||
@implementation EZAudioFloatConverter
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Class Methods
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
+ (instancetype)converterWithInputFormat:(AudioStreamBasicDescription)inputFormat
|
||||
{
|
||||
return [[self alloc] initWithInputFormat:inputFormat];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Dealloc
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
free(self.info.packetDescriptions);
|
||||
[EZAudioUtilities freeBufferList:self.info.floatAudioBufferList];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Initialization
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (instancetype)initWithInputFormat:(AudioStreamBasicDescription)inputFormat
|
||||
{
|
||||
self = [super init];
|
||||
if (self)
|
||||
{
|
||||
EZAudioFloatConverterInfo info;
|
||||
memset(&info, 0, sizeof(info));
|
||||
info.inputFormat = inputFormat;
|
||||
info.outputFormat = [EZAudioUtilities floatFormatWithNumberOfChannels:inputFormat.mChannelsPerFrame
|
||||
sampleRate:inputFormat.mSampleRate];
|
||||
|
||||
// get max packets per buffer so you can allocate a proper AudioBufferList
|
||||
UInt32 packetsPerBuffer = 0;
|
||||
UInt32 outputBufferSize = EZAudioFloatConverterDefaultOutputBufferSize;
|
||||
UInt32 sizePerPacket = info.inputFormat.mBytesPerPacket;
|
||||
BOOL isVBR = sizePerPacket == 0;
|
||||
|
||||
// VBR
|
||||
if (isVBR)
|
||||
{
|
||||
// determine the max output buffer size
|
||||
UInt32 maxOutputPacketSize;
|
||||
UInt32 propSize = sizeof(maxOutputPacketSize);
|
||||
OSStatus result = AudioConverterGetProperty(info.converterRef,
|
||||
kAudioConverterPropertyMaximumOutputPacketSize,
|
||||
&propSize,
|
||||
&maxOutputPacketSize);
|
||||
if (result != noErr)
|
||||
{
|
||||
maxOutputPacketSize = EZAudioFloatConverterDefaultPacketSize;
|
||||
}
|
||||
|
||||
// set the output buffer size to at least the max output size
|
||||
if (maxOutputPacketSize > outputBufferSize)
|
||||
{
|
||||
outputBufferSize = maxOutputPacketSize;
|
||||
}
|
||||
packetsPerBuffer = outputBufferSize / maxOutputPacketSize;
|
||||
|
||||
// allocate memory for the packet descriptions
|
||||
info.packetDescriptions = (AudioStreamPacketDescription *)malloc(sizeof(AudioStreamPacketDescription) * packetsPerBuffer);
|
||||
}
|
||||
else
|
||||
{
|
||||
packetsPerBuffer = outputBufferSize / sizePerPacket;
|
||||
}
|
||||
info.packetsPerBuffer = packetsPerBuffer;
|
||||
|
||||
// allocate the AudioBufferList to hold the float values
|
||||
BOOL isInterleaved = [EZAudioUtilities isInterleaved:info.outputFormat];
|
||||
info.floatAudioBufferList = [EZAudioUtilities audioBufferListWithNumberOfFrames:packetsPerBuffer
|
||||
numberOfChannels:info.outputFormat.mChannelsPerFrame
|
||||
interleaved:isInterleaved];
|
||||
|
||||
self.info = info;
|
||||
[self setup];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Setup
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)setup
|
||||
{
|
||||
// create a new instance of the audio converter
|
||||
[EZAudioUtilities checkResult:AudioConverterNew(&_info.inputFormat,
|
||||
&_info.outputFormat,
|
||||
&_info.converterRef)
|
||||
operation:"Failed to create new audio converter"];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Events
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)convertDataFromAudioBufferList:(AudioBufferList *)audioBufferList
|
||||
withNumberOfFrames:(UInt32)frames
|
||||
toFloatBuffers:(float **)buffers
|
||||
{
|
||||
[self convertDataFromAudioBufferList:audioBufferList
|
||||
withNumberOfFrames:frames
|
||||
toFloatBuffers:buffers
|
||||
packetDescriptions:self.info.packetDescriptions];
|
||||
}
|
||||
|
||||
- (void)convertDataFromAudioBufferList:(AudioBufferList *)audioBufferList
|
||||
withNumberOfFrames:(UInt32)frames
|
||||
toFloatBuffers:(float **)buffers
|
||||
packetDescriptions:(AudioStreamPacketDescription *)packetDescriptions
|
||||
{
|
||||
EZAudioFloatConverterInfo info = self.info;
|
||||
if (frames == 0)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
[EZAudioUtilities checkResult:AudioConverterFillComplexBuffer(info.converterRef,
|
||||
EZAudioFloatConverterCallback,
|
||||
audioBufferList,
|
||||
&frames,
|
||||
info.floatAudioBufferList,
|
||||
packetDescriptions ? packetDescriptions : info.packetDescriptions)
|
||||
operation:"Failed to fill complex buffer in float converter"];
|
||||
for (int i = 0; i < info.floatAudioBufferList->mNumberBuffers; i++)
|
||||
{
|
||||
memcpy(buffers[i],
|
||||
info.floatAudioBufferList->mBuffers[i].mData,
|
||||
info.floatAudioBufferList->mBuffers[i].mDataByteSize);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,35 @@
|
||||
//
|
||||
// EZAudioFloatData.h
|
||||
// EZAudioPlayFileExample
|
||||
//
|
||||
// Created by Syed Haris Ali on 2/14/15.
|
||||
// Copyright (c) 2015 Syed Haris Ali. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - EZAudioFloatData
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@interface EZAudioFloatData : NSObject
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
+ (instancetype) dataWithNumberOfChannels:(int)numberOfChannels
|
||||
buffers:(float **)buffers
|
||||
bufferSize:(UInt32)bufferSize;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@property (nonatomic, assign, readonly) int numberOfChannels;
|
||||
@property (nonatomic, assign, readonly) float **buffers;
|
||||
@property (nonatomic, assign, readonly) UInt32 bufferSize;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (float *) bufferForChannel:(int)channel;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,71 @@
|
||||
//
|
||||
// EZAudioFloatData.m
|
||||
// EZAudioPlayFileExample
|
||||
//
|
||||
// Created by Syed Haris Ali on 2/14/15.
|
||||
// Copyright (c) 2015 Syed Haris Ali. All rights reserved.
|
||||
//
|
||||
|
||||
#import "EZAudioFloatData.h"
|
||||
#import "EZAudioUtilities.h"
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - EZAudioFloatData
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@interface EZAudioFloatData ()
|
||||
@property (nonatomic, assign, readwrite) int numberOfChannels;
|
||||
@property (nonatomic, assign, readwrite) float **buffers;
|
||||
@property (nonatomic, assign, readwrite) UInt32 bufferSize;
|
||||
@end
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@implementation EZAudioFloatData
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[EZAudioUtilities freeFloatBuffers:self.buffers
|
||||
numberOfChannels:self.numberOfChannels];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
+ (instancetype)dataWithNumberOfChannels:(int)numberOfChannels
|
||||
buffers:(float **)buffers
|
||||
bufferSize:(UInt32)bufferSize
|
||||
{
|
||||
id waveformData = [[self alloc] init];
|
||||
|
||||
size_t size = sizeof(float) * bufferSize;
|
||||
float **buffersCopy = [EZAudioUtilities floatBuffersWithNumberOfFrames:bufferSize
|
||||
numberOfChannels:numberOfChannels];
|
||||
for (int i = 0; i < numberOfChannels; i++)
|
||||
{
|
||||
memcpy(buffersCopy[i], buffers[i], size);
|
||||
}
|
||||
|
||||
((EZAudioFloatData *)waveformData).buffers = buffersCopy;
|
||||
((EZAudioFloatData *)waveformData).bufferSize = bufferSize;
|
||||
((EZAudioFloatData *)waveformData).numberOfChannels = numberOfChannels;
|
||||
|
||||
return waveformData;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (float *)bufferForChannel:(int)channel
|
||||
{
|
||||
float *buffer = NULL;
|
||||
if (channel < self.numberOfChannels)
|
||||
{
|
||||
buffer = self.buffers[channel];
|
||||
}
|
||||
return buffer;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@end
|
||||
+17
-8
@@ -76,7 +76,12 @@
|
||||
self = [super init];
|
||||
if(self){
|
||||
[self _configureAudioPlayer];
|
||||
self.audioFile = [EZAudioFile audioFileWithURL:url andDelegate:self];
|
||||
|
||||
AudioStreamBasicDescription asbd;
|
||||
self.audioFile = [EZAudioFile audioFileWithURL:url
|
||||
delegate:self
|
||||
permission:EZAudioFilePermissionRead
|
||||
fileFormat:asbd];
|
||||
self.audioPlayerDelegate = audioPlayerDelegate;
|
||||
}
|
||||
return self;
|
||||
@@ -143,11 +148,11 @@
|
||||
|
||||
-(float)currentTime {
|
||||
NSAssert(_audioFile,@"No audio file to perform the seek on, check that EZAudioFile is not nil");
|
||||
return [EZAudio MAP:self.audioFile.frameIndex
|
||||
leftMin:0
|
||||
leftMax:self.audioFile.totalFrames
|
||||
rightMin:0
|
||||
rightMax:self.audioFile.totalDuration];
|
||||
return [EZAudioUtilities MAP:self.audioFile.frameIndex
|
||||
leftMin:0
|
||||
leftMax:self.audioFile.totalFrames
|
||||
rightMin:0
|
||||
rightMax:self.audioFile.totalDuration];
|
||||
}
|
||||
|
||||
-(BOOL)endOfFile {
|
||||
@@ -186,10 +191,14 @@
|
||||
#pragma mark - Setters
|
||||
-(void)setAudioFile:(EZAudioFile *)audioFile {
|
||||
if( _audioFile ){
|
||||
_audioFile.audioFileDelegate = nil;
|
||||
_audioFile.delegate = nil;
|
||||
}
|
||||
AudioStreamBasicDescription asbd;
|
||||
_eof = NO;
|
||||
_audioFile = [EZAudioFile audioFileWithURL:audioFile.url andDelegate:self];
|
||||
_audioFile = [EZAudioFile audioFileWithURL:audioFile.url
|
||||
delegate:self
|
||||
permission:EZAudioFilePermissionRead
|
||||
fileFormat:asbd];
|
||||
NSAssert(_output,@"No output was found, this should by default be the EZOutput shared instance");
|
||||
[_output setAudioStreamBasicDescription:self.audioFile.clientFormat];
|
||||
}
|
||||
|
||||
+26
-9
@@ -23,13 +23,14 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#import <QuartzCore/QuartzCore.h>
|
||||
#import "TargetConditionals.h"
|
||||
#import "EZAudioUtilities.h"
|
||||
#import "EZPlot.h"
|
||||
|
||||
@class EZAudio;
|
||||
|
||||
#define kEZAudioPlotMaxHistoryBufferLength (8192)
|
||||
|
||||
#define kEZAudioPlotDefaultHistoryBufferLength (1024)
|
||||
|
||||
/**
|
||||
@@ -46,18 +47,25 @@
|
||||
|
||||
*/
|
||||
@interface EZAudioPlot : EZPlot
|
||||
{
|
||||
CGPoint *plotData;
|
||||
UInt32 plotLength;
|
||||
}
|
||||
|
||||
/**
|
||||
This property optimizes the audio plot drawing for real-time displays. Since the update function may be updating the plot's data very quickly (over 60 frames per second) this property will throttle the drawing calls to be 60 frames per second (or whatever the screen rate is).
|
||||
*/
|
||||
@property (nonatomic, assign) BOOL optimizeForRealtimePlot;
|
||||
@property (nonatomic, assign) BOOL centerYAxis;
|
||||
@property (nonatomic, assign) CGPoint waveformLayerCenter;
|
||||
@property (nonatomic, strong) CAShapeLayer *waveformLayer;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Adjust Resolution
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
///-----------------------------------------------------------
|
||||
/// @name Adjusting The Resolution
|
||||
///-----------------------------------------------------------
|
||||
|
||||
/**
|
||||
Sets the length of the rolling history display. Can grow or shrink the display up to the maximum size specified by the kEZAudioPlotMaxHistoryBufferLength macro. Will return the actual set value, which will be either the given value if smaller than the kEZAudioPlotMaxHistoryBufferLength or kEZAudioPlotMaxHistoryBufferLength if a larger value is attempted to be set.
|
||||
The length of the rolling history display. Can grow or shrink the display up to the maximum size specified by the kEZAudioPlotMaxHistoryBufferLength macro. Will return the actual set value, which will be either the given value if smaller than the kEZAudioPlotMaxHistoryBufferLength or kEZAudioPlotMaxHistoryBufferLength if a larger value is attempted to be set.
|
||||
@param historyLength The new length of the rolling history buffer.
|
||||
@return The new value equal to the historyLength or the kEZAudioPlotMaxHistoryBufferLength.
|
||||
*/
|
||||
@@ -69,12 +77,21 @@
|
||||
*/
|
||||
-(int)rollingHistoryLength;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Subclass Methods
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
///-----------------------------------------------------------
|
||||
/// @name Subclass Methods
|
||||
///-----------------------------------------------------------
|
||||
|
||||
- (void)redraw;
|
||||
|
||||
/**
|
||||
<#Description#>
|
||||
@param data <#theplotData description#>
|
||||
@param length <#length description#>
|
||||
Main method used to copy the sample data from the source buffer and update the
|
||||
plot. Subclasses can overwrite this method for custom behavior.
|
||||
@param data A float array of the sample data. Subclasses should copy this data to a separate array to avoid threading issues.
|
||||
@param length The length of the float array as an int.
|
||||
*/
|
||||
-(void)setSampleData:(float *)data
|
||||
length:(int)length;
|
||||
|
||||
+286
-252
@@ -24,275 +24,309 @@
|
||||
// THE SOFTWARE.
|
||||
|
||||
#import "EZAudioPlot.h"
|
||||
#import "EZAudioDisplayLink.h"
|
||||
|
||||
#import "EZAudio.h"
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Structures
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@interface EZAudioPlot () {
|
||||
// BOOL _hasData;
|
||||
// TPCircularBuffer _historyBuffer;
|
||||
typedef struct
|
||||
{
|
||||
float *buffer;
|
||||
int bufferSize;
|
||||
TPCircularBuffer circularBuffer;
|
||||
} EZAudioPlotHistoryInfo;
|
||||
|
||||
// Rolling History
|
||||
BOOL _setMaxLength;
|
||||
float *_scrollHistory;
|
||||
int _scrollHistoryIndex;
|
||||
UInt32 _scrollHistoryLength;
|
||||
BOOL _changingHistorySize;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Types
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
typedef CGRect EZRect;
|
||||
#elif TARGET_OS_MAC
|
||||
typedef NSRect EZRect;
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - EZAudioPlot
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@interface EZAudioPlot () <EZAudioDisplayLinkDelegate>
|
||||
@property (nonatomic, strong) EZAudioDisplayLink *displayLink;
|
||||
@property (nonatomic, assign) EZAudioPlotHistoryInfo *historyInfo;
|
||||
@property (nonatomic, assign) CGPoint *points;
|
||||
@property (nonatomic, assign) UInt32 pointCount;
|
||||
@end
|
||||
|
||||
@implementation EZAudioPlot
|
||||
@synthesize backgroundColor = _backgroundColor;
|
||||
@synthesize color = _color;
|
||||
@synthesize gain = _gain;
|
||||
@synthesize plotType = _plotType;
|
||||
@synthesize shouldFill = _shouldFill;
|
||||
@synthesize shouldMirror = _shouldMirror;
|
||||
|
||||
#pragma mark - Initialization
|
||||
-(id)init {
|
||||
self = [super init];
|
||||
if(self){
|
||||
[self initPlot];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Dealloc
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
-(id)initWithCoder:(NSCoder *)aDecoder {
|
||||
self = [super initWithCoder:aDecoder];
|
||||
if(self){
|
||||
[self initPlot];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
-(id)initWithFrame:(CGRect)frameRect {
|
||||
#elif TARGET_OS_MAC
|
||||
-(id)initWithFrame:(NSRect)frameRect {
|
||||
#endif
|
||||
self = [super initWithFrame:frameRect];
|
||||
if(self){
|
||||
[self initPlot];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(void)initPlot {
|
||||
#if TARGET_OS_IPHONE
|
||||
self.backgroundColor = [UIColor blackColor];
|
||||
self.color = [UIColor colorWithHue:0 saturation:1.0 brightness:1.0 alpha:1.0];
|
||||
#elif TARGET_OS_MAC
|
||||
self.backgroundColor = [NSColor blackColor];
|
||||
self.color = [NSColor colorWithCalibratedHue:0 saturation:1.0 brightness:1.0 alpha:1.0];
|
||||
#endif
|
||||
self.gain = 1.0;
|
||||
self.plotType = EZPlotTypeRolling;
|
||||
self.shouldMirror = NO;
|
||||
self.shouldFill = NO;
|
||||
plotData = NULL;
|
||||
_scrollHistory = NULL;
|
||||
_scrollHistoryLength = kEZAudioPlotDefaultHistoryBufferLength;
|
||||
}
|
||||
|
||||
#pragma mark - Setters
|
||||
-(void)setBackgroundColor:(id)backgroundColor {
|
||||
_backgroundColor = backgroundColor;
|
||||
[self _refreshDisplay];
|
||||
}
|
||||
|
||||
-(void)setColor:(id)color {
|
||||
_color = color;
|
||||
[self _refreshDisplay];
|
||||
}
|
||||
|
||||
-(void)setGain:(float)gain {
|
||||
_gain = gain;
|
||||
[self _refreshDisplay];
|
||||
}
|
||||
|
||||
-(void)setPlotType:(EZPlotType)plotType {
|
||||
_plotType = plotType;
|
||||
[self _refreshDisplay];
|
||||
}
|
||||
|
||||
-(void)setShouldFill:(BOOL)shouldFill {
|
||||
_shouldFill = shouldFill;
|
||||
[self _refreshDisplay];
|
||||
}
|
||||
|
||||
-(void)setShouldMirror:(BOOL)shouldMirror {
|
||||
_shouldMirror = shouldMirror;
|
||||
[self _refreshDisplay];
|
||||
}
|
||||
|
||||
-(void)_refreshDisplay {
|
||||
#if TARGET_OS_IPHONE
|
||||
[self setNeedsDisplay];
|
||||
#elif TARGET_OS_MAC
|
||||
[self setNeedsDisplay:YES];
|
||||
#endif
|
||||
}
|
||||
|
||||
#pragma mark - Get Data
|
||||
-(void)setSampleData:(float *)data
|
||||
length:(int)length {
|
||||
if( plotData != nil ){
|
||||
free(plotData);
|
||||
}
|
||||
|
||||
plotData = (CGPoint *)calloc(sizeof(CGPoint),length);
|
||||
plotLength = length;
|
||||
|
||||
for(int i = 0; i < length; i++) {
|
||||
data[i] = i == 0 ? 0 : data[i];
|
||||
plotData[i] = CGPointMake(i,data[i] * _gain);
|
||||
}
|
||||
|
||||
[self _refreshDisplay];
|
||||
}
|
||||
|
||||
#pragma mark - Update
|
||||
-(void)updateBuffer:(float *)buffer withBufferSize:(UInt32)bufferSize {
|
||||
if( _plotType == EZPlotTypeRolling ){
|
||||
|
||||
// Update the scroll history datasource
|
||||
[EZAudio updateScrollHistory:&_scrollHistory
|
||||
withLength:_scrollHistoryLength
|
||||
atIndex:&_scrollHistoryIndex
|
||||
withBuffer:buffer
|
||||
withBufferSize:bufferSize
|
||||
isResolutionChanging:&_changingHistorySize];
|
||||
|
||||
//
|
||||
[self setSampleData:_scrollHistory
|
||||
length:(!_setMaxLength?kEZAudioPlotMaxHistoryBufferLength:_scrollHistoryLength)];
|
||||
_setMaxLength = YES;
|
||||
|
||||
}
|
||||
else if( _plotType == EZPlotTypeBuffer ){
|
||||
|
||||
[self setSampleData:buffer
|
||||
length:bufferSize];
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
// Unknown plot type
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
- (void)drawRect:(CGRect)rect
|
||||
- (void)dealloc
|
||||
{
|
||||
CGContextRef ctx = UIGraphicsGetCurrentContext();
|
||||
CGContextSaveGState(ctx);
|
||||
CGRect frame = self.bounds;
|
||||
#elif TARGET_OS_MAC
|
||||
- (void)drawRect:(NSRect)dirtyRect
|
||||
{
|
||||
[[NSGraphicsContext currentContext] saveGraphicsState];
|
||||
NSGraphicsContext * nsGraphicsContext = [NSGraphicsContext currentContext];
|
||||
CGContextRef ctx = (CGContextRef) [nsGraphicsContext graphicsPort];
|
||||
NSRect frame = self.bounds;
|
||||
#endif
|
||||
|
||||
TPCircularBufferCleanup(&self.historyInfo->circularBuffer);
|
||||
free(self.historyInfo);
|
||||
free(self.points);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Initialization
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (id)init
|
||||
{
|
||||
self = [super init];
|
||||
if (self)
|
||||
{
|
||||
[self initPlot];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id)initWithCoder:(NSCoder *)aDecoder
|
||||
{
|
||||
self = [super initWithCoder:aDecoder];
|
||||
if (self)
|
||||
{
|
||||
[self initPlot];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
// Set the background color
|
||||
[(UIColor*)self.backgroundColor set];
|
||||
UIRectFill(frame);
|
||||
// Set the waveform line color
|
||||
[(UIColor*)self.color set];
|
||||
- (id)initWithFrame:(CGRect)frameRect
|
||||
#elif TARGET_OS_MAC
|
||||
[(NSColor*)self.backgroundColor set];
|
||||
NSRectFill(frame);
|
||||
[(NSColor*)self.color set];
|
||||
- (id)initWithFrame:(NSRect)frameRect
|
||||
#endif
|
||||
|
||||
if(plotLength > 0) {
|
||||
|
||||
plotData[plotLength-1] = CGPointMake(plotLength-1,0.0f);
|
||||
|
||||
CGMutablePathRef halfPath = CGPathCreateMutable();
|
||||
CGPathAddLines(halfPath,
|
||||
NULL,
|
||||
plotData,
|
||||
plotLength);
|
||||
CGMutablePathRef path = CGPathCreateMutable();
|
||||
|
||||
double xscale = (frame.size.width) / (float)plotLength;
|
||||
double halfHeight = floor( frame.size.height / 2.0 );
|
||||
|
||||
// iOS drawing origin is flipped by default so make sure we account for that
|
||||
int deviceOriginFlipped = 1;
|
||||
{
|
||||
self = [super initWithFrame:frameRect];
|
||||
if (self)
|
||||
{
|
||||
[self initPlot];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
deviceOriginFlipped = -1;
|
||||
- (void)layoutSubviews
|
||||
{
|
||||
[super layoutSubviews];
|
||||
[CATransaction begin];
|
||||
[CATransaction setDisableActions:YES];
|
||||
self.waveformLayer.frame = self.bounds;
|
||||
[self redraw];
|
||||
[CATransaction commit];
|
||||
}
|
||||
#elif TARGET_OS_MAC
|
||||
deviceOriginFlipped = 1;
|
||||
- (void)layout
|
||||
{
|
||||
[super layout];
|
||||
[CATransaction begin];
|
||||
[CATransaction setDisableActions:YES];
|
||||
self.waveformLayer.frame = self.bounds;
|
||||
[self redraw];
|
||||
[CATransaction commit];
|
||||
}
|
||||
#endif
|
||||
|
||||
CGAffineTransform xf = CGAffineTransformIdentity;
|
||||
xf = CGAffineTransformTranslate( xf, frame.origin.x , halfHeight + frame.origin.y );
|
||||
xf = CGAffineTransformScale( xf, xscale, deviceOriginFlipped*halfHeight );
|
||||
CGPathAddPath( path, &xf, halfPath );
|
||||
|
||||
if( self.shouldMirror ){
|
||||
xf = CGAffineTransformIdentity;
|
||||
xf = CGAffineTransformTranslate( xf, frame.origin.x , halfHeight + frame.origin.y);
|
||||
xf = CGAffineTransformScale( xf, xscale, -deviceOriginFlipped*(halfHeight));
|
||||
CGPathAddPath( path, &xf, halfPath );
|
||||
}
|
||||
CGPathRelease( halfPath );
|
||||
|
||||
// Now, path contains the full waveform path.
|
||||
CGContextAddPath(ctx, path);
|
||||
|
||||
// Make this color customizable
|
||||
if( self.shouldFill ){
|
||||
CGContextFillPath(ctx);
|
||||
}
|
||||
else {
|
||||
CGContextStrokePath(ctx);
|
||||
}
|
||||
CGPathRelease(path);
|
||||
|
||||
- (void)initPlot
|
||||
{
|
||||
self.centerYAxis = YES;
|
||||
self.optimizeForRealtimePlot = YES;
|
||||
self.gain = 1.0;
|
||||
self.plotType = EZPlotTypeRolling;
|
||||
self.shouldMirror = NO;
|
||||
self.shouldFill = NO;
|
||||
|
||||
// Setup history window
|
||||
self.historyInfo = (EZAudioPlotHistoryInfo *)malloc(sizeof(EZAudioPlotHistoryInfo));
|
||||
self.historyInfo->bufferSize = kEZAudioPlotDefaultHistoryBufferLength;
|
||||
self.historyInfo->buffer = calloc(self.rollingHistoryLength, sizeof(float));
|
||||
TPCircularBufferInit(&self.historyInfo->circularBuffer, kEZAudioPlotDefaultHistoryBufferLength);
|
||||
|
||||
self.waveformLayer = [CAShapeLayer layer];
|
||||
self.waveformLayer.frame = self.bounds; // TODO: account for resizing view
|
||||
self.waveformLayer.lineWidth = 1.0f;
|
||||
self.waveformLayer.fillColor = nil;
|
||||
self.waveformLayer.backgroundColor = nil;
|
||||
|
||||
self.points = calloc(kEZAudioPlotMaxHistoryBufferLength, sizeof(CGPoint));
|
||||
self.pointCount = 0;
|
||||
#if TARGET_OS_IPHONE
|
||||
self.color = [UIColor colorWithHue:0 saturation:1.0 brightness:1.0 alpha:1.0];
|
||||
#elif TARGET_OS_MAC
|
||||
self.color = [NSColor colorWithCalibratedHue:0 saturation:1.0 brightness:1.0 alpha:1.0];
|
||||
self.wantsLayer = YES;
|
||||
#endif
|
||||
self.backgroundColor = nil;
|
||||
[self.layer addSublayer:self.waveformLayer];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Setters
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)setBackgroundColor:(id)backgroundColor
|
||||
{
|
||||
[super setBackgroundColor:backgroundColor];
|
||||
self.layer.backgroundColor = [backgroundColor CGColor];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)setColor:(id)color
|
||||
{
|
||||
[super setColor:color];
|
||||
self.waveformLayer.strokeColor = [color CGColor];
|
||||
if (self.shouldFill)
|
||||
{
|
||||
self.waveformLayer.fillColor = [color CGColor];
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)setOptimizeForRealtimePlot:(BOOL)optimizeForRealtimePlot
|
||||
{
|
||||
_optimizeForRealtimePlot = optimizeForRealtimePlot;
|
||||
if (optimizeForRealtimePlot && !self.displayLink)
|
||||
{
|
||||
self.displayLink = [EZAudioDisplayLink displayLinkWithDelegate:self];
|
||||
}
|
||||
optimizeForRealtimePlot ? [self.displayLink start] : [self.displayLink stop];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)setShouldFill:(BOOL)shouldFill
|
||||
{
|
||||
[super setShouldFill:shouldFill];
|
||||
self.waveformLayer.fillColor = shouldFill ? [self.color CGColor] : nil;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Drawing
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)redraw
|
||||
{
|
||||
EZRect frame = [self.waveformLayer frame];
|
||||
if (self.pointCount > 0)
|
||||
{
|
||||
CGMutablePathRef path = CGPathCreateMutable();
|
||||
double xscale = (frame.size.width) / (float)self.pointCount;
|
||||
double halfHeight = floor(frame.size.height / 2.0);
|
||||
int deviceOriginFlipped = 1;
|
||||
CGAffineTransform xf = CGAffineTransformIdentity;
|
||||
CGFloat translateY = !self.centerYAxis ?: halfHeight + frame.origin.y;
|
||||
xf = CGAffineTransformTranslate(xf, 0.0, translateY);
|
||||
xf = CGAffineTransformScale(xf, xscale, deviceOriginFlipped * halfHeight);
|
||||
CGPathAddLines(path, &xf, self.points, self.pointCount);
|
||||
if (self.shouldMirror)
|
||||
{
|
||||
xf = CGAffineTransformScale(xf, 1.0f, -1.0f);
|
||||
CGPathAddLines(path, &xf, self.points, self.pointCount);
|
||||
}
|
||||
if (self.shouldFill)
|
||||
{
|
||||
CGPathCloseSubpath(path);
|
||||
}
|
||||
[CATransaction begin];
|
||||
[CATransaction setDisableActions:YES];
|
||||
self.waveformLayer.path = path;
|
||||
[CATransaction commit];
|
||||
CGPathRelease(path);
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Update
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)updateBuffer:(float *)buffer withBufferSize:(UInt32)bufferSize
|
||||
{
|
||||
// update the scroll history datasource
|
||||
float rms = [EZAudioUtilities RMS:buffer length:bufferSize];
|
||||
float src[1];
|
||||
src[0] = rms == NAN ? 0.0 : rms;
|
||||
TPCircularBufferProduceBytes(&self.historyInfo->circularBuffer, src, sizeof(src));
|
||||
|
||||
int32_t targetBytes = self.rollingHistoryLength * sizeof(float);
|
||||
int32_t availableBytes = 0;
|
||||
float *historyBuffer = TPCircularBufferTail(&self.historyInfo->circularBuffer, &availableBytes);
|
||||
int32_t bytes = MIN(targetBytes, availableBytes);
|
||||
memcpy(self.historyInfo->buffer, historyBuffer, bytes);
|
||||
if (targetBytes <= availableBytes)
|
||||
{
|
||||
TPCircularBufferConsume(&self.historyInfo->circularBuffer, sizeof(src));
|
||||
}
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
CGContextRestoreGState(ctx);
|
||||
#elif TARGET_OS_MAC
|
||||
[[NSGraphicsContext currentContext] restoreGraphicsState];
|
||||
#endif
|
||||
}
|
||||
|
||||
#pragma mark - Adjust Resolution
|
||||
-(int)setRollingHistoryLength:(int)historyLength {
|
||||
historyLength = MIN(historyLength,kEZAudioPlotMaxHistoryBufferLength);
|
||||
size_t floatByteSize = sizeof(float);
|
||||
_changingHistorySize = YES;
|
||||
if( _scrollHistoryLength != historyLength ){
|
||||
_scrollHistoryLength = historyLength;
|
||||
}
|
||||
_scrollHistory = realloc(_scrollHistory,_scrollHistoryLength*floatByteSize);
|
||||
if( _scrollHistoryIndex < _scrollHistoryLength ){
|
||||
memset(&_scrollHistory[_scrollHistoryIndex],
|
||||
0,
|
||||
(_scrollHistoryLength-_scrollHistoryIndex)*floatByteSize);
|
||||
}
|
||||
else {
|
||||
_scrollHistoryIndex = _scrollHistoryLength;
|
||||
}
|
||||
_changingHistorySize = NO;
|
||||
return historyLength;
|
||||
}
|
||||
|
||||
-(int)rollingHistoryLength {
|
||||
return _scrollHistoryLength;
|
||||
}
|
||||
// copy samples
|
||||
switch (self.plotType)
|
||||
{
|
||||
case EZPlotTypeBuffer:
|
||||
[self setSampleData:buffer
|
||||
length:bufferSize];
|
||||
break;
|
||||
case EZPlotTypeRolling:
|
||||
|
||||
[self setSampleData:self.historyInfo->buffer
|
||||
length:self.historyInfo->bufferSize];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
-(void)dealloc {
|
||||
if( plotData ){
|
||||
free(plotData);
|
||||
}
|
||||
// update drawing
|
||||
if (!self.optimizeForRealtimePlot)
|
||||
{
|
||||
[self redraw];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)setSampleData:(float *)data length:(int)length
|
||||
{
|
||||
// append to buffer type
|
||||
CGPoint *points = self.points;
|
||||
for (int i = 0; i < length; i++)
|
||||
{
|
||||
points[i].x = i;
|
||||
points[i].y = data[i] * self.gain;
|
||||
}
|
||||
points[0].y = points[length - 1].y = 0.0f;
|
||||
self.pointCount = length;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Adjusting History Resolution
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (int)rollingHistoryLength
|
||||
{
|
||||
return self.historyInfo->bufferSize;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (int)setRollingHistoryLength:(int)historyLength
|
||||
{
|
||||
self.historyInfo->bufferSize = MIN(kEZAudioPlotMaxHistoryBufferLength, historyLength);
|
||||
return self.historyInfo->bufferSize;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - EZAudioDisplayLinkDelegate
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)displayLinkNeedsDisplay:(EZAudioDisplayLink *)displayLink
|
||||
{
|
||||
[self redraw];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@end
|
||||
+22
-24
@@ -278,10 +278,7 @@
|
||||
NSOpenGLContext *context = [[NSOpenGLContext alloc] initWithFormat:pf
|
||||
shareContext:nil];
|
||||
|
||||
// if( !__sharedContext__ )
|
||||
// {
|
||||
// __sharedContext__ = context;
|
||||
// }
|
||||
[self setWantsBestResolutionOpenGLSurface:YES];
|
||||
|
||||
if (!pf)
|
||||
{
|
||||
@@ -291,8 +288,6 @@
|
||||
// Debug only
|
||||
CGLEnable([context CGLContextObj], kCGLCECrashOnRemovedFunctions);
|
||||
|
||||
NSLog(@"open gl context: %@",context);
|
||||
|
||||
self.pixelFormat = pf;
|
||||
self.openGLContext = context;
|
||||
}
|
||||
@@ -340,6 +335,10 @@
|
||||
[self _refreshWithBackgroundColor:self.backgroundColor];
|
||||
[self _refreshWithColor:self.color];
|
||||
|
||||
const GLint flag = 0.5;
|
||||
[[self openGLContext] setValues:&flag
|
||||
forParameter:NSOpenGLCPSurfaceOpacity];
|
||||
|
||||
// Setup the display link (rendering loop)
|
||||
[self _setupDisplayLink];
|
||||
|
||||
@@ -476,12 +475,12 @@ static CVReturn DisplayLinkCallback(CVDisplayLinkRef displayLink,
|
||||
|
||||
|
||||
// Update the scroll history datasource
|
||||
[EZAudio updateScrollHistory:&_scrollHistory
|
||||
withLength:_scrollHistoryLength
|
||||
atIndex:&_scrollHistoryIndex
|
||||
withBuffer:buffer
|
||||
withBufferSize:bufferSize
|
||||
isResolutionChanging:&_changingHistorySize];
|
||||
[EZAudioUtilities updateScrollHistory:&_scrollHistory
|
||||
withLength:_scrollHistoryLength
|
||||
atIndex:&_scrollHistoryIndex
|
||||
withBuffer:buffer
|
||||
withBufferSize:bufferSize
|
||||
isResolutionChanging:&_changingHistorySize];
|
||||
|
||||
// Fill in graph data
|
||||
[EZAudioPlotGL fillGraph:graph
|
||||
@@ -613,10 +612,10 @@ static CVReturn DisplayLinkCallback(CVDisplayLinkRef displayLink,
|
||||
|
||||
// Get the view size in Points
|
||||
NSRect viewRectPoints = [self bounds];
|
||||
NSRect viewRectPixels = [self convertRectToBacking:viewRectPoints];
|
||||
NSRect viewRectPixels = [self convertRectToBacking:viewRectPoints];
|
||||
|
||||
// Set the new dimensions in our renderer
|
||||
glViewport(0, 0, viewRectPixels.size.width, viewRectPixels.size.height);
|
||||
glViewport(0, 0, viewRectPixels.size.width, viewRectPixels.size.height);
|
||||
|
||||
CGLUnlockContext([[self openGLContext] CGLContextObj]);
|
||||
}
|
||||
@@ -716,7 +715,7 @@ static CVReturn DisplayLinkCallback(CVDisplayLinkRef displayLink,
|
||||
if( drawingType == EZAudioPlotGLDrawTypeLineStrip ){
|
||||
// graph size = buffer size to stroke waveform
|
||||
for(int i = 0; i < graphSize; i++){
|
||||
float x = [EZAudio MAP:i
|
||||
float x = [EZAudioUtilities MAP:i
|
||||
leftMin:0
|
||||
leftMax:bufferSize
|
||||
rightMin:-1.0
|
||||
@@ -728,12 +727,12 @@ static CVReturn DisplayLinkCallback(CVDisplayLinkRef displayLink,
|
||||
else if( drawingType == EZAudioPlotGLDrawTypeTriangleStrip ) {
|
||||
// graph size = 2 * buffer size to draw triangles and fill regions properly
|
||||
for(int i = 0; i < graphSize; i+=2){
|
||||
int bufferIndex = (int)[EZAudio MAP:i
|
||||
int bufferIndex = (int)[EZAudioUtilities MAP:i
|
||||
leftMin:0
|
||||
leftMax:graphSize
|
||||
rightMin:0
|
||||
rightMax:bufferSize];
|
||||
float x = [EZAudio MAP:bufferIndex
|
||||
float x = [EZAudioUtilities MAP:bufferIndex
|
||||
leftMin:0
|
||||
leftMax:bufferSize
|
||||
rightMin:-1.0
|
||||
@@ -742,13 +741,12 @@ static CVReturn DisplayLinkCallback(CVDisplayLinkRef displayLink,
|
||||
graph[i].y = 0.0f;
|
||||
}
|
||||
for(int i = 0; i < graphSize; i+=2){
|
||||
int bufferIndex = (int)[EZAudio
|
||||
MAP:i
|
||||
leftMin:0
|
||||
leftMax:graphSize
|
||||
rightMin:0
|
||||
rightMax:bufferSize];
|
||||
float x = [EZAudio MAP:bufferIndex
|
||||
int bufferIndex = (int)[EZAudioUtilities MAP:i
|
||||
leftMin:0
|
||||
leftMax:graphSize
|
||||
rightMin:0
|
||||
rightMax:bufferSize];
|
||||
float x = [EZAudioUtilities MAP:bufferIndex
|
||||
leftMin:0
|
||||
leftMax:bufferSize
|
||||
rightMin:-1.0
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
// Setup the base effect
|
||||
self.baseEffect = [[GLKBaseEffect alloc] init];
|
||||
self.baseEffect.useConstantColor = GL_TRUE;
|
||||
self.preferredFramesPerSecond = 60;
|
||||
self.preferredFramesPerSecond = 30;
|
||||
_scrollHistory = NULL;
|
||||
_scrollHistoryLength = kEZAudioPlotDefaultHistoryBufferLength;
|
||||
}
|
||||
@@ -132,7 +132,6 @@
|
||||
|
||||
// Set the line width for the context
|
||||
glLineWidth(2.0);
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - Adjust Resolution
|
||||
@@ -196,12 +195,12 @@
|
||||
_scrollHistory[i] = 0.0f;
|
||||
}
|
||||
// Update the scroll history datasource
|
||||
[EZAudio updateScrollHistory:&_scrollHistory
|
||||
withLength:_scrollHistoryLength
|
||||
atIndex:&_scrollHistoryIndex
|
||||
withBuffer:empty
|
||||
withBufferSize:_rollingPlotGraphSize
|
||||
isResolutionChanging:&_changingHistorySize];
|
||||
[EZAudioUtilities updateScrollHistory:&_scrollHistory
|
||||
withLength:_scrollHistoryLength
|
||||
atIndex:&_scrollHistoryIndex
|
||||
withBuffer:empty
|
||||
withBufferSize:_rollingPlotGraphSize
|
||||
isResolutionChanging:&_changingHistorySize];
|
||||
// Fill in graph data
|
||||
[EZAudioPlotGL fillGraph:graph
|
||||
withGraphSize:_rollingPlotGraphSize
|
||||
@@ -304,12 +303,12 @@
|
||||
EZAudioPlotGLPoint graph[_rollingPlotGraphSize];
|
||||
|
||||
// Update the scroll history datasource
|
||||
[EZAudio updateScrollHistory:&_scrollHistory
|
||||
withLength:_scrollHistoryLength
|
||||
atIndex:&_scrollHistoryIndex
|
||||
withBuffer:buffer
|
||||
withBufferSize:bufferSize
|
||||
isResolutionChanging:&_changingHistorySize];
|
||||
[EZAudioUtilities updateScrollHistory:&_scrollHistory
|
||||
withLength:_scrollHistoryLength
|
||||
atIndex:&_scrollHistoryIndex
|
||||
withBuffer:buffer
|
||||
withBufferSize:bufferSize
|
||||
isResolutionChanging:&_changingHistorySize];
|
||||
|
||||
// Fill in graph data
|
||||
[EZAudioPlotGL fillGraph:graph
|
||||
@@ -482,4 +481,4 @@
|
||||
|
||||
#elif TARGET_OS_MAC
|
||||
|
||||
#endif
|
||||
#endif
|
||||
@@ -0,0 +1,321 @@
|
||||
//
|
||||
// EZAudioUtilities.h
|
||||
// EZAudioOpenGLWaveformExample
|
||||
//
|
||||
// Created by Syed Haris Ali on 4/2/15.
|
||||
// Copyright (c) 2015 Syed Haris Ali. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <AudioToolbox/AudioToolbox.h>
|
||||
#import "TPCircularBuffer.h"
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - EZAudioUtilities
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@interface EZAudioUtilities : NSObject
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Debugging
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// TODO: document
|
||||
+ (void)setShouldExitOnCheckResultFail:(BOOL)shouldExitOnCheckResultFail;
|
||||
|
||||
#pragma mark - AudioBufferList Utility
|
||||
///-----------------------------------------------------------
|
||||
/// @name AudioBufferList Utility
|
||||
///-----------------------------------------------------------
|
||||
|
||||
/**
|
||||
Allocates an AudioBufferList structure. Make sure to call freeBufferList when done using AudioBufferList or it will leak.
|
||||
@param frames The number of frames that will be stored within each audio buffer
|
||||
@param channels The number of channels (e.g. 2 for stereo, 1 for mono, etc.)
|
||||
@param interleaved Whether the samples will be interleaved (if not it will be assumed to be non-interleaved and each channel will have an AudioBuffer allocated)
|
||||
@return An AudioBufferList struct that has been allocated in memory
|
||||
*/
|
||||
+(AudioBufferList *)audioBufferListWithNumberOfFrames:(UInt32)frames
|
||||
numberOfChannels:(UInt32)channels
|
||||
interleaved:(BOOL)interleaved;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
+(float **)floatBuffersWithNumberOfFrames:(UInt32)frames
|
||||
numberOfChannels:(UInt32)channels;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Deallocates an AudioBufferList structure from memory.
|
||||
@param bufferList A pointer to the buffer list you would like to free
|
||||
*/
|
||||
+(void)freeBufferList:(AudioBufferList*)bufferList;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
+(void)freeFloatBuffers:(float **)buffers
|
||||
numberOfChannels:(UInt32)channels;
|
||||
|
||||
#pragma mark - AudioStreamBasicDescription Utilties
|
||||
///-----------------------------------------------------------
|
||||
/// @name Creating An AudioStreamBasicDescription
|
||||
///-----------------------------------------------------------
|
||||
|
||||
/**
|
||||
|
||||
@param channels The desired number of channels
|
||||
@param sampleRate The desired sample rate
|
||||
@return A new AudioStreamBasicDescription with the specified format.
|
||||
*/
|
||||
+(AudioStreamBasicDescription)AIFFFormatWithNumberOfChannels:(UInt32)channels
|
||||
sampleRate:(float)sampleRate;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
|
||||
@param sampleRate The desired sample rate
|
||||
@return A new AudioStreamBasicDescription with the specified format.
|
||||
*/
|
||||
+(AudioStreamBasicDescription)iLBCFormatWithSampleRate:(float)sampleRate;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
+ (BOOL)isFloatFormat:(AudioStreamBasicDescription)asbd;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Checks an AudioStreamBasicDescription to check for an interleaved flag (samples are
|
||||
stored in one buffer one after another instead of two (or n channels) parallel buffers
|
||||
@param asbd A valid AudioStreamBasicDescription
|
||||
@return A BOOL indicating whether or not the AudioStreamBasicDescription is interleaved
|
||||
*/
|
||||
+ (BOOL)isInterleaved:(AudioStreamBasicDescription)asbd;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
+ (BOOL)isLinearPCM:(AudioStreamBasicDescription)asbd;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
+(AudioStreamBasicDescription)floatFormatWithNumberOfChannels:(UInt32)channels
|
||||
sampleRate:(float)sampleRate;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
|
||||
@param channels The desired number of channels
|
||||
@param sampleRate The desired sample rate
|
||||
@return A new AudioStreamBasicDescription with the specified format.
|
||||
*/
|
||||
+(AudioStreamBasicDescription)M4AFormatWithNumberOfChannels:(UInt32)channels
|
||||
sampleRate:(float)sampleRate;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
|
||||
@param sampleRate The desired sample rate
|
||||
@return A new AudioStreamBasicDescription with the specified format.
|
||||
*/
|
||||
+(AudioStreamBasicDescription)monoFloatFormatWithSampleRate:(float)sampleRate;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
|
||||
@param sampleRate The desired sample rate
|
||||
@return A new AudioStreamBasicDescription with the specified format.
|
||||
*/
|
||||
+(AudioStreamBasicDescription)monoCanonicalFormatWithSampleRate:(float)sampleRate;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
|
||||
@param sampleRate The desired sample rate
|
||||
@return A new AudioStreamBasicDescription with the specified format.
|
||||
*/
|
||||
+(AudioStreamBasicDescription)stereoCanonicalNonInterleavedFormatWithSampleRate:(float)sampleRate;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
|
||||
@param sampleRate The desired sample rate
|
||||
@return A new AudioStreamBasicDescription with the specified format.
|
||||
*/
|
||||
+(AudioStreamBasicDescription)stereoFloatInterleavedFormatWithSampleRate:(float)sampleRate;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
|
||||
@param sampleRate The desired sample rate
|
||||
@return A new AudioStreamBasicDescription with the specified format.
|
||||
*/
|
||||
+(AudioStreamBasicDescription)stereoFloatNonInterleavedFormatWithSampleRate:(float)sameRate;
|
||||
|
||||
///-----------------------------------------------------------
|
||||
/// @name AudioStreamBasicDescription Utilities
|
||||
///-----------------------------------------------------------
|
||||
|
||||
/**
|
||||
Nicely logs out the contents of an AudioStreamBasicDescription struct
|
||||
@param asbd The AudioStreamBasicDescription struct with content to print out
|
||||
*/
|
||||
+(void)printASBD:(AudioStreamBasicDescription)asbd;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
+ (NSString *)displayTimeStringFromSeconds:(NSTimeInterval)seconds;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
+(NSString *)stringForAudioStreamBasicDescription:(AudioStreamBasicDescription)asbd;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Just a wrapper around the setCanonical function provided in the Core Audio Utility C++ class.
|
||||
@param asbd The AudioStreamBasicDescription structure to modify
|
||||
@param nChannels The number of expected channels on the description
|
||||
@param interleaved A flag indicating whether the stereo samples should be interleaved in the buffer
|
||||
*/
|
||||
+(void)setCanonicalAudioStreamBasicDescription:(AudioStreamBasicDescription*)asbd
|
||||
numberOfChannels:(UInt32)nChannels
|
||||
interleaved:(BOOL)interleaved;
|
||||
|
||||
#pragma mark - Math Utilities
|
||||
///-----------------------------------------------------------
|
||||
/// @name Math Utilities
|
||||
///-----------------------------------------------------------
|
||||
|
||||
/**
|
||||
Appends an array of values to a history buffer and performs an internal shift to add the values to the tail and removes the same number of values from the head.
|
||||
@param buffer A float array of values to append to the tail of the history buffer
|
||||
@param bufferLength The length of the float array being appended to the history buffer
|
||||
@param scrollHistory The target history buffer in which to append the values
|
||||
@param scrollHistoryLength The length of the target history buffer
|
||||
*/
|
||||
+(void)appendBufferAndShift:(float*)buffer
|
||||
withBufferSize:(int)bufferLength
|
||||
toScrollHistory:(float*)scrollHistory
|
||||
withScrollHistorySize:(int)scrollHistoryLength;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Appends a value to a history buffer and performs an internal shift to add the value to the tail and remove the 0th value.
|
||||
@param value The float value to append to the history array
|
||||
@param scrollHistory The target history buffer in which to append the values
|
||||
@param scrollHistoryLength The length of the target history buffer
|
||||
*/
|
||||
+(void) appendValue:(float)value
|
||||
toScrollHistory:(float*)scrollHistory
|
||||
withScrollHistorySize:(int)scrollHistoryLength;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Maps a value from one coordinate system into another one. Takes in the current value to map, the minimum and maximum values of the first coordinate system, and the minimum and maximum values of the second coordinate system and calculates the mapped value in the second coordinate system's constraints.
|
||||
@param value The value expressed in the first coordinate system
|
||||
@param leftMin The minimum of the first coordinate system
|
||||
@param leftMax The maximum of the first coordinate system
|
||||
@param rightMin The minimum of the second coordindate system
|
||||
@param rightMax The maximum of the second coordinate system
|
||||
@return The mapped value in terms of the second coordinate system
|
||||
*/
|
||||
+(float)MAP:(float)value
|
||||
leftMin:(float)leftMin
|
||||
leftMax:(float)leftMax
|
||||
rightMin:(float)rightMin
|
||||
rightMax:(float)rightMax;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Calculates the root mean squared for a buffer.
|
||||
@param buffer A float buffer array of values whose root mean squared to calculate
|
||||
@param bufferSize The size of the float buffer
|
||||
@return The root mean squared of the buffer
|
||||
*/
|
||||
+(float)RMS:(float*)buffer
|
||||
length:(int)bufferSize;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Calculate the sign function sgn(x) =
|
||||
{ -1 , x < 0,
|
||||
{ 0 , x = 0,
|
||||
{ 1 , x > 0
|
||||
@param value The float value for which to use as x
|
||||
@return The float sign value
|
||||
*/
|
||||
+(float)SGN:(float)value;
|
||||
|
||||
#pragma mark - OSStatus Utility
|
||||
///-----------------------------------------------------------
|
||||
/// @name OSStatus Utility
|
||||
///-----------------------------------------------------------
|
||||
|
||||
/**
|
||||
Basic check result function useful for checking each step of the audio setup process
|
||||
@param result The OSStatus representing the result of an operation
|
||||
@param operation A string (const char, not NSString) describing the operation taking place (will print if fails)
|
||||
*/
|
||||
+(void)checkResult:(OSStatus)result
|
||||
operation:(const char*)operation;
|
||||
|
||||
+(NSString *)stringFromUInt32Code:(UInt32)code;
|
||||
|
||||
#pragma mark - Plot Utility
|
||||
///-----------------------------------------------------------
|
||||
/// @name Plot Utility
|
||||
///-----------------------------------------------------------
|
||||
|
||||
+(void)updateScrollHistory:(float**)scrollHistory
|
||||
withLength:(int)scrollHistoryLength
|
||||
atIndex:(int*)index
|
||||
withBuffer:(float*)buffer
|
||||
withBufferSize:(int)bufferSize
|
||||
isResolutionChanging:(BOOL*)isChanging;
|
||||
|
||||
#pragma mark - TPCircularBuffer Utility
|
||||
///-----------------------------------------------------------
|
||||
/// @name TPCircularBuffer Utility
|
||||
///-----------------------------------------------------------
|
||||
|
||||
/**
|
||||
Appends the data from the audio buffer list to the circular buffer
|
||||
@param circularBuffer Pointer to the instance of the TPCircularBuffer to add the audio data to
|
||||
@param audioBufferList Pointer to the instance of the AudioBufferList with the audio data
|
||||
*/
|
||||
+(void)appendDataToCircularBuffer:(TPCircularBuffer*)circularBuffer
|
||||
fromAudioBufferList:(AudioBufferList*)audioBufferList;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Initializes the circular buffer (just a wrapper around the C method)
|
||||
* @param circularBuffer Pointer to an instance of the TPCircularBuffer
|
||||
* @param size The length of the TPCircularBuffer (usually 1024)
|
||||
*/
|
||||
+(void)circularBuffer:(TPCircularBuffer*)circularBuffer
|
||||
withSize:(int)size;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Frees a circular buffer
|
||||
@param circularBuffer Pointer to the circular buffer to clear
|
||||
*/
|
||||
+(void)freeCircularBuffer:(TPCircularBuffer*)circularBuffer;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,466 @@
|
||||
//
|
||||
// EZAudioUtilities.m
|
||||
// EZAudioOpenGLWaveformExample
|
||||
//
|
||||
// Created by Syed Haris Ali on 4/2/15.
|
||||
// Copyright (c) 2015 Syed Haris Ali. All rights reserved.
|
||||
//
|
||||
|
||||
#import "EZAudioUtilities.h"
|
||||
|
||||
BOOL __shouldExitOnCheckResultFail = YES;
|
||||
|
||||
@implementation EZAudioUtilities
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Debugging
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
+ (void)setShouldExitOnCheckResultFail:(BOOL)shouldExitOnCheckResultFail
|
||||
{
|
||||
__shouldExitOnCheckResultFail = shouldExitOnCheckResultFail;
|
||||
}
|
||||
|
||||
#pragma mark - AudioBufferList Utility
|
||||
+(AudioBufferList *)audioBufferListWithNumberOfFrames:(UInt32)frames
|
||||
numberOfChannels:(UInt32)channels
|
||||
interleaved:(BOOL)interleaved
|
||||
{
|
||||
AudioBufferList *audioBufferList = (AudioBufferList*)malloc(sizeof(AudioBufferList) + sizeof(AudioBuffer)*(channels-1));
|
||||
UInt32 outputBufferSize = 32 * frames; // 32 KB
|
||||
audioBufferList->mNumberBuffers = interleaved ? 1 : channels;
|
||||
for( int i = 0; i < audioBufferList->mNumberBuffers; i++ )
|
||||
{
|
||||
audioBufferList->mBuffers[i].mNumberChannels = channels;
|
||||
audioBufferList->mBuffers[i].mDataByteSize = channels * outputBufferSize;
|
||||
audioBufferList->mBuffers[i].mData = (float*)malloc(channels * sizeof(float) *outputBufferSize);
|
||||
}
|
||||
return audioBufferList;
|
||||
}
|
||||
|
||||
+ (float **)floatBuffersWithNumberOfFrames:(UInt32)frames
|
||||
numberOfChannels:(UInt32)channels
|
||||
{
|
||||
size_t size = sizeof(float *) * channels;
|
||||
float **buffers = (float **)malloc(size);
|
||||
for (int i = 0; i < channels; i++)
|
||||
{
|
||||
size = sizeof(float) * frames;
|
||||
buffers[i] = (float *)malloc(size);
|
||||
}
|
||||
return buffers;
|
||||
}
|
||||
|
||||
+(void)freeBufferList:(AudioBufferList *)bufferList
|
||||
{
|
||||
if( bufferList )
|
||||
{
|
||||
if( bufferList->mNumberBuffers )
|
||||
{
|
||||
for( int i = 0; i < bufferList->mNumberBuffers; i++ )
|
||||
{
|
||||
if( bufferList->mBuffers[i].mData )
|
||||
{
|
||||
free(bufferList->mBuffers[i].mData);
|
||||
}
|
||||
}
|
||||
}
|
||||
free(bufferList);
|
||||
}
|
||||
bufferList = NULL;
|
||||
}
|
||||
|
||||
+(void)freeFloatBuffers:(float **)buffers
|
||||
numberOfChannels:(UInt32)channels
|
||||
{
|
||||
for (int i = 0; i < channels; i++)
|
||||
{
|
||||
free(buffers[i]);
|
||||
}
|
||||
free(buffers);
|
||||
}
|
||||
|
||||
#pragma mark - AudioStreamBasicDescription Utility
|
||||
+(AudioStreamBasicDescription)AIFFFormatWithNumberOfChannels:(UInt32)channels
|
||||
sampleRate:(float)sampleRate
|
||||
{
|
||||
AudioStreamBasicDescription asbd;
|
||||
memset(&asbd, 0, sizeof(asbd));
|
||||
asbd.mFormatID = kAudioFormatLinearPCM;
|
||||
asbd.mFormatFlags = kAudioFormatFlagIsBigEndian|kAudioFormatFlagIsPacked|kAudioFormatFlagIsSignedInteger;
|
||||
asbd.mSampleRate = sampleRate;
|
||||
asbd.mChannelsPerFrame = channels;
|
||||
asbd.mBitsPerChannel = 32;
|
||||
asbd.mBytesPerPacket = (asbd.mBitsPerChannel / 8) * asbd.mChannelsPerFrame;
|
||||
asbd.mFramesPerPacket = 1;
|
||||
asbd.mBytesPerFrame = (asbd.mBitsPerChannel / 8) * asbd.mChannelsPerFrame;
|
||||
return asbd;
|
||||
}
|
||||
|
||||
+(AudioStreamBasicDescription)iLBCFormatWithSampleRate:(float)sampleRate
|
||||
{
|
||||
AudioStreamBasicDescription asbd;
|
||||
memset(&asbd, 0, sizeof(asbd));
|
||||
asbd.mFormatID = kAudioFormatiLBC;
|
||||
asbd.mChannelsPerFrame = 1;
|
||||
asbd.mSampleRate = sampleRate;
|
||||
|
||||
// Fill in the rest of the descriptions using the Audio Format API
|
||||
UInt32 propSize = sizeof(asbd);
|
||||
[EZAudioUtilities checkResult:AudioFormatGetProperty(kAudioFormatProperty_FormatInfo,
|
||||
0,
|
||||
NULL,
|
||||
&propSize,
|
||||
&asbd)
|
||||
operation:"Failed to fill out the rest of the m4a AudioStreamBasicDescription"];
|
||||
|
||||
return asbd;
|
||||
}
|
||||
|
||||
+ (BOOL)isFloatFormat:(AudioStreamBasicDescription)asbd
|
||||
{
|
||||
return asbd.mFormatFlags & kAudioFormatFlagIsFloat;
|
||||
}
|
||||
|
||||
+ (BOOL)isInterleaved:(AudioStreamBasicDescription)asbd
|
||||
{
|
||||
return !(asbd.mFormatFlags & kAudioFormatFlagIsNonInterleaved);
|
||||
}
|
||||
|
||||
+ (BOOL)isLinearPCM:(AudioStreamBasicDescription)asbd
|
||||
{
|
||||
return asbd.mFormatID == kAudioFormatLinearPCM;
|
||||
}
|
||||
|
||||
+(AudioStreamBasicDescription)floatFormatWithNumberOfChannels:(UInt32)channels
|
||||
sampleRate:(float)sampleRate
|
||||
{
|
||||
AudioStreamBasicDescription asbd;
|
||||
UInt32 floatByteSize = sizeof(float);
|
||||
asbd.mBitsPerChannel = 8 * floatByteSize;
|
||||
asbd.mBytesPerFrame = floatByteSize;
|
||||
asbd.mBytesPerPacket = floatByteSize;
|
||||
asbd.mChannelsPerFrame = channels;
|
||||
asbd.mFormatFlags = kAudioFormatFlagIsFloat|kAudioFormatFlagIsNonInterleaved;
|
||||
asbd.mFormatID = kAudioFormatLinearPCM;
|
||||
asbd.mFramesPerPacket = 1;
|
||||
asbd.mSampleRate = sampleRate;
|
||||
return asbd;
|
||||
}
|
||||
|
||||
+(AudioStreamBasicDescription)M4AFormatWithNumberOfChannels:(UInt32)channels
|
||||
sampleRate:(float)sampleRate
|
||||
{
|
||||
AudioStreamBasicDescription asbd;
|
||||
memset(&asbd, 0, sizeof(asbd));
|
||||
asbd.mFormatID = kAudioFormatMPEG4AAC;
|
||||
asbd.mChannelsPerFrame = channels;
|
||||
asbd.mSampleRate = sampleRate;
|
||||
|
||||
// Fill in the rest of the descriptions using the Audio Format API
|
||||
UInt32 propSize = sizeof(asbd);
|
||||
[EZAudioUtilities checkResult:AudioFormatGetProperty(kAudioFormatProperty_FormatInfo,
|
||||
0,
|
||||
NULL,
|
||||
&propSize,
|
||||
&asbd)
|
||||
operation:"Failed to fill out the rest of the m4a AudioStreamBasicDescription"];
|
||||
|
||||
return asbd;
|
||||
}
|
||||
|
||||
+(AudioStreamBasicDescription)monoFloatFormatWithSampleRate:(float)sampleRate
|
||||
{
|
||||
AudioStreamBasicDescription asbd;
|
||||
UInt32 byteSize = sizeof(float);
|
||||
asbd.mBitsPerChannel = 8 * byteSize;
|
||||
asbd.mBytesPerFrame = byteSize;
|
||||
asbd.mBytesPerPacket = byteSize;
|
||||
asbd.mChannelsPerFrame = 1;
|
||||
asbd.mFormatFlags = kAudioFormatFlagIsPacked|kAudioFormatFlagIsFloat;
|
||||
asbd.mFormatID = kAudioFormatLinearPCM;
|
||||
asbd.mFramesPerPacket = 1;
|
||||
asbd.mSampleRate = sampleRate;
|
||||
return asbd;
|
||||
}
|
||||
|
||||
+(AudioStreamBasicDescription)monoCanonicalFormatWithSampleRate:(float)sampleRate
|
||||
{
|
||||
AudioStreamBasicDescription asbd;
|
||||
UInt32 byteSize = sizeof(float);
|
||||
asbd.mBitsPerChannel = 8 * byteSize;
|
||||
asbd.mBytesPerFrame = byteSize;
|
||||
asbd.mBytesPerPacket = byteSize;
|
||||
asbd.mChannelsPerFrame = 1;
|
||||
asbd.mFormatFlags = kAudioFormatFlagsNativeFloatPacked|kAudioFormatFlagIsNonInterleaved;
|
||||
asbd.mFormatID = kAudioFormatLinearPCM;
|
||||
asbd.mFramesPerPacket = 1;
|
||||
asbd.mSampleRate = sampleRate;
|
||||
return asbd;
|
||||
}
|
||||
|
||||
+(AudioStreamBasicDescription)stereoCanonicalNonInterleavedFormatWithSampleRate:(float)sampleRate
|
||||
{
|
||||
AudioStreamBasicDescription asbd;
|
||||
UInt32 byteSize = sizeof(float);
|
||||
asbd.mBitsPerChannel = 8 * byteSize;
|
||||
asbd.mBytesPerFrame = byteSize;
|
||||
asbd.mBytesPerPacket = byteSize;
|
||||
asbd.mChannelsPerFrame = 2;
|
||||
asbd.mFormatFlags = kAudioFormatFlagsNativeFloatPacked|kAudioFormatFlagIsNonInterleaved;
|
||||
asbd.mFormatID = kAudioFormatLinearPCM;
|
||||
asbd.mFramesPerPacket = 1;
|
||||
asbd.mSampleRate = sampleRate;
|
||||
return asbd;
|
||||
}
|
||||
|
||||
+(AudioStreamBasicDescription)stereoFloatInterleavedFormatWithSampleRate:(float)sampleRate
|
||||
{
|
||||
AudioStreamBasicDescription asbd;
|
||||
UInt32 floatByteSize = sizeof(float);
|
||||
asbd.mChannelsPerFrame = 2;
|
||||
asbd.mBitsPerChannel = 8 * floatByteSize;
|
||||
asbd.mBytesPerFrame = asbd.mChannelsPerFrame * floatByteSize;
|
||||
asbd.mFramesPerPacket = 1;
|
||||
asbd.mBytesPerPacket = asbd.mFramesPerPacket * asbd.mBytesPerFrame;
|
||||
asbd.mFormatFlags = kAudioFormatFlagIsFloat;
|
||||
asbd.mFormatID = kAudioFormatLinearPCM;
|
||||
asbd.mSampleRate = sampleRate;
|
||||
asbd.mReserved = 0;
|
||||
return asbd;
|
||||
}
|
||||
|
||||
+(AudioStreamBasicDescription)stereoFloatNonInterleavedFormatWithSampleRate:(float)sampleRate
|
||||
{
|
||||
AudioStreamBasicDescription asbd;
|
||||
UInt32 floatByteSize = sizeof(float);
|
||||
asbd.mBitsPerChannel = 8 * floatByteSize;
|
||||
asbd.mBytesPerFrame = floatByteSize;
|
||||
asbd.mChannelsPerFrame = 2;
|
||||
asbd.mFormatFlags = kAudioFormatFlagIsFloat|kAudioFormatFlagIsNonInterleaved;
|
||||
asbd.mFormatID = kAudioFormatLinearPCM;
|
||||
asbd.mFramesPerPacket = 1;
|
||||
asbd.mBytesPerPacket = asbd.mFramesPerPacket * asbd.mBytesPerFrame;
|
||||
asbd.mSampleRate = sampleRate;
|
||||
return asbd;
|
||||
}
|
||||
|
||||
+(void)printASBD:(AudioStreamBasicDescription)asbd
|
||||
{
|
||||
char formatIDString[5];
|
||||
UInt32 formatID = CFSwapInt32HostToBig(asbd.mFormatID);
|
||||
bcopy (&formatID, formatIDString, 4);
|
||||
formatIDString[4] = '\0';
|
||||
NSLog (@" Sample Rate: %10.0f", asbd.mSampleRate);
|
||||
NSLog (@" Format ID: %10s", formatIDString);
|
||||
NSLog (@" Format Flags: %10X", (unsigned int)asbd.mFormatFlags);
|
||||
NSLog (@" Bytes per Packet: %10d", (unsigned int)asbd.mBytesPerPacket);
|
||||
NSLog (@" Frames per Packet: %10d", (unsigned int)asbd.mFramesPerPacket);
|
||||
NSLog (@" Bytes per Frame: %10d", (unsigned int)asbd.mBytesPerFrame);
|
||||
NSLog (@" Channels per Frame: %10d", (unsigned int)asbd.mChannelsPerFrame);
|
||||
NSLog (@" Bits per Channel: %10d", (unsigned int)asbd.mBitsPerChannel);
|
||||
}
|
||||
|
||||
+ (NSString *)displayTimeStringFromSeconds:(NSTimeInterval)seconds
|
||||
{
|
||||
int totalSeconds = (int)ceil(seconds);
|
||||
int secondsComponent = totalSeconds % 60;
|
||||
int minutesComponent = (totalSeconds / 60) % 60;
|
||||
return [NSString stringWithFormat:@"%02d:%02d", minutesComponent, secondsComponent];
|
||||
}
|
||||
|
||||
+(NSString *)stringForAudioStreamBasicDescription:(AudioStreamBasicDescription)asbd
|
||||
{
|
||||
char formatIDString[5];
|
||||
UInt32 formatID = CFSwapInt32HostToBig(asbd.mFormatID);
|
||||
bcopy (&formatID, formatIDString, 4);
|
||||
formatIDString[4] = '\0';
|
||||
return [NSString stringWithFormat:
|
||||
@"\nSample Rate: %10.0f,\n"
|
||||
@"Format ID: %10s,\n"
|
||||
@"Format Flags: %10X,\n"
|
||||
@"Bytes per Packet: %10d,\n"
|
||||
@"Frames per Packet: %10d,\n"
|
||||
@"Bytes per Frame: %10d,\n"
|
||||
@"Channels per Frame: %10d,\n"
|
||||
@"Bits per Channel: %10d,\n"
|
||||
@"IsInterleaved: %i,\n"
|
||||
@"IsFloat: %i,",
|
||||
asbd.mSampleRate,
|
||||
formatIDString,
|
||||
(unsigned int)asbd.mFormatFlags,
|
||||
(unsigned int)asbd.mBytesPerPacket,
|
||||
(unsigned int)asbd.mFramesPerPacket,
|
||||
(unsigned int)asbd.mBytesPerFrame,
|
||||
(unsigned int)asbd.mChannelsPerFrame,
|
||||
(unsigned int)asbd.mBitsPerChannel,
|
||||
[self isInterleaved:asbd],
|
||||
[self isFloatFormat:asbd]];
|
||||
}
|
||||
|
||||
+(void)setCanonicalAudioStreamBasicDescription:(AudioStreamBasicDescription*)asbd
|
||||
numberOfChannels:(UInt32)nChannels
|
||||
interleaved:(BOOL)interleaved {
|
||||
|
||||
asbd->mFormatID = kAudioFormatLinearPCM;
|
||||
#if TARGET_OS_IPHONE
|
||||
int sampleSize = sizeof(float);
|
||||
asbd->mFormatFlags = kAudioFormatFlagsNativeFloatPacked;
|
||||
#elif TARGET_OS_MAC
|
||||
int sampleSize = sizeof(Float32);
|
||||
asbd->mFormatFlags = kAudioFormatFlagsNativeFloatPacked;
|
||||
#endif
|
||||
asbd->mBitsPerChannel = 8 * sampleSize;
|
||||
asbd->mChannelsPerFrame = nChannels;
|
||||
asbd->mFramesPerPacket = 1;
|
||||
if (interleaved)
|
||||
asbd->mBytesPerPacket = asbd->mBytesPerFrame = nChannels * sampleSize;
|
||||
else {
|
||||
asbd->mBytesPerPacket = asbd->mBytesPerFrame = sampleSize;
|
||||
asbd->mFormatFlags |= kAudioFormatFlagIsNonInterleaved;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - OSStatus Utility
|
||||
+(void)checkResult:(OSStatus)result
|
||||
operation:(const char *)operation
|
||||
{
|
||||
if (result == noErr) return;
|
||||
char errorString[20];
|
||||
// see if it appears to be a 4-char-code
|
||||
*(UInt32 *)(errorString + 1) = CFSwapInt32HostToBig(result);
|
||||
if (isprint(errorString[1]) && isprint(errorString[2]) && isprint(errorString[3]) && isprint(errorString[4])) {
|
||||
errorString[0] = errorString[5] = '\'';
|
||||
errorString[6] = '\0';
|
||||
} else
|
||||
// no, format it as an integer
|
||||
sprintf(errorString, "%d", (int)result);
|
||||
fprintf(stderr, "Error: %s (%s)\n", operation, errorString);
|
||||
if (__shouldExitOnCheckResultFail)
|
||||
{
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
|
||||
+ (NSString *)stringFromUInt32Code:(UInt32)code
|
||||
{
|
||||
char errorString[20];
|
||||
// see if it appears to be a 4-char-code
|
||||
*(UInt32 *)(errorString + 1) = CFSwapInt32HostToBig(code);
|
||||
if (isprint(errorString[1]) &&
|
||||
isprint(errorString[2]) &&
|
||||
isprint(errorString[3]) &&
|
||||
isprint(errorString[4]))
|
||||
{
|
||||
errorString[0] = errorString[5] = '\'';
|
||||
errorString[6] = '\0';
|
||||
}
|
||||
return [NSString stringWithUTF8String:errorString];
|
||||
}
|
||||
|
||||
#pragma mark - Math Utility
|
||||
+(void)appendBufferAndShift:(float*)buffer
|
||||
withBufferSize:(int)bufferLength
|
||||
toScrollHistory:(float*)scrollHistory
|
||||
withScrollHistorySize:(int)scrollHistoryLength {
|
||||
// NSAssert(scrollHistoryLength>=bufferLength,@"Scroll history array length must be greater buffer length");
|
||||
// NSAssert(scrollHistoryLength>0,@"Scroll history array length must be greater than 0");
|
||||
// NSAssert(bufferLength>0,@"Buffer array length must be greater than 0");
|
||||
int shiftLength = scrollHistoryLength - bufferLength;
|
||||
size_t floatByteSize = sizeof(float);
|
||||
size_t shiftByteSize = shiftLength * floatByteSize;
|
||||
size_t bufferByteSize = bufferLength * floatByteSize;
|
||||
memmove(&scrollHistory[0],
|
||||
&scrollHistory[bufferLength],
|
||||
shiftByteSize);
|
||||
memmove(&scrollHistory[shiftLength],
|
||||
&buffer[0],
|
||||
bufferByteSize);
|
||||
}
|
||||
|
||||
+(void) appendValue:(float)value
|
||||
toScrollHistory:(float*)scrollHistory
|
||||
withScrollHistorySize:(int)scrollHistoryLength {
|
||||
float val[1]; val[0] = value;
|
||||
[self appendBufferAndShift:val
|
||||
withBufferSize:1
|
||||
toScrollHistory:scrollHistory
|
||||
withScrollHistorySize:scrollHistoryLength];
|
||||
}
|
||||
|
||||
+(float)MAP:(float)value
|
||||
leftMin:(float)leftMin
|
||||
leftMax:(float)leftMax
|
||||
rightMin:(float)rightMin
|
||||
rightMax:(float)rightMax {
|
||||
float leftSpan = leftMax - leftMin;
|
||||
float rightSpan = rightMax - rightMin;
|
||||
float valueScaled = ( value - leftMin ) / leftSpan;
|
||||
return rightMin + (valueScaled * rightSpan);
|
||||
}
|
||||
|
||||
+(float)RMS:(float *)buffer
|
||||
length:(int)bufferSize {
|
||||
float sum = 0.0;
|
||||
for(int i = 0; i < bufferSize; i++)
|
||||
sum += buffer[i] * buffer[i];
|
||||
return sqrtf( sum / bufferSize );
|
||||
}
|
||||
|
||||
+(float)SGN:(float)value
|
||||
{
|
||||
return value < 0 ? -1.0f : ( value > 0 ? 1.0f : 0.0f );
|
||||
}
|
||||
|
||||
#pragma mark - Plot Utility
|
||||
+(void)updateScrollHistory:(float **)scrollHistory
|
||||
withLength:(int)scrollHistoryLength
|
||||
atIndex:(int*)index
|
||||
withBuffer:(float *)buffer
|
||||
withBufferSize:(int)bufferSize
|
||||
isResolutionChanging:(BOOL*)isChanging {
|
||||
|
||||
//
|
||||
size_t floatByteSize = sizeof(float);
|
||||
|
||||
//
|
||||
if( *scrollHistory == NULL ){
|
||||
// Create the history buffer
|
||||
*scrollHistory = (float*)calloc(8192,floatByteSize);
|
||||
}
|
||||
|
||||
//
|
||||
if( !*isChanging ){
|
||||
float rms = [EZAudioUtilities RMS:buffer length:bufferSize];
|
||||
if( *index < scrollHistoryLength ){
|
||||
float *hist = *scrollHistory;
|
||||
hist[*index] = rms;
|
||||
(*index)++;
|
||||
}
|
||||
else {
|
||||
[EZAudioUtilities appendValue:rms
|
||||
toScrollHistory:*scrollHistory
|
||||
withScrollHistorySize:scrollHistoryLength];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - TPCircularBuffer Utility
|
||||
+(void)circularBuffer:(TPCircularBuffer *)circularBuffer withSize:(int)size {
|
||||
TPCircularBufferInit(circularBuffer,size);
|
||||
}
|
||||
|
||||
+(void)appendDataToCircularBuffer:(TPCircularBuffer*)circularBuffer
|
||||
fromAudioBufferList:(AudioBufferList*)audioBufferList {
|
||||
TPCircularBufferProduceBytes(circularBuffer,
|
||||
audioBufferList->mBuffers[0].mData,
|
||||
audioBufferList->mBuffers[0].mDataByteSize);
|
||||
}
|
||||
|
||||
+(void)freeCircularBuffer:(TPCircularBuffer *)circularBuffer {
|
||||
TPCircularBufferClear(circularBuffer);
|
||||
TPCircularBufferCleanup(circularBuffer);
|
||||
}
|
||||
|
||||
@end
|
||||
+78
-45
@@ -23,12 +23,11 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <AudioToolbox/AudioToolbox.h>
|
||||
#import "AEFloatConverter.h"
|
||||
#import "TargetConditionals.h"
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <AudioToolbox/AudioToolbox.h>
|
||||
#import "TargetConditionals.h"
|
||||
#import "EZAudioDevice.h"
|
||||
|
||||
@class EZAudio;
|
||||
@class EZMicrophone;
|
||||
|
||||
#pragma mark - EZMicrophoneDelegate
|
||||
@@ -51,13 +50,21 @@
|
||||
/// @name Audio Data Description
|
||||
///-----------------------------------------------------------
|
||||
|
||||
/**
|
||||
Called anytime the input device changes on an `EZMicrophone` instance. Mac only.
|
||||
@param microphone The instance of the EZMicrophone that triggered the event.
|
||||
@param device The instance of the new EZAudioDevice the microphone is using to pull input.
|
||||
@param notification Incase the device changed because of a notification (like from AVAudioSession) then we provide that notification to give the full context of the change.
|
||||
*/
|
||||
- (void)microphone:(EZMicrophone *)microphone changedDevice:(EZAudioDevice *)device;
|
||||
|
||||
/**
|
||||
Returns back the audio stream basic description as soon as it has been initialized. This is guaranteed to occur before the stream callbacks, `microphone:hasBufferList:withBufferSize:withNumberOfChannels:` or `microphone:hasAudioReceived:withBufferSize:withNumberOfChannels:`
|
||||
@param microphone The instance of the EZMicrophone that triggered the event.
|
||||
@param audioStreamBasicDescription The AudioStreamBasicDescription that was created for the microphone instance.
|
||||
*/
|
||||
-(void) microphone:(EZMicrophone *)microphone
|
||||
hasAudioStreamBasicDescription:(AudioStreamBasicDescription)audioStreamBasicDescription;
|
||||
- (void) microphone:(EZMicrophone *)microphone
|
||||
hasAudioStreamBasicDescription:(AudioStreamBasicDescription)audioStreamBasicDescription;
|
||||
|
||||
///-----------------------------------------------------------
|
||||
/// @name Audio Data Callbacks
|
||||
@@ -71,10 +78,10 @@
|
||||
@param numberOfChannels The number of channels for the incoming audio.
|
||||
@warning This function executes on a background thread to avoid blocking any audio operations. If operations should be performed on any other thread (like the main thread) it should be performed within a dispatch block like so: dispatch_async(dispatch_get_main_queue(), ^{ ...Your Code... })
|
||||
*/
|
||||
-(void) microphone:(EZMicrophone*)microphone
|
||||
hasAudioReceived:(float**)buffer
|
||||
withBufferSize:(UInt32)bufferSize
|
||||
withNumberOfChannels:(UInt32)numberOfChannels;
|
||||
- (void) microphone:(EZMicrophone *)microphone
|
||||
hasAudioReceived:(float **)buffer
|
||||
withBufferSize:(UInt32)bufferSize
|
||||
withNumberOfChannels:(UInt32)numberOfChannels;
|
||||
|
||||
/**
|
||||
Returns back the buffer list containing the audio received. This occurs on the background thread so any drawing code must explicity perform its functions on the main thread.
|
||||
@@ -84,10 +91,10 @@
|
||||
@param numberOfChannels The number of channels for the incoming audio.
|
||||
@warning This function executes on a background thread to avoid blocking any audio operations. If operations should be performed on any other thread (like the main thread) it should be performed within a dispatch block like so: dispatch_async(dispatch_get_main_queue(), ^{ ...Your Code... })
|
||||
*/
|
||||
-(void) microphone:(EZMicrophone*)microphone
|
||||
hasBufferList:(AudioBufferList*)bufferList
|
||||
withBufferSize:(UInt32)bufferSize
|
||||
withNumberOfChannels:(UInt32)numberOfChannels;
|
||||
- (void) microphone:(EZMicrophone *)microphone
|
||||
hasBufferList:(AudioBufferList *)bufferList
|
||||
withBufferSize:(UInt32)bufferSize
|
||||
withNumberOfChannels:(UInt32)numberOfChannels;
|
||||
|
||||
@end
|
||||
|
||||
@@ -100,24 +107,30 @@
|
||||
/**
|
||||
The EZMicrophoneDelegate for which to handle the microphone callbacks
|
||||
*/
|
||||
@property (nonatomic,assign) id<EZMicrophoneDelegate> microphoneDelegate;
|
||||
@property (nonatomic, weak) id<EZMicrophoneDelegate> delegate;
|
||||
|
||||
// TODO: document this
|
||||
@property (nonatomic, strong) EZAudioDevice *device;
|
||||
|
||||
/**
|
||||
A bool describing whether the microphone is on and passing back audio data to its delegate.
|
||||
*/
|
||||
@property (nonatomic,assign) BOOL microphoneOn;
|
||||
@property (nonatomic, assign) BOOL microphoneOn;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Initializers
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
///-----------------------------------------------------------
|
||||
/// @name Initializers
|
||||
///-----------------------------------------------------------
|
||||
|
||||
/**
|
||||
Creates an instance of the EZMicrophone with a delegate to respond to the audioReceived callback. This will not start fetching the audio until startFetchingAudio has been called. Use initWithMicrophoneDelegate:startsImmediately: to instantiate this class and immediately start fetching audio data.
|
||||
@param microphoneDelegate A EZMicrophoneDelegate delegate that will receive the audioReceived callback.
|
||||
@param delegate A EZMicrophoneDelegate delegate that will receive the audioReceived callback.
|
||||
@return An instance of the EZMicrophone class. This should be strongly retained.
|
||||
*/
|
||||
-(EZMicrophone*)initWithMicrophoneDelegate:(id<EZMicrophoneDelegate>)microphoneDelegate;
|
||||
- (EZMicrophone *)initWithMicrophoneDelegate:(id<EZMicrophoneDelegate>)delegate;
|
||||
|
||||
/**
|
||||
Creates an instance of the EZMicrophone with a custom AudioStreamBasicDescription and provides the caller to specify a delegate to respond to the audioReceived callback. This will not start fetching the audio until startFetchingAudio has been called. Use initWithMicrophoneDelegate:startsImmediately: to instantiate this class and immediately start fetching audio data.
|
||||
@@ -125,49 +138,52 @@
|
||||
@param audioStreamBasicDescription A custom AudioStreamBasicFormat for the microphone input.
|
||||
@return An instance of the EZMicrophone class. This should be strongly retained.
|
||||
*/
|
||||
-(EZMicrophone*)initWithMicrophoneDelegate:(id<EZMicrophoneDelegate>)microphoneDelegate
|
||||
withAudioStreamBasicDescription:(AudioStreamBasicDescription)audioStreamBasicDescription;
|
||||
-(EZMicrophone *)initWithMicrophoneDelegate:(id<EZMicrophoneDelegate>)delegate
|
||||
withAudioStreamBasicDescription:(AudioStreamBasicDescription)audioStreamBasicDescription;
|
||||
|
||||
/**
|
||||
Creates an instance of the EZMicrophone with a delegate to respond to the audioReceived callback and allows the caller to specify whether they'd immediately like to start fetching the audio data.
|
||||
@param microphoneDelegate A EZMicrophoneDelegate delegate that will receive the audioReceived callback.
|
||||
@param delegate A EZMicrophoneDelegate delegate that will receive the audioReceived callback.
|
||||
@param startsImmediately A boolean indicating whether to start fetching the data immediately. IF YES, the delegate's audioReceived callback will immediately start getting called.
|
||||
@return An instance of the EZMicrophone class. This should be strongly retained.
|
||||
*/
|
||||
-(EZMicrophone*)initWithMicrophoneDelegate:(id<EZMicrophoneDelegate>)microphoneDelegate
|
||||
startsImmediately:(BOOL)startsImmediately;
|
||||
- (EZMicrophone *)initWithMicrophoneDelegate:(id<EZMicrophoneDelegate>)delegate
|
||||
startsImmediately:(BOOL)startsImmediately;
|
||||
|
||||
/**
|
||||
Creates an instance of the EZMicrophone with a custom AudioStreamBasicDescription and provides the caller with a delegate to respond to the audioReceived callback and allows the caller to specify whether they'd immediately like to start fetching the audio data.
|
||||
@param microphoneDelegate A EZMicrophoneDelegate delegate that will receive the audioReceived callback.
|
||||
@param delegate A EZMicrophoneDelegate delegate that will receive the audioReceived callback.
|
||||
@param audioStreamBasicDescription A custom AudioStreamBasicFormat for the microphone input.
|
||||
@param startsImmediately A boolean indicating whether to start fetching the data immediately. IF YES, the delegate's audioReceived callback will immediately start getting called.
|
||||
@return An instance of the EZMicrophone class. This should be strongly retained.
|
||||
*/
|
||||
-(EZMicrophone*)initWithMicrophoneDelegate:(id<EZMicrophoneDelegate>)microphoneDelegate
|
||||
withAudioStreamBasicDescription:(AudioStreamBasicDescription)audioStreamBasicDescription
|
||||
startsImmediately:(BOOL)startsImmediately;
|
||||
- (EZMicrophone *)initWithMicrophoneDelegate:(id<EZMicrophoneDelegate>)delegate
|
||||
withAudioStreamBasicDescription:(AudioStreamBasicDescription)audioStreamBasicDescription
|
||||
startsImmediately:(BOOL)startsImmediately;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Class Initializers
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
///-----------------------------------------------------------
|
||||
/// @name Class Initializers
|
||||
///-----------------------------------------------------------
|
||||
|
||||
/**
|
||||
Creates an instance of the EZMicrophone with a delegate to respond to the audioReceived callback. This will not start fetching the audio until startFetchingAudio has been called. Use microphoneWithDelegate:startsImmediately: to instantiate this class and immediately start fetching audio data.
|
||||
@param microphoneDelegate A EZMicrophoneDelegate delegate that will receive the audioReceived callback.
|
||||
@param delegate A EZMicrophoneDelegate delegate that will receive the audioReceived callback.
|
||||
@return An instance of the EZMicrophone class. This should be declared as a strong property!
|
||||
*/
|
||||
+(EZMicrophone*)microphoneWithDelegate:(id<EZMicrophoneDelegate>)microphoneDelegate;
|
||||
+ (EZMicrophone *)microphoneWithDelegate:(id<EZMicrophoneDelegate>)delegate;
|
||||
|
||||
/**
|
||||
Creates an instance of the EZMicrophone with a delegate to respond to the audioReceived callback. This will not start fetching the audio until startFetchingAudio has been called. Use microphoneWithDelegate:startsImmediately: to instantiate this class and immediately start fetching audio data.
|
||||
@param microphoneDelegate A EZMicrophoneDelegate delegate that will receive the audioReceived callback.
|
||||
@param delegate A EZMicrophoneDelegate delegate that will receive the audioReceived callback.
|
||||
@param audioStreamBasicDescription A custom AudioStreamBasicFormat for the microphone input.
|
||||
@return An instance of the EZMicrophone class. This should be declared as a strong property!
|
||||
*/
|
||||
+(EZMicrophone*)microphoneWithDelegate:(id<EZMicrophoneDelegate>)microphoneDelegate
|
||||
withAudioStreamBasicDescription:(AudioStreamBasicDescription)audioStreamBasicDescription;
|
||||
+ (EZMicrophone *)microphoneWithDelegate:(id<EZMicrophoneDelegate>)delegate
|
||||
withAudioStreamBasicDescription:(AudioStreamBasicDescription)audioStreamBasicDescription;
|
||||
|
||||
/**
|
||||
Creates an instance of the EZMicrophone with a delegate to respond to the audioReceived callback and allows the caller to specify whether they'd immediately like to start fetching the audio data.
|
||||
@@ -176,8 +192,8 @@
|
||||
@param startsImmediately A boolean indicating whether to start fetching the data immediately. IF YES, the delegate's audioReceived callback will immediately start getting called.
|
||||
@return An instance of the EZMicrophone class. This should be strongly retained.
|
||||
*/
|
||||
+(EZMicrophone*)microphoneWithDelegate:(id<EZMicrophoneDelegate>)microphoneDelegate
|
||||
startsImmediately:(BOOL)startsImmediately;
|
||||
+ (EZMicrophone *)microphoneWithDelegate:(id<EZMicrophoneDelegate>)delegate
|
||||
startsImmediately:(BOOL)startsImmediately;
|
||||
|
||||
/**
|
||||
Creates an instance of the EZMicrophone with a delegate to respond to the audioReceived callback and allows the caller to specify whether they'd immediately like to start fetching the audio data.
|
||||
@@ -187,11 +203,14 @@
|
||||
@param startsImmediately A boolean indicating whether to start fetching the data immediately. IF YES, the delegate's audioReceived callback will immediately start getting called.
|
||||
@return An instance of the EZMicrophone class. This should be strongly retained.
|
||||
*/
|
||||
+(EZMicrophone*)microphoneWithDelegate:(id<EZMicrophoneDelegate>)microphoneDelegate
|
||||
withAudioStreamBasicDescription:(AudioStreamBasicDescription)audioStreamBasicDescription
|
||||
startsImmediately:(BOOL)startsImmediately;
|
||||
+ (EZMicrophone *)microphoneWithDelegate:(id<EZMicrophoneDelegate>)delegate
|
||||
withAudioStreamBasicDescription:(AudioStreamBasicDescription)audioStreamBasicDescription
|
||||
startsImmediately:(BOOL)startsImmediately;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Shared Instance
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#pragma mark - Singleton
|
||||
///-----------------------------------------------------------
|
||||
/// @name Shared Instance
|
||||
///-----------------------------------------------------------
|
||||
@@ -200,9 +219,12 @@
|
||||
A shared instance of the microphone component. Most applications will only need to use one instance of the microphone component across multiple views. Make sure to call the `startFetchingAudio` method to receive the audio data in the microphone delegate.
|
||||
@return A shared instance of the `EZAudioMicrophone` component.
|
||||
*/
|
||||
+(EZMicrophone*)sharedMicrophone;
|
||||
+ (EZMicrophone *)sharedMicrophone;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Events
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
///-----------------------------------------------------------
|
||||
/// @name Starting/Stopping The Microphone
|
||||
///-----------------------------------------------------------
|
||||
@@ -210,14 +232,19 @@
|
||||
/**
|
||||
Starts fetching audio from the default microphone. Will notify delegate with audioReceived callback.
|
||||
*/
|
||||
-(void)startFetchingAudio;
|
||||
- (void)startFetchingAudio;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Stops fetching audio. Will stop notifying the delegate's audioReceived callback.
|
||||
*/
|
||||
-(void)stopFetchingAudio;
|
||||
- (void)stopFetchingAudio;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Getters
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
///-----------------------------------------------------------
|
||||
/// @name Getting The Microphone's Audio Format
|
||||
///-----------------------------------------------------------
|
||||
@@ -226,13 +253,13 @@
|
||||
Provides the AudioStreamBasicDescription structure containing the format of the microphone's audio.
|
||||
@return An AudioStreamBasicDescription structure describing the format of the microphone's audio.
|
||||
*/
|
||||
-(AudioStreamBasicDescription)audioStreamBasicDescription;
|
||||
- (AudioStreamBasicDescription)audioStreamBasicDescription;
|
||||
|
||||
/**
|
||||
Provides the underlying Audio Unit that is being used to fetch the audio.
|
||||
@return The AudioUnit used for the microphone
|
||||
*/
|
||||
-(AudioUnit*)audioUnit;
|
||||
- (AudioUnit *)audioUnit;
|
||||
|
||||
#pragma mark - Setters
|
||||
///-----------------------------------------------------------
|
||||
@@ -244,6 +271,12 @@
|
||||
@warning Do not set this while fetching audio (startFetchingAudio)
|
||||
@param asbd The new AudioStreamBasicDescription to use in place of the current audio format description.
|
||||
*/
|
||||
-(void)setAudioStreamBasicDescription:(AudioStreamBasicDescription)asbd;
|
||||
- (void)setAudioStreamBasicDescription:(AudioStreamBasicDescription)asbd;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)setDevice:(EZAudioDevice *)device;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@end
|
||||
|
||||
+461
-537
File diff suppressed because it is too large
Load Diff
+19
-22
@@ -44,9 +44,6 @@ static OSStatus OutputRenderCallback(void *inRefCon,
|
||||
UInt32 inBusNumber,
|
||||
UInt32 inNumberFrames,
|
||||
AudioBufferList *ioData){
|
||||
|
||||
// NSLog(@"output something");
|
||||
|
||||
EZOutput *output = (__bridge EZOutput*)inRefCon;
|
||||
// Manual override
|
||||
if( [output.outputDataSource respondsToSelector:@selector(output:callbackWithActionFlags:inTimeStamp:inBusNumber:inNumberFrames:ioData:)] ){
|
||||
@@ -177,8 +174,8 @@ static OSStatus OutputRenderCallback(void *inRefCon,
|
||||
|
||||
-(void)_createNewInstanceForOutputComponent:(AudioComponent)outputComponent {
|
||||
//
|
||||
[EZAudio checkResult:AudioComponentInstanceNew( outputComponent, &_outputUnit )
|
||||
operation:"Failed to open component for output unit"];
|
||||
[EZAudioUtilities checkResult:AudioComponentInstanceNew( outputComponent, &_outputUnit )
|
||||
operation:"Failed to open component for output unit"];
|
||||
}
|
||||
|
||||
#pragma mark - Configure The Output Unit
|
||||
@@ -209,13 +206,13 @@ static OSStatus OutputRenderCallback(void *inRefCon,
|
||||
|
||||
//
|
||||
AudioComponent comp = AudioComponentFindNext(NULL,&outputcd);
|
||||
[EZAudio checkResult:AudioComponentInstanceNew(comp,&_outputUnit)
|
||||
[EZAudioUtilities checkResult:AudioComponentInstanceNew(comp,&_outputUnit)
|
||||
operation:"Failed to get output unit"];
|
||||
|
||||
// Setup the output unit for playback
|
||||
UInt32 oneFlag = 1;
|
||||
AudioUnitElement bus0 = 0;
|
||||
[EZAudio checkResult:AudioUnitSetProperty(_outputUnit,
|
||||
[EZAudioUtilities checkResult:AudioUnitSetProperty(_outputUnit,
|
||||
kAudioOutputUnitProperty_EnableIO,
|
||||
kAudioUnitScope_Output,
|
||||
bus0,
|
||||
@@ -231,11 +228,11 @@ static OSStatus OutputRenderCallback(void *inRefCon,
|
||||
|
||||
// Setup an ASBD in canonical format by default
|
||||
if( !_customASBD ){
|
||||
_outputASBD = [EZAudio stereoCanonicalNonInterleavedFormatWithSampleRate:hardwareSampleRate];
|
||||
_outputASBD = [EZAudioUtilities stereoCanonicalNonInterleavedFormatWithSampleRate:hardwareSampleRate];
|
||||
}
|
||||
|
||||
// Set the format for output
|
||||
[EZAudio checkResult:AudioUnitSetProperty(_outputUnit,
|
||||
[EZAudioUtilities checkResult:AudioUnitSetProperty(_outputUnit,
|
||||
kAudioUnitProperty_StreamFormat,
|
||||
kAudioUnitScope_Input,
|
||||
bus0,
|
||||
@@ -247,7 +244,7 @@ static OSStatus OutputRenderCallback(void *inRefCon,
|
||||
AURenderCallbackStruct input;
|
||||
input.inputProc = OutputRenderCallback;
|
||||
input.inputProcRefCon = (__bridge void *)self;
|
||||
[EZAudio checkResult:AudioUnitSetProperty(_outputUnit,
|
||||
[EZAudioUtilities checkResult:AudioUnitSetProperty(_outputUnit,
|
||||
kAudioUnitProperty_SetRenderCallback,
|
||||
kAudioUnitScope_Input,
|
||||
bus0,
|
||||
@@ -256,7 +253,7 @@ static OSStatus OutputRenderCallback(void *inRefCon,
|
||||
operation:"Failed to set the render callback on the output unit"];
|
||||
|
||||
//
|
||||
[EZAudio checkResult:AudioUnitInitialize(_outputUnit)
|
||||
[EZAudioUtilities checkResult:AudioUnitInitialize(_outputUnit)
|
||||
operation:"Couldn't initialize output unit"];
|
||||
|
||||
|
||||
@@ -276,17 +273,17 @@ static OSStatus OutputRenderCallback(void *inRefCon,
|
||||
NSLog(@"Failed to get output unit");
|
||||
exit(-1);
|
||||
}
|
||||
[EZAudio checkResult:AudioComponentInstanceNew(comp,&_outputUnit)
|
||||
[EZAudioUtilities checkResult:AudioComponentInstanceNew(comp,&_outputUnit)
|
||||
operation:"Failed to open component for output unit"];
|
||||
|
||||
|
||||
// Setup an ASBD in canonical format by default
|
||||
if( !_customASBD ){
|
||||
_outputASBD = [EZAudio stereoFloatNonInterleavedFormatWithSampleRate:44100];
|
||||
_outputASBD = [EZAudioUtilities stereoFloatNonInterleavedFormatWithSampleRate:44100];
|
||||
}
|
||||
|
||||
// Set the format for output
|
||||
[EZAudio checkResult:AudioUnitSetProperty(_outputUnit,
|
||||
[EZAudioUtilities checkResult:AudioUnitSetProperty(_outputUnit,
|
||||
kAudioUnitProperty_StreamFormat,
|
||||
kAudioUnitScope_Input,
|
||||
0,
|
||||
@@ -298,7 +295,7 @@ static OSStatus OutputRenderCallback(void *inRefCon,
|
||||
AURenderCallbackStruct input;
|
||||
input.inputProc = OutputRenderCallback;
|
||||
input.inputProcRefCon = (__bridge void *)(self);
|
||||
[EZAudio checkResult:AudioUnitSetProperty(_outputUnit,
|
||||
[EZAudioUtilities checkResult:AudioUnitSetProperty(_outputUnit,
|
||||
kAudioUnitProperty_SetRenderCallback,
|
||||
kAudioUnitScope_Input,
|
||||
0,
|
||||
@@ -307,7 +304,7 @@ static OSStatus OutputRenderCallback(void *inRefCon,
|
||||
operation:"Failed to set the render callback on the output unit"];
|
||||
|
||||
//
|
||||
[EZAudio checkResult:AudioUnitInitialize(_outputUnit)
|
||||
[EZAudioUtilities checkResult:AudioUnitInitialize(_outputUnit)
|
||||
operation:"Couldn't initialize output unit"];
|
||||
|
||||
}
|
||||
@@ -316,7 +313,7 @@ static OSStatus OutputRenderCallback(void *inRefCon,
|
||||
#pragma mark - Events
|
||||
-(void)startPlayback {
|
||||
if( !_isPlaying ){
|
||||
[EZAudio checkResult:AudioOutputUnitStart(_outputUnit)
|
||||
[EZAudioUtilities checkResult:AudioOutputUnitStart(_outputUnit)
|
||||
operation:"Failed to start output unit"];
|
||||
_isPlaying = YES;
|
||||
}
|
||||
@@ -324,7 +321,7 @@ static OSStatus OutputRenderCallback(void *inRefCon,
|
||||
|
||||
-(void)stopPlayback {
|
||||
if( _isPlaying ){
|
||||
[EZAudio checkResult:AudioOutputUnitStop(_outputUnit)
|
||||
[EZAudioUtilities checkResult:AudioOutputUnitStop(_outputUnit)
|
||||
operation:"Failed to stop output unit"];
|
||||
_isPlaying = NO;
|
||||
}
|
||||
@@ -349,7 +346,7 @@ static OSStatus OutputRenderCallback(void *inRefCon,
|
||||
_customASBD = YES;
|
||||
_outputASBD = asbd;
|
||||
// Set the format for output
|
||||
[EZAudio checkResult:AudioUnitSetProperty(_outputUnit,
|
||||
[EZAudioUtilities checkResult:AudioUnitSetProperty(_outputUnit,
|
||||
kAudioUnitProperty_StreamFormat,
|
||||
kAudioUnitScope_Input,
|
||||
0,
|
||||
@@ -363,11 +360,11 @@ static OSStatus OutputRenderCallback(void *inRefCon,
|
||||
}
|
||||
|
||||
-(void)dealloc {
|
||||
[EZAudio checkResult:AudioOutputUnitStop(_outputUnit)
|
||||
[EZAudioUtilities checkResult:AudioOutputUnitStop(_outputUnit)
|
||||
operation:"Failed to uninitialize output unit"];
|
||||
[EZAudio checkResult:AudioUnitUninitialize(_outputUnit)
|
||||
[EZAudioUtilities checkResult:AudioUnitUninitialize(_outputUnit)
|
||||
operation:"Failed to uninitialize output unit"];
|
||||
[EZAudio checkResult:AudioComponentInstanceDispose(_outputUnit)
|
||||
[EZAudioUtilities checkResult:AudioComponentInstanceDispose(_outputUnit)
|
||||
operation:"Failed to uninitialize output unit"];
|
||||
}
|
||||
|
||||
|
||||
+3
-2
@@ -31,7 +31,8 @@
|
||||
/**
|
||||
The types of plots that can be displayed in the view using the data.
|
||||
*/
|
||||
typedef NS_ENUM(NSInteger,EZPlotType){
|
||||
typedef NS_ENUM(NSInteger,EZPlotType)
|
||||
{
|
||||
/**
|
||||
Plot that displays only the samples of the current buffer
|
||||
*/
|
||||
@@ -69,7 +70,7 @@ typedef NS_ENUM(NSInteger,EZPlotType){
|
||||
/**
|
||||
The default color of the plot's data (i.e. waveform, y-axis values). For iOS the color is specified as a UIColor while for OSX the color is an NSColor. The default value on both platforms is red.
|
||||
*/
|
||||
@property (nonatomic,strong) id color;
|
||||
@property (nonatomic, strong) id color;
|
||||
|
||||
/**
|
||||
The plot's gain value, which controls the scale of the y-axis values. The default value of the gain is 1.0f and should always be greater than 0.0f.
|
||||
|
||||
+10
-5
@@ -31,17 +31,22 @@
|
||||
|
||||
@implementation EZPlot
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Clearing
|
||||
-(void)clear
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)clear
|
||||
{
|
||||
// Override in subclass
|
||||
// Override in subclass
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Get Samples
|
||||
-(void)updateBuffer:(float *)buffer
|
||||
withBufferSize:(UInt32)bufferSize
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)updateBuffer:(float *)buffer withBufferSize:(UInt32)bufferSize
|
||||
{
|
||||
// Override in subclass
|
||||
// Override in subclass
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
+35
-35
@@ -48,11 +48,11 @@
|
||||
if( self )
|
||||
{
|
||||
// Set defaults
|
||||
_destinationFile = NULL;
|
||||
_destinationFileURL = (__bridge CFURLRef)url;
|
||||
_sourceFormat = sourceFormat;
|
||||
_destinationFormat = [EZRecorder recorderFormatForFileType:destinationFileType
|
||||
withSourceFormat:_sourceFormat];
|
||||
_destinationFile = NULL;
|
||||
_destinationFileURL = (__bridge CFURLRef)url;
|
||||
_sourceFormat = sourceFormat;
|
||||
_destinationFormat = [EZRecorder recorderFormatForFileType:destinationFileType
|
||||
withSourceFormat:_sourceFormat];
|
||||
_destinationFileTypeID = [EZRecorder recorderFileTypeIdForFileType:destinationFileType
|
||||
withSourceFormat:_sourceFormat];
|
||||
|
||||
@@ -80,20 +80,20 @@
|
||||
switch ( fileType )
|
||||
{
|
||||
case EZRecorderFileTypeAIFF:
|
||||
asbd = [EZAudio AIFFFormatWithNumberOfChannels:sourceFormat.mChannelsPerFrame
|
||||
sampleRate:sourceFormat.mSampleRate];
|
||||
asbd = [EZAudioUtilities AIFFFormatWithNumberOfChannels:sourceFormat.mChannelsPerFrame
|
||||
sampleRate:sourceFormat.mSampleRate];
|
||||
break;
|
||||
case EZRecorderFileTypeM4A:
|
||||
asbd = [EZAudio M4AFormatWithNumberOfChannels:sourceFormat.mChannelsPerFrame
|
||||
sampleRate:sourceFormat.mSampleRate];
|
||||
asbd = [EZAudioUtilities M4AFormatWithNumberOfChannels:sourceFormat.mChannelsPerFrame
|
||||
sampleRate:sourceFormat.mSampleRate];
|
||||
break;
|
||||
|
||||
case EZRecorderFileTypeWAV:
|
||||
asbd = [EZAudio stereoFloatInterleavedFormatWithSampleRate:sourceFormat.mSampleRate];
|
||||
asbd = [EZAudioUtilities stereoFloatInterleavedFormatWithSampleRate:sourceFormat.mSampleRate];
|
||||
break;
|
||||
|
||||
default:
|
||||
asbd = [EZAudio stereoCanonicalNonInterleavedFormatWithSampleRate:sourceFormat.mSampleRate];
|
||||
asbd = [EZAudioUtilities stereoCanonicalNonInterleavedFormatWithSampleRate:sourceFormat.mSampleRate];
|
||||
break;
|
||||
}
|
||||
return asbd;
|
||||
@@ -128,28 +128,28 @@
|
||||
{
|
||||
// Finish filling out the destination format description
|
||||
UInt32 propSize = sizeof(_destinationFormat);
|
||||
[EZAudio checkResult:AudioFormatGetProperty(kAudioFormatProperty_FormatInfo,
|
||||
0,
|
||||
NULL,
|
||||
&propSize,
|
||||
&_destinationFormat)
|
||||
operation:"Failed to fill out rest of destination format"];
|
||||
[EZAudioUtilities checkResult:AudioFormatGetProperty(kAudioFormatProperty_FormatInfo,
|
||||
0,
|
||||
NULL,
|
||||
&propSize,
|
||||
&_destinationFormat)
|
||||
operation:"Failed to fill out rest of destination format"];
|
||||
|
||||
// Create the audio file
|
||||
[EZAudio checkResult:ExtAudioFileCreateWithURL(_destinationFileURL,
|
||||
_destinationFileTypeID,
|
||||
&_destinationFormat,
|
||||
NULL,
|
||||
kAudioFileFlags_EraseFile,
|
||||
&_destinationFile)
|
||||
operation:"Failed to create audio file"];
|
||||
[EZAudioUtilities checkResult:ExtAudioFileCreateWithURL(_destinationFileURL,
|
||||
_destinationFileTypeID,
|
||||
&_destinationFormat,
|
||||
NULL,
|
||||
kAudioFileFlags_EraseFile,
|
||||
&_destinationFile)
|
||||
operation:"Failed to create audio file"];
|
||||
|
||||
// Set the client format (which should be equal to the source format)
|
||||
[EZAudio checkResult:ExtAudioFileSetProperty(_destinationFile,
|
||||
kExtAudioFileProperty_ClientDataFormat,
|
||||
sizeof(_sourceFormat),
|
||||
&_sourceFormat)
|
||||
operation:"Failed to set client format on recorded audio file"];
|
||||
[EZAudioUtilities checkResult:ExtAudioFileSetProperty(_destinationFile,
|
||||
kExtAudioFileProperty_ClientDataFormat,
|
||||
sizeof(_sourceFormat),
|
||||
&_sourceFormat)
|
||||
operation:"Failed to set client format on recorded audio file"];
|
||||
|
||||
}
|
||||
|
||||
@@ -159,10 +159,10 @@
|
||||
{
|
||||
if( _destinationFile )
|
||||
{
|
||||
[EZAudio checkResult:ExtAudioFileWriteAsync(_destinationFile,
|
||||
bufferSize,
|
||||
bufferList)
|
||||
operation:"Failed to write audio data to recorded audio file"];
|
||||
[EZAudioUtilities checkResult:ExtAudioFileWriteAsync(_destinationFile,
|
||||
bufferSize,
|
||||
bufferList)
|
||||
operation:"Failed to write audio data to recorded audio file"];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,8 +171,8 @@
|
||||
if( _destinationFile )
|
||||
{
|
||||
// Dispose of the audio file reference
|
||||
[EZAudio checkResult:ExtAudioFileDispose(_destinationFile)
|
||||
operation:"Failed to close audio file"];
|
||||
[EZAudioUtilities checkResult:ExtAudioFileDispose(_destinationFile)
|
||||
operation:"Failed to close audio file"];
|
||||
|
||||
// Null out the file reference
|
||||
_destinationFile = NULL;
|
||||
|
||||
@@ -57,7 +57,7 @@ typedef struct {
|
||||
int32_t head;
|
||||
volatile int32_t fillCount;
|
||||
} TPCircularBuffer;
|
||||
|
||||
|
||||
/*!
|
||||
* Initialise buffer
|
||||
*
|
||||
|
||||
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
+109
-78
@@ -21,21 +21,26 @@
|
||||
/* End PBXAggregateTarget section */
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
66FC0A9A1B3105E1005CF3D7 /* EZAudio.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0A781B3105E1005CF3D7 /* EZAudio.m */; };
|
||||
66FC0A9B1B3105E1005CF3D7 /* EZAudioDevice.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0A7A1B3105E1005CF3D7 /* EZAudioDevice.m */; };
|
||||
66FC0A9C1B3105E1005CF3D7 /* EZAudioDisplayLink.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0A7C1B3105E1005CF3D7 /* EZAudioDisplayLink.m */; };
|
||||
66FC0A9D1B3105E1005CF3D7 /* EZAudioFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0A7E1B3105E1005CF3D7 /* EZAudioFile.m */; };
|
||||
66FC0A9E1B3105E1005CF3D7 /* EZAudioFloatConverter.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0A801B3105E1005CF3D7 /* EZAudioFloatConverter.m */; };
|
||||
66FC0A9F1B3105E1005CF3D7 /* EZAudioFloatData.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0A821B3105E1005CF3D7 /* EZAudioFloatData.m */; };
|
||||
66FC0AA01B3105E1005CF3D7 /* EZAudioPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0A841B3105E1005CF3D7 /* EZAudioPlayer.m */; };
|
||||
66FC0AA11B3105E1005CF3D7 /* EZAudioPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0A861B3105E1005CF3D7 /* EZAudioPlot.m */; };
|
||||
66FC0AA21B3105E1005CF3D7 /* EZAudioPlotGL.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0A881B3105E1005CF3D7 /* EZAudioPlotGL.m */; };
|
||||
66FC0AA31B3105E1005CF3D7 /* EZAudioPlotGLKViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0A8A1B3105E1005CF3D7 /* EZAudioPlotGLKViewController.m */; };
|
||||
66FC0AA41B3105E1005CF3D7 /* EZAudioUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0A8C1B3105E1005CF3D7 /* EZAudioUtilities.m */; };
|
||||
66FC0AA51B3105E1005CF3D7 /* EZMicrophone.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0A8E1B3105E1005CF3D7 /* EZMicrophone.m */; };
|
||||
66FC0AA61B3105E1005CF3D7 /* EZOutput.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0A901B3105E1005CF3D7 /* EZOutput.m */; };
|
||||
66FC0AA71B3105E1005CF3D7 /* EZPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0A921B3105E1005CF3D7 /* EZPlot.m */; };
|
||||
66FC0AA81B3105E1005CF3D7 /* EZRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0A941B3105E1005CF3D7 /* EZRecorder.m */; };
|
||||
66FC0AA91B3105E1005CF3D7 /* TPCircularBuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0A951B3105E1005CF3D7 /* TPCircularBuffer.c */; };
|
||||
66FC0AAA1B3105E1005CF3D7 /* CHANGELOG in Resources */ = {isa = PBXBuildFile; fileRef = 66FC0A981B3105E1005CF3D7 /* CHANGELOG */; };
|
||||
66FC0AAB1B3105E1005CF3D7 /* VERSION in Resources */ = {isa = PBXBuildFile; fileRef = 66FC0A991B3105E1005CF3D7 /* VERSION */; };
|
||||
94056D88185B97E300EB94BA /* CoreGraphicsWaveformViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 94056D86185B97E300EB94BA /* CoreGraphicsWaveformViewController.m */; };
|
||||
94056D89185B97E300EB94BA /* CoreGraphicsWaveformViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 94056D87185B97E300EB94BA /* CoreGraphicsWaveformViewController.xib */; };
|
||||
9417A6F01867DC8300D9D37B /* AEFloatConverter.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A6D81867DC8300D9D37B /* AEFloatConverter.m */; };
|
||||
9417A6F11867DC8300D9D37B /* EZAudio.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A6DA1867DC8300D9D37B /* EZAudio.m */; };
|
||||
9417A6F21867DC8300D9D37B /* EZAudioFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A6DC1867DC8300D9D37B /* EZAudioFile.m */; };
|
||||
9417A6F31867DC8300D9D37B /* EZAudioPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A6DE1867DC8300D9D37B /* EZAudioPlot.m */; };
|
||||
9417A6F41867DC8300D9D37B /* EZAudioPlotGL.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A6E01867DC8300D9D37B /* EZAudioPlotGL.m */; };
|
||||
9417A6F51867DC8300D9D37B /* EZAudioPlotGLKViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A6E21867DC8300D9D37B /* EZAudioPlotGLKViewController.m */; };
|
||||
9417A6F61867DC8300D9D37B /* EZMicrophone.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A6E41867DC8300D9D37B /* EZMicrophone.m */; };
|
||||
9417A6F71867DC8300D9D37B /* EZOutput.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A6E61867DC8300D9D37B /* EZOutput.m */; };
|
||||
9417A6F81867DC8300D9D37B /* EZPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A6E81867DC8300D9D37B /* EZPlot.m */; };
|
||||
9417A6F91867DC8300D9D37B /* EZRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A6EA1867DC8300D9D37B /* EZRecorder.m */; };
|
||||
9417A6FA1867DC8300D9D37B /* TPCircularBuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 9417A6EB1867DC8300D9D37B /* TPCircularBuffer.c */; };
|
||||
9417A6FB1867DC8300D9D37B /* CHANGELOG in Resources */ = {isa = PBXBuildFile; fileRef = 9417A6EE1867DC8300D9D37B /* CHANGELOG */; };
|
||||
9417A6FC1867DC8300D9D37B /* VERSION in Resources */ = {isa = PBXBuildFile; fileRef = 9417A6EF1867DC8300D9D37B /* VERSION */; };
|
||||
94373025185B931C00F315F0 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94373024185B931C00F315F0 /* Cocoa.framework */; };
|
||||
9437302F185B931C00F315F0 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 9437302D185B931C00F315F0 /* InfoPlist.strings */; };
|
||||
94373031185B931C00F315F0 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 94373030185B931C00F315F0 /* main.m */; };
|
||||
@@ -66,33 +71,43 @@
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
66FC0A771B3105E1005CF3D7 /* EZAudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudio.h; sourceTree = "<group>"; };
|
||||
66FC0A781B3105E1005CF3D7 /* EZAudio.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudio.m; sourceTree = "<group>"; };
|
||||
66FC0A791B3105E1005CF3D7 /* EZAudioDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioDevice.h; sourceTree = "<group>"; };
|
||||
66FC0A7A1B3105E1005CF3D7 /* EZAudioDevice.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioDevice.m; sourceTree = "<group>"; };
|
||||
66FC0A7B1B3105E1005CF3D7 /* EZAudioDisplayLink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioDisplayLink.h; sourceTree = "<group>"; };
|
||||
66FC0A7C1B3105E1005CF3D7 /* EZAudioDisplayLink.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioDisplayLink.m; sourceTree = "<group>"; };
|
||||
66FC0A7D1B3105E1005CF3D7 /* EZAudioFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioFile.h; sourceTree = "<group>"; };
|
||||
66FC0A7E1B3105E1005CF3D7 /* EZAudioFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioFile.m; sourceTree = "<group>"; };
|
||||
66FC0A7F1B3105E1005CF3D7 /* EZAudioFloatConverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioFloatConverter.h; sourceTree = "<group>"; };
|
||||
66FC0A801B3105E1005CF3D7 /* EZAudioFloatConverter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioFloatConverter.m; sourceTree = "<group>"; };
|
||||
66FC0A811B3105E1005CF3D7 /* EZAudioFloatData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioFloatData.h; sourceTree = "<group>"; };
|
||||
66FC0A821B3105E1005CF3D7 /* EZAudioFloatData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioFloatData.m; sourceTree = "<group>"; };
|
||||
66FC0A831B3105E1005CF3D7 /* EZAudioPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlayer.h; sourceTree = "<group>"; };
|
||||
66FC0A841B3105E1005CF3D7 /* EZAudioPlayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlayer.m; sourceTree = "<group>"; };
|
||||
66FC0A851B3105E1005CF3D7 /* EZAudioPlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlot.h; sourceTree = "<group>"; };
|
||||
66FC0A861B3105E1005CF3D7 /* EZAudioPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlot.m; sourceTree = "<group>"; };
|
||||
66FC0A871B3105E1005CF3D7 /* EZAudioPlotGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGL.h; sourceTree = "<group>"; };
|
||||
66FC0A881B3105E1005CF3D7 /* EZAudioPlotGL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGL.m; sourceTree = "<group>"; };
|
||||
66FC0A891B3105E1005CF3D7 /* EZAudioPlotGLKViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGLKViewController.h; sourceTree = "<group>"; };
|
||||
66FC0A8A1B3105E1005CF3D7 /* EZAudioPlotGLKViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGLKViewController.m; sourceTree = "<group>"; };
|
||||
66FC0A8B1B3105E1005CF3D7 /* EZAudioUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioUtilities.h; sourceTree = "<group>"; };
|
||||
66FC0A8C1B3105E1005CF3D7 /* EZAudioUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioUtilities.m; sourceTree = "<group>"; };
|
||||
66FC0A8D1B3105E1005CF3D7 /* EZMicrophone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZMicrophone.h; sourceTree = "<group>"; };
|
||||
66FC0A8E1B3105E1005CF3D7 /* EZMicrophone.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZMicrophone.m; sourceTree = "<group>"; };
|
||||
66FC0A8F1B3105E1005CF3D7 /* EZOutput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZOutput.h; sourceTree = "<group>"; };
|
||||
66FC0A901B3105E1005CF3D7 /* EZOutput.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZOutput.m; sourceTree = "<group>"; };
|
||||
66FC0A911B3105E1005CF3D7 /* EZPlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZPlot.h; sourceTree = "<group>"; };
|
||||
66FC0A921B3105E1005CF3D7 /* EZPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZPlot.m; sourceTree = "<group>"; };
|
||||
66FC0A931B3105E1005CF3D7 /* EZRecorder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZRecorder.h; sourceTree = "<group>"; };
|
||||
66FC0A941B3105E1005CF3D7 /* EZRecorder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZRecorder.m; sourceTree = "<group>"; };
|
||||
66FC0A951B3105E1005CF3D7 /* TPCircularBuffer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = TPCircularBuffer.c; sourceTree = "<group>"; };
|
||||
66FC0A961B3105E1005CF3D7 /* TPCircularBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TPCircularBuffer.h; sourceTree = "<group>"; };
|
||||
66FC0A981B3105E1005CF3D7 /* CHANGELOG */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CHANGELOG; sourceTree = "<group>"; };
|
||||
66FC0A991B3105E1005CF3D7 /* VERSION */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VERSION; sourceTree = "<group>"; };
|
||||
94056D85185B97E300EB94BA /* CoreGraphicsWaveformViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = CoreGraphicsWaveformViewController.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
|
||||
94056D86185B97E300EB94BA /* CoreGraphicsWaveformViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = CoreGraphicsWaveformViewController.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
|
||||
94056D87185B97E300EB94BA /* CoreGraphicsWaveformViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CoreGraphicsWaveformViewController.xib; sourceTree = "<group>"; };
|
||||
9417A6D71867DC8300D9D37B /* AEFloatConverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AEFloatConverter.h; sourceTree = "<group>"; };
|
||||
9417A6D81867DC8300D9D37B /* AEFloatConverter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AEFloatConverter.m; sourceTree = "<group>"; };
|
||||
9417A6D91867DC8300D9D37B /* EZAudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudio.h; sourceTree = "<group>"; };
|
||||
9417A6DA1867DC8300D9D37B /* EZAudio.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudio.m; sourceTree = "<group>"; };
|
||||
9417A6DB1867DC8300D9D37B /* EZAudioFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioFile.h; sourceTree = "<group>"; };
|
||||
9417A6DC1867DC8300D9D37B /* EZAudioFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioFile.m; sourceTree = "<group>"; };
|
||||
9417A6DD1867DC8300D9D37B /* EZAudioPlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlot.h; sourceTree = "<group>"; };
|
||||
9417A6DE1867DC8300D9D37B /* EZAudioPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlot.m; sourceTree = "<group>"; };
|
||||
9417A6DF1867DC8300D9D37B /* EZAudioPlotGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGL.h; sourceTree = "<group>"; };
|
||||
9417A6E01867DC8300D9D37B /* EZAudioPlotGL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGL.m; sourceTree = "<group>"; };
|
||||
9417A6E11867DC8300D9D37B /* EZAudioPlotGLKViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGLKViewController.h; sourceTree = "<group>"; };
|
||||
9417A6E21867DC8300D9D37B /* EZAudioPlotGLKViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGLKViewController.m; sourceTree = "<group>"; };
|
||||
9417A6E31867DC8300D9D37B /* EZMicrophone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZMicrophone.h; sourceTree = "<group>"; };
|
||||
9417A6E41867DC8300D9D37B /* EZMicrophone.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZMicrophone.m; sourceTree = "<group>"; };
|
||||
9417A6E51867DC8300D9D37B /* EZOutput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZOutput.h; sourceTree = "<group>"; };
|
||||
9417A6E61867DC8300D9D37B /* EZOutput.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZOutput.m; sourceTree = "<group>"; };
|
||||
9417A6E71867DC8300D9D37B /* EZPlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZPlot.h; sourceTree = "<group>"; };
|
||||
9417A6E81867DC8300D9D37B /* EZPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZPlot.m; sourceTree = "<group>"; };
|
||||
9417A6E91867DC8300D9D37B /* EZRecorder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZRecorder.h; sourceTree = "<group>"; };
|
||||
9417A6EA1867DC8300D9D37B /* EZRecorder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZRecorder.m; sourceTree = "<group>"; };
|
||||
9417A6EB1867DC8300D9D37B /* TPCircularBuffer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = TPCircularBuffer.c; sourceTree = "<group>"; };
|
||||
9417A6EC1867DC8300D9D37B /* TPCircularBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TPCircularBuffer.h; sourceTree = "<group>"; };
|
||||
9417A6EE1867DC8300D9D37B /* CHANGELOG */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CHANGELOG; sourceTree = "<group>"; };
|
||||
9417A6EF1867DC8300D9D37B /* VERSION */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VERSION; sourceTree = "<group>"; };
|
||||
94373021185B931C00F315F0 /* EZAudioCoreGraphicsWaveformExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = EZAudioCoreGraphicsWaveformExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
94373024185B931C00F315F0 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
|
||||
94373027185B931C00F315F0 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
|
||||
@@ -147,42 +162,52 @@
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
9417A6D61867DC8300D9D37B /* EZAudio */ = {
|
||||
66FC0A761B3105E1005CF3D7 /* EZAudio */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9417A6D71867DC8300D9D37B /* AEFloatConverter.h */,
|
||||
9417A6D81867DC8300D9D37B /* AEFloatConverter.m */,
|
||||
9417A6D91867DC8300D9D37B /* EZAudio.h */,
|
||||
9417A6DA1867DC8300D9D37B /* EZAudio.m */,
|
||||
9417A6DB1867DC8300D9D37B /* EZAudioFile.h */,
|
||||
9417A6DC1867DC8300D9D37B /* EZAudioFile.m */,
|
||||
9417A6DD1867DC8300D9D37B /* EZAudioPlot.h */,
|
||||
9417A6DE1867DC8300D9D37B /* EZAudioPlot.m */,
|
||||
9417A6DF1867DC8300D9D37B /* EZAudioPlotGL.h */,
|
||||
9417A6E01867DC8300D9D37B /* EZAudioPlotGL.m */,
|
||||
9417A6E11867DC8300D9D37B /* EZAudioPlotGLKViewController.h */,
|
||||
9417A6E21867DC8300D9D37B /* EZAudioPlotGLKViewController.m */,
|
||||
9417A6E31867DC8300D9D37B /* EZMicrophone.h */,
|
||||
9417A6E41867DC8300D9D37B /* EZMicrophone.m */,
|
||||
9417A6E51867DC8300D9D37B /* EZOutput.h */,
|
||||
9417A6E61867DC8300D9D37B /* EZOutput.m */,
|
||||
9417A6E71867DC8300D9D37B /* EZPlot.h */,
|
||||
9417A6E81867DC8300D9D37B /* EZPlot.m */,
|
||||
9417A6E91867DC8300D9D37B /* EZRecorder.h */,
|
||||
9417A6EA1867DC8300D9D37B /* EZRecorder.m */,
|
||||
9417A6EB1867DC8300D9D37B /* TPCircularBuffer.c */,
|
||||
9417A6EC1867DC8300D9D37B /* TPCircularBuffer.h */,
|
||||
9417A6ED1867DC8300D9D37B /* VERSION */,
|
||||
66FC0A771B3105E1005CF3D7 /* EZAudio.h */,
|
||||
66FC0A781B3105E1005CF3D7 /* EZAudio.m */,
|
||||
66FC0A791B3105E1005CF3D7 /* EZAudioDevice.h */,
|
||||
66FC0A7A1B3105E1005CF3D7 /* EZAudioDevice.m */,
|
||||
66FC0A7B1B3105E1005CF3D7 /* EZAudioDisplayLink.h */,
|
||||
66FC0A7C1B3105E1005CF3D7 /* EZAudioDisplayLink.m */,
|
||||
66FC0A7D1B3105E1005CF3D7 /* EZAudioFile.h */,
|
||||
66FC0A7E1B3105E1005CF3D7 /* EZAudioFile.m */,
|
||||
66FC0A7F1B3105E1005CF3D7 /* EZAudioFloatConverter.h */,
|
||||
66FC0A801B3105E1005CF3D7 /* EZAudioFloatConverter.m */,
|
||||
66FC0A811B3105E1005CF3D7 /* EZAudioFloatData.h */,
|
||||
66FC0A821B3105E1005CF3D7 /* EZAudioFloatData.m */,
|
||||
66FC0A831B3105E1005CF3D7 /* EZAudioPlayer.h */,
|
||||
66FC0A841B3105E1005CF3D7 /* EZAudioPlayer.m */,
|
||||
66FC0A851B3105E1005CF3D7 /* EZAudioPlot.h */,
|
||||
66FC0A861B3105E1005CF3D7 /* EZAudioPlot.m */,
|
||||
66FC0A871B3105E1005CF3D7 /* EZAudioPlotGL.h */,
|
||||
66FC0A881B3105E1005CF3D7 /* EZAudioPlotGL.m */,
|
||||
66FC0A891B3105E1005CF3D7 /* EZAudioPlotGLKViewController.h */,
|
||||
66FC0A8A1B3105E1005CF3D7 /* EZAudioPlotGLKViewController.m */,
|
||||
66FC0A8B1B3105E1005CF3D7 /* EZAudioUtilities.h */,
|
||||
66FC0A8C1B3105E1005CF3D7 /* EZAudioUtilities.m */,
|
||||
66FC0A8D1B3105E1005CF3D7 /* EZMicrophone.h */,
|
||||
66FC0A8E1B3105E1005CF3D7 /* EZMicrophone.m */,
|
||||
66FC0A8F1B3105E1005CF3D7 /* EZOutput.h */,
|
||||
66FC0A901B3105E1005CF3D7 /* EZOutput.m */,
|
||||
66FC0A911B3105E1005CF3D7 /* EZPlot.h */,
|
||||
66FC0A921B3105E1005CF3D7 /* EZPlot.m */,
|
||||
66FC0A931B3105E1005CF3D7 /* EZRecorder.h */,
|
||||
66FC0A941B3105E1005CF3D7 /* EZRecorder.m */,
|
||||
66FC0A951B3105E1005CF3D7 /* TPCircularBuffer.c */,
|
||||
66FC0A961B3105E1005CF3D7 /* TPCircularBuffer.h */,
|
||||
66FC0A971B3105E1005CF3D7 /* VERSION */,
|
||||
);
|
||||
name = EZAudio;
|
||||
path = ../../../../EZAudio;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9417A6ED1867DC8300D9D37B /* VERSION */ = {
|
||||
66FC0A971B3105E1005CF3D7 /* VERSION */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9417A6EE1867DC8300D9D37B /* CHANGELOG */,
|
||||
9417A6EF1867DC8300D9D37B /* VERSION */,
|
||||
66FC0A981B3105E1005CF3D7 /* CHANGELOG */,
|
||||
66FC0A991B3105E1005CF3D7 /* VERSION */,
|
||||
);
|
||||
path = VERSION;
|
||||
sourceTree = "<group>";
|
||||
@@ -235,7 +260,7 @@
|
||||
9437302A185B931C00F315F0 /* EZAudioCoreGraphicsWaveformExample */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9417A6D61867DC8300D9D37B /* EZAudio */,
|
||||
66FC0A761B3105E1005CF3D7 /* EZAudio */,
|
||||
94373036185B931C00F315F0 /* AppDelegate.h */,
|
||||
94373037185B931C00F315F0 /* AppDelegate.m */,
|
||||
94056D85185B97E300EB94BA /* CoreGraphicsWaveformViewController.h */,
|
||||
@@ -356,12 +381,12 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
9437302F185B931C00F315F0 /* InfoPlist.strings in Resources */,
|
||||
9417A6FC1867DC8300D9D37B /* VERSION in Resources */,
|
||||
66FC0AAB1B3105E1005CF3D7 /* VERSION in Resources */,
|
||||
9437303D185B931C00F315F0 /* Images.xcassets in Resources */,
|
||||
94373035185B931C00F315F0 /* Credits.rtf in Resources */,
|
||||
94056D89185B97E300EB94BA /* CoreGraphicsWaveformViewController.xib in Resources */,
|
||||
9437303B185B931C00F315F0 /* MainMenu.xib in Resources */,
|
||||
9417A6FB1867DC8300D9D37B /* CHANGELOG in Resources */,
|
||||
66FC0AAA1B3105E1005CF3D7 /* CHANGELOG in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -396,20 +421,25 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
9417A6FA1867DC8300D9D37B /* TPCircularBuffer.c in Sources */,
|
||||
9417A6F71867DC8300D9D37B /* EZOutput.m in Sources */,
|
||||
9417A6F51867DC8300D9D37B /* EZAudioPlotGLKViewController.m in Sources */,
|
||||
66FC0AA81B3105E1005CF3D7 /* EZRecorder.m in Sources */,
|
||||
94056D88185B97E300EB94BA /* CoreGraphicsWaveformViewController.m in Sources */,
|
||||
9417A6F01867DC8300D9D37B /* AEFloatConverter.m in Sources */,
|
||||
66FC0A9E1B3105E1005CF3D7 /* EZAudioFloatConverter.m in Sources */,
|
||||
66FC0A9F1B3105E1005CF3D7 /* EZAudioFloatData.m in Sources */,
|
||||
66FC0A9A1B3105E1005CF3D7 /* EZAudio.m in Sources */,
|
||||
66FC0A9D1B3105E1005CF3D7 /* EZAudioFile.m in Sources */,
|
||||
66FC0AA61B3105E1005CF3D7 /* EZOutput.m in Sources */,
|
||||
66FC0AA21B3105E1005CF3D7 /* EZAudioPlotGL.m in Sources */,
|
||||
66FC0AA91B3105E1005CF3D7 /* TPCircularBuffer.c in Sources */,
|
||||
66FC0AA11B3105E1005CF3D7 /* EZAudioPlot.m in Sources */,
|
||||
94373038185B931C00F315F0 /* AppDelegate.m in Sources */,
|
||||
9417A6F31867DC8300D9D37B /* EZAudioPlot.m in Sources */,
|
||||
9417A6F21867DC8300D9D37B /* EZAudioFile.m in Sources */,
|
||||
9417A6F41867DC8300D9D37B /* EZAudioPlotGL.m in Sources */,
|
||||
66FC0AA51B3105E1005CF3D7 /* EZMicrophone.m in Sources */,
|
||||
66FC0AA01B3105E1005CF3D7 /* EZAudioPlayer.m in Sources */,
|
||||
94373031185B931C00F315F0 /* main.m in Sources */,
|
||||
9417A6F81867DC8300D9D37B /* EZPlot.m in Sources */,
|
||||
9417A6F61867DC8300D9D37B /* EZMicrophone.m in Sources */,
|
||||
9417A6F91867DC8300D9D37B /* EZRecorder.m in Sources */,
|
||||
9417A6F11867DC8300D9D37B /* EZAudio.m in Sources */,
|
||||
66FC0A9C1B3105E1005CF3D7 /* EZAudioDisplayLink.m in Sources */,
|
||||
66FC0AA71B3105E1005CF3D7 /* EZPlot.m in Sources */,
|
||||
66FC0A9B1B3105E1005CF3D7 /* EZAudioDevice.m in Sources */,
|
||||
66FC0AA41B3105E1005CF3D7 /* EZAudioUtilities.m in Sources */,
|
||||
66FC0AA31B3105E1005CF3D7 /* EZAudioPlotGLKViewController.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -652,6 +682,7 @@
|
||||
94F8DF4C18C84204005C4CBD /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
|
||||
+4
-2
@@ -58,7 +58,8 @@
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable>
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "94373020185B931C00F315F0"
|
||||
@@ -76,7 +77,8 @@
|
||||
useCustomWorkingDirectory = "NO"
|
||||
buildConfiguration = "Release"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable>
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "94373020185B931C00F315F0"
|
||||
|
||||
+2
-2
@@ -7,12 +7,12 @@
|
||||
<key>EZAudioCoreGraphicsWaveformExample.xcscheme</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>0</integer>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
<key>Generate Documentation.xcscheme</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>1</integer>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>SuppressBuildableAutocreation</key>
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@
|
||||
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
|
||||
{
|
||||
// Swap in our view controller in the window's content view
|
||||
self.coreGraphicsWaveformViewController = [[CoreGraphicsWaveformViewController alloc] init];
|
||||
self.coreGraphicsWaveformViewController = [[CoreGraphicsWaveformViewController alloc] initWithNibName:NSStringFromClass(CoreGraphicsWaveformViewController.class) bundle:nil];
|
||||
// Resize view controller to content view's current size
|
||||
self.coreGraphicsWaveformViewController.view.frame = [self.window.contentView frame];
|
||||
// Add resizing flags to make the view controller resize with the window
|
||||
|
||||
+340
-140
@@ -1,100 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="4439" systemVersion="13A451" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="7702" systemVersion="14C109" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="4439"/>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="7702"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<customObject id="-2" userLabel="File's Owner" customClass="NSApplication">
|
||||
<connections>
|
||||
<action selector="orderFrontStandardAboutPanel:" destination="58" id="142"/>
|
||||
<outlet property="delegate" destination="494" id="495"/>
|
||||
</connections>
|
||||
</customObject>
|
||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder">
|
||||
<connections>
|
||||
<action selector="alignCenter:" destination="499" id="518"/>
|
||||
<action selector="alignJustified:" destination="500" id="523"/>
|
||||
<action selector="alignLeft:" destination="498" id="524"/>
|
||||
<action selector="alignRight:" destination="501" id="521"/>
|
||||
<action selector="arrangeInFront:" destination="5" id="39"/>
|
||||
<action selector="capitalizeWord:" destination="466" id="467"/>
|
||||
<action selector="centerSelectionInVisibleArea:" destination="210" id="245"/>
|
||||
<action selector="checkSpelling:" destination="201" id="225"/>
|
||||
<action selector="clearRecentDocuments:" destination="126" id="127"/>
|
||||
<action selector="copy:" destination="197" id="224"/>
|
||||
<action selector="copyFont:" destination="403" id="428"/>
|
||||
<action selector="copyRuler:" destination="506" id="522"/>
|
||||
<action selector="cut:" destination="199" id="228"/>
|
||||
<action selector="delete:" destination="202" id="235"/>
|
||||
<action selector="hide:" destination="134" id="367"/>
|
||||
<action selector="hideOtherApplications:" destination="145" id="368"/>
|
||||
<action selector="loosenKerning:" destination="419" id="435"/>
|
||||
<action selector="lowerBaseline:" destination="410" id="427"/>
|
||||
<action selector="lowercaseWord:" destination="465" id="468"/>
|
||||
<action selector="makeBaseWritingDirectionLeftToRight:" destination="511" id="526"/>
|
||||
<action selector="makeBaseWritingDirectionNatural:" destination="510" id="525"/>
|
||||
<action selector="makeBaseWritingDirectionRightToLeft:" destination="512" id="527"/>
|
||||
<action selector="makeTextWritingDirectionLeftToRight:" destination="516" id="529"/>
|
||||
<action selector="makeTextWritingDirectionNatural:" destination="515" id="528"/>
|
||||
<action selector="makeTextWritingDirectionRightToLeft:" destination="517" id="530"/>
|
||||
<action selector="newDocument:" destination="82" id="373"/>
|
||||
<action selector="openDocument:" destination="72" id="374"/>
|
||||
<action selector="orderFrontColorPanel:" destination="401" id="433"/>
|
||||
<action selector="orderFrontSubstitutionsPanel:" destination="457" id="458"/>
|
||||
<action selector="paste:" destination="203" id="226"/>
|
||||
<action selector="pasteAsPlainText:" destination="485" id="486"/>
|
||||
<action selector="pasteFont:" destination="404" id="436"/>
|
||||
<action selector="pasteRuler:" destination="507" id="519"/>
|
||||
<action selector="performClose:" destination="73" id="193"/>
|
||||
<action selector="performFindPanelAction:" destination="209" id="241"/>
|
||||
<action selector="performFindPanelAction:" destination="208" id="487"/>
|
||||
<action selector="performFindPanelAction:" destination="213" id="488"/>
|
||||
<action selector="performFindPanelAction:" destination="221" id="489"/>
|
||||
<action selector="performFindPanelAction:" destination="534" id="535"/>
|
||||
<action selector="performMiniaturize:" destination="23" id="37"/>
|
||||
<action selector="performZoom:" destination="239" id="240"/>
|
||||
<action selector="print:" destination="78" id="86"/>
|
||||
<action selector="raiseBaseline:" destination="409" id="426"/>
|
||||
<action selector="redo:" destination="215" id="231"/>
|
||||
<action selector="revertDocumentToSaved:" destination="112" id="364"/>
|
||||
<action selector="runPageLayout:" destination="77" id="87"/>
|
||||
<action selector="runToolbarCustomizationPalette:" destination="298" id="365"/>
|
||||
<action selector="saveDocument:" destination="75" id="362"/>
|
||||
<action selector="selectAll:" destination="198" id="232"/>
|
||||
<action selector="showGuessPanel:" destination="204" id="230"/>
|
||||
<action selector="showHelp:" destination="492" id="493"/>
|
||||
<action selector="startSpeaking:" destination="196" id="233"/>
|
||||
<action selector="stopSpeaking:" destination="195" id="227"/>
|
||||
<action selector="subscript:" destination="408" id="429"/>
|
||||
<action selector="superscript:" destination="407" id="430"/>
|
||||
<action selector="tightenKerning:" destination="418" id="431"/>
|
||||
<action selector="toggleAutomaticDashSubstitution:" destination="460" id="461"/>
|
||||
<action selector="toggleAutomaticLinkDetection:" destination="354" id="357"/>
|
||||
<action selector="toggleAutomaticQuoteSubstitution:" destination="351" id="356"/>
|
||||
<action selector="toggleAutomaticSpellingCorrection:" destination="454" id="456"/>
|
||||
<action selector="toggleAutomaticTextReplacement:" destination="462" id="463"/>
|
||||
<action selector="toggleContinuousSpellChecking:" destination="219" id="222"/>
|
||||
<action selector="toggleGrammarChecking:" destination="346" id="347"/>
|
||||
<action selector="toggleRuler:" destination="505" id="520"/>
|
||||
<action selector="toggleSmartInsertDelete:" destination="350" id="355"/>
|
||||
<action selector="toggleToolbarShown:" destination="297" id="366"/>
|
||||
<action selector="turnOffKerning:" destination="417" id="441"/>
|
||||
<action selector="turnOffLigatures:" destination="413" id="440"/>
|
||||
<action selector="underline:" destination="392" id="432"/>
|
||||
<action selector="undo:" destination="207" id="223"/>
|
||||
<action selector="unhideAllApplications:" destination="150" id="370"/>
|
||||
<action selector="unscript:" destination="406" id="437"/>
|
||||
<action selector="uppercaseWord:" destination="452" id="464"/>
|
||||
<action selector="useAllLigatures:" destination="414" id="434"/>
|
||||
<action selector="useStandardKerning:" destination="416" id="438"/>
|
||||
<action selector="useStandardLigatures:" destination="412" id="439"/>
|
||||
</connections>
|
||||
</customObject>
|
||||
<customObject id="-3" userLabel="Application">
|
||||
<connections>
|
||||
<action selector="terminate:" destination="136" id="449"/>
|
||||
</connections>
|
||||
</customObject>
|
||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||
<menu title="AMainMenu" systemMenu="main" id="29">
|
||||
<items>
|
||||
<menuItem title="EZAudioCoreGraphicsWaveformExample" id="56">
|
||||
@@ -102,6 +19,9 @@
|
||||
<items>
|
||||
<menuItem title="About EZAudioCoreGraphicsWaveformExample" id="58">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="orderFrontStandardAboutPanel:" target="-2" id="142"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="236">
|
||||
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
|
||||
@@ -116,95 +36,211 @@
|
||||
<menuItem isSeparatorItem="YES" id="144">
|
||||
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
|
||||
</menuItem>
|
||||
<menuItem title="Hide EZAudioCoreGraphicsWaveformExample" keyEquivalent="h" id="134"/>
|
||||
<menuItem title="Hide EZAudioCoreGraphicsWaveformExample" keyEquivalent="h" id="134">
|
||||
<connections>
|
||||
<action selector="hide:" target="-1" id="367"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Hide Others" keyEquivalent="h" id="145">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="hideOtherApplications:" target="-1" id="368"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Show All" id="150">
|
||||
<connections>
|
||||
<action selector="unhideAllApplications:" target="-1" id="370"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Show All" id="150"/>
|
||||
<menuItem isSeparatorItem="YES" id="149">
|
||||
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
|
||||
</menuItem>
|
||||
<menuItem title="Quit EZAudioCoreGraphicsWaveformExample" keyEquivalent="q" id="136"/>
|
||||
<menuItem title="Quit EZAudioCoreGraphicsWaveformExample" keyEquivalent="q" id="136">
|
||||
<connections>
|
||||
<action selector="terminate:" target="-3" id="449"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="File" id="83">
|
||||
<menu key="submenu" title="File" id="81">
|
||||
<items>
|
||||
<menuItem title="New" keyEquivalent="n" id="82"/>
|
||||
<menuItem title="Open…" keyEquivalent="o" id="72"/>
|
||||
<menuItem title="New" keyEquivalent="n" id="82">
|
||||
<connections>
|
||||
<action selector="newDocument:" target="-1" id="373"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Open…" keyEquivalent="o" id="72">
|
||||
<connections>
|
||||
<action selector="openDocument:" target="-1" id="374"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Open Recent" id="124">
|
||||
<menu key="submenu" title="Open Recent" systemMenu="recentDocuments" id="125">
|
||||
<items>
|
||||
<menuItem title="Clear Menu" id="126"/>
|
||||
<menuItem title="Clear Menu" id="126">
|
||||
<connections>
|
||||
<action selector="clearRecentDocuments:" target="-1" id="127"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="79">
|
||||
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
|
||||
</menuItem>
|
||||
<menuItem title="Close" keyEquivalent="w" id="73"/>
|
||||
<menuItem title="Save…" keyEquivalent="s" id="75"/>
|
||||
<menuItem title="Close" keyEquivalent="w" id="73">
|
||||
<connections>
|
||||
<action selector="performClose:" target="-1" id="193"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Save…" keyEquivalent="s" id="75">
|
||||
<connections>
|
||||
<action selector="saveDocument:" target="-1" id="362"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Revert to Saved" id="112">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="revertDocumentToSaved:" target="-1" id="364"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="74">
|
||||
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
|
||||
</menuItem>
|
||||
<menuItem title="Page Setup..." keyEquivalent="P" id="77">
|
||||
<modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="runPageLayout:" target="-1" id="87"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Print…" keyEquivalent="p" id="78">
|
||||
<connections>
|
||||
<action selector="print:" target="-1" id="86"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Print…" keyEquivalent="p" id="78"/>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Edit" id="217">
|
||||
<menu key="submenu" title="Edit" id="205">
|
||||
<items>
|
||||
<menuItem title="Undo" keyEquivalent="z" id="207"/>
|
||||
<menuItem title="Undo" keyEquivalent="z" id="207">
|
||||
<connections>
|
||||
<action selector="undo:" target="-1" id="223"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Redo" keyEquivalent="Z" id="215">
|
||||
<modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="redo:" target="-1" id="231"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="206">
|
||||
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
|
||||
</menuItem>
|
||||
<menuItem title="Cut" keyEquivalent="x" id="199"/>
|
||||
<menuItem title="Copy" keyEquivalent="c" id="197"/>
|
||||
<menuItem title="Paste" keyEquivalent="v" id="203"/>
|
||||
<menuItem title="Cut" keyEquivalent="x" id="199">
|
||||
<connections>
|
||||
<action selector="cut:" target="-1" id="228"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Copy" keyEquivalent="c" id="197">
|
||||
<connections>
|
||||
<action selector="copy:" target="-1" id="224"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Paste" keyEquivalent="v" id="203">
|
||||
<connections>
|
||||
<action selector="paste:" target="-1" id="226"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Paste and Match Style" keyEquivalent="V" id="485">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="pasteAsPlainText:" target="-1" id="486"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Delete" id="202">
|
||||
<connections>
|
||||
<action selector="delete:" target="-1" id="235"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Select All" keyEquivalent="a" id="198">
|
||||
<connections>
|
||||
<action selector="selectAll:" target="-1" id="232"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Delete" id="202"/>
|
||||
<menuItem title="Select All" keyEquivalent="a" id="198"/>
|
||||
<menuItem isSeparatorItem="YES" id="214">
|
||||
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
|
||||
</menuItem>
|
||||
<menuItem title="Find" id="218">
|
||||
<menu key="submenu" title="Find" id="220">
|
||||
<items>
|
||||
<menuItem title="Find…" tag="1" keyEquivalent="f" id="209"/>
|
||||
<menuItem title="Find…" tag="1" keyEquivalent="f" id="209">
|
||||
<connections>
|
||||
<action selector="performFindPanelAction:" target="-1" id="241"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Find and Replace…" tag="12" keyEquivalent="f" id="534">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="performFindPanelAction:" target="-1" id="535"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Find Next" tag="2" keyEquivalent="g" id="208">
|
||||
<connections>
|
||||
<action selector="performFindPanelAction:" target="-1" id="487"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Find Next" tag="2" keyEquivalent="g" id="208"/>
|
||||
<menuItem title="Find Previous" tag="3" keyEquivalent="G" id="213">
|
||||
<modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="performFindPanelAction:" target="-1" id="488"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Use Selection for Find" tag="7" keyEquivalent="e" id="221">
|
||||
<connections>
|
||||
<action selector="performFindPanelAction:" target="-1" id="489"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Jump to Selection" keyEquivalent="j" id="210">
|
||||
<connections>
|
||||
<action selector="centerSelectionInVisibleArea:" target="-1" id="245"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Use Selection for Find" tag="7" keyEquivalent="e" id="221"/>
|
||||
<menuItem title="Jump to Selection" keyEquivalent="j" id="210"/>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Spelling and Grammar" id="216">
|
||||
<menu key="submenu" title="Spelling and Grammar" id="200">
|
||||
<items>
|
||||
<menuItem title="Show Spelling and Grammar" keyEquivalent=":" id="204"/>
|
||||
<menuItem title="Check Document Now" keyEquivalent=";" id="201"/>
|
||||
<menuItem title="Show Spelling and Grammar" keyEquivalent=":" id="204">
|
||||
<connections>
|
||||
<action selector="showGuessPanel:" target="-1" id="230"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Check Document Now" keyEquivalent=";" id="201">
|
||||
<connections>
|
||||
<action selector="checkSpelling:" target="-1" id="225"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="453"/>
|
||||
<menuItem title="Check Spelling While Typing" id="219"/>
|
||||
<menuItem title="Check Grammar With Spelling" id="346"/>
|
||||
<menuItem title="Check Spelling While Typing" id="219">
|
||||
<connections>
|
||||
<action selector="toggleContinuousSpellChecking:" target="-1" id="222"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Check Grammar With Spelling" id="346">
|
||||
<connections>
|
||||
<action selector="toggleGrammarChecking:" target="-1" id="347"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Correct Spelling Automatically" id="454">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticSpellingCorrection:" target="-1" id="456"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
@@ -214,18 +250,38 @@
|
||||
<items>
|
||||
<menuItem title="Show Substitutions" id="457">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="orderFrontSubstitutionsPanel:" target="-1" id="458"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="459"/>
|
||||
<menuItem title="Smart Copy/Paste" tag="1" keyEquivalent="f" id="350"/>
|
||||
<menuItem title="Smart Quotes" tag="2" keyEquivalent="g" id="351"/>
|
||||
<menuItem title="Smart Copy/Paste" tag="1" keyEquivalent="f" id="350">
|
||||
<connections>
|
||||
<action selector="toggleSmartInsertDelete:" target="-1" id="355"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Smart Quotes" tag="2" keyEquivalent="g" id="351">
|
||||
<connections>
|
||||
<action selector="toggleAutomaticQuoteSubstitution:" target="-1" id="356"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Smart Dashes" id="460">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticDashSubstitution:" target="-1" id="461"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Smart Links" tag="3" keyEquivalent="G" id="354">
|
||||
<modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticLinkDetection:" target="-1" id="357"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Text Replacement" id="462">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticTextReplacement:" target="-1" id="463"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
@@ -236,12 +292,21 @@
|
||||
<items>
|
||||
<menuItem title="Make Upper Case" id="452">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="uppercaseWord:" target="-1" id="464"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Make Lower Case" id="465">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="lowercaseWord:" target="-1" id="468"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Capitalize" id="466">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="capitalizeWord:" target="-1" id="467"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
@@ -249,8 +314,16 @@
|
||||
<menuItem title="Speech" id="211">
|
||||
<menu key="submenu" title="Speech" id="212">
|
||||
<items>
|
||||
<menuItem title="Start Speaking" id="196"/>
|
||||
<menuItem title="Stop Speaking" id="195"/>
|
||||
<menuItem title="Start Speaking" id="196">
|
||||
<connections>
|
||||
<action selector="startSpeaking:" target="-1" id="233"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Stop Speaking" id="195">
|
||||
<connections>
|
||||
<action selector="stopSpeaking:" target="-1" id="227"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
@@ -265,13 +338,37 @@
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Font" systemMenu="font" id="388">
|
||||
<items>
|
||||
<menuItem title="Show Fonts" keyEquivalent="t" id="389"/>
|
||||
<menuItem title="Bold" tag="2" keyEquivalent="b" id="390"/>
|
||||
<menuItem title="Italic" tag="1" keyEquivalent="i" id="391"/>
|
||||
<menuItem title="Underline" keyEquivalent="u" id="392"/>
|
||||
<menuItem title="Show Fonts" keyEquivalent="t" id="389">
|
||||
<connections>
|
||||
<action selector="orderFrontFontPanel:" target="420" id="424"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Bold" tag="2" keyEquivalent="b" id="390">
|
||||
<connections>
|
||||
<action selector="addFontTrait:" target="420" id="421"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Italic" tag="1" keyEquivalent="i" id="391">
|
||||
<connections>
|
||||
<action selector="addFontTrait:" target="420" id="422"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Underline" keyEquivalent="u" id="392">
|
||||
<connections>
|
||||
<action selector="underline:" target="-1" id="432"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="393"/>
|
||||
<menuItem title="Bigger" tag="3" keyEquivalent="+" id="394"/>
|
||||
<menuItem title="Smaller" tag="4" keyEquivalent="-" id="395"/>
|
||||
<menuItem title="Bigger" tag="3" keyEquivalent="+" id="394">
|
||||
<connections>
|
||||
<action selector="modifyFont:" target="420" id="425"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Smaller" tag="4" keyEquivalent="-" id="395">
|
||||
<connections>
|
||||
<action selector="modifyFont:" target="420" id="423"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="396"/>
|
||||
<menuItem title="Kern" id="397">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
@@ -279,15 +376,27 @@
|
||||
<items>
|
||||
<menuItem title="Use Default" id="416">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="useStandardKerning:" target="-1" id="438"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Use None" id="417">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="turnOffKerning:" target="-1" id="441"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Tighten" id="418">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="tightenKerning:" target="-1" id="431"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Loosen" id="419">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="loosenKerning:" target="-1" id="435"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
@@ -298,12 +407,21 @@
|
||||
<items>
|
||||
<menuItem title="Use Default" id="412">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="useStandardLigatures:" target="-1" id="439"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Use None" id="413">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="turnOffLigatures:" target="-1" id="440"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Use All" id="414">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="useAllLigatures:" target="-1" id="434"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
@@ -314,30 +432,55 @@
|
||||
<items>
|
||||
<menuItem title="Use Default" id="406">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="unscript:" target="-1" id="437"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Superscript" id="407">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="superscript:" target="-1" id="430"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Subscript" id="408">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="subscript:" target="-1" id="429"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Raise" id="409">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="raiseBaseline:" target="-1" id="426"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Lower" id="410">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="lowerBaseline:" target="-1" id="427"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="400"/>
|
||||
<menuItem title="Show Colors" keyEquivalent="C" id="401"/>
|
||||
<menuItem title="Show Colors" keyEquivalent="C" id="401">
|
||||
<connections>
|
||||
<action selector="orderFrontColorPanel:" target="-1" id="433"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="402"/>
|
||||
<menuItem title="Copy Style" keyEquivalent="c" id="403">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="copyFont:" target="-1" id="428"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Paste Style" keyEquivalent="v" id="404">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="pasteFont:" target="-1" id="436"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
@@ -346,12 +489,27 @@
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Text" id="497">
|
||||
<items>
|
||||
<menuItem title="Align Left" keyEquivalent="{" id="498"/>
|
||||
<menuItem title="Center" keyEquivalent="|" id="499"/>
|
||||
<menuItem title="Align Left" keyEquivalent="{" id="498">
|
||||
<connections>
|
||||
<action selector="alignLeft:" target="-1" id="524"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Center" keyEquivalent="|" id="499">
|
||||
<connections>
|
||||
<action selector="alignCenter:" target="-1" id="518"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Justify" id="500">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="alignJustified:" target="-1" id="523"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Align Right" keyEquivalent="}" id="501">
|
||||
<connections>
|
||||
<action selector="alignRight:" target="-1" id="521"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Align Right" keyEquivalent="}" id="501"/>
|
||||
<menuItem isSeparatorItem="YES" id="502"/>
|
||||
<menuItem title="Writing Direction" id="503">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
@@ -363,14 +521,23 @@
|
||||
<menuItem id="510">
|
||||
<string key="title"> Default</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeBaseWritingDirectionNatural:" target="-1" id="525"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem id="511">
|
||||
<string key="title"> Left to Right</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeBaseWritingDirectionLeftToRight:" target="-1" id="526"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem id="512">
|
||||
<string key="title"> Right to Left</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeBaseWritingDirectionRightToLeft:" target="-1" id="527"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="513"/>
|
||||
<menuItem title="Selection" enabled="NO" id="514">
|
||||
@@ -379,14 +546,23 @@
|
||||
<menuItem id="515">
|
||||
<string key="title"> Default</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeTextWritingDirectionNatural:" target="-1" id="528"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem id="516">
|
||||
<string key="title"> Left to Right</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeTextWritingDirectionLeftToRight:" target="-1" id="529"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem id="517">
|
||||
<string key="title"> Right to Left</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeTextWritingDirectionRightToLeft:" target="-1" id="530"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
@@ -394,12 +570,21 @@
|
||||
<menuItem isSeparatorItem="YES" id="504"/>
|
||||
<menuItem title="Show Ruler" id="505">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleRuler:" target="-1" id="520"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Copy Ruler" keyEquivalent="c" id="506">
|
||||
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="copyRuler:" target="-1" id="522"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Paste Ruler" keyEquivalent="v" id="507">
|
||||
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="pasteRuler:" target="-1" id="519"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
@@ -412,20 +597,39 @@
|
||||
<items>
|
||||
<menuItem title="Show Toolbar" keyEquivalent="t" id="297">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="toggleToolbarShown:" target="-1" id="366"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Customize Toolbar…" id="298">
|
||||
<connections>
|
||||
<action selector="runToolbarCustomizationPalette:" target="-1" id="365"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Customize Toolbar…" id="298"/>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Window" id="19">
|
||||
<menu key="submenu" title="Window" systemMenu="window" id="24">
|
||||
<items>
|
||||
<menuItem title="Minimize" keyEquivalent="m" id="23"/>
|
||||
<menuItem title="Zoom" id="239"/>
|
||||
<menuItem title="Minimize" keyEquivalent="m" id="23">
|
||||
<connections>
|
||||
<action selector="performMiniaturize:" target="-1" id="37"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Zoom" id="239">
|
||||
<connections>
|
||||
<action selector="performZoom:" target="-1" id="240"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="92">
|
||||
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
|
||||
</menuItem>
|
||||
<menuItem title="Bring All to Front" id="5"/>
|
||||
<menuItem title="Bring All to Front" id="5">
|
||||
<connections>
|
||||
<action selector="arrangeInFront:" target="-1" id="39"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
@@ -433,7 +637,11 @@
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Help" systemMenu="help" id="491">
|
||||
<items>
|
||||
<menuItem title="EZAudioCoreGraphicsWaveformExample Help" keyEquivalent="?" id="492"/>
|
||||
<menuItem title="EZAudioCoreGraphicsWaveformExample Help" keyEquivalent="?" id="492">
|
||||
<connections>
|
||||
<action selector="showHelp:" target="-1" id="493"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
@@ -443,7 +651,7 @@
|
||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
|
||||
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
|
||||
<rect key="contentRect" x="335" y="390" width="480" height="360"/>
|
||||
<rect key="screenRect" x="0.0" y="0.0" width="2560" height="1418"/>
|
||||
<rect key="screenRect" x="0.0" y="0.0" width="1440" height="877"/>
|
||||
<view key="contentView" id="372">
|
||||
<rect key="frame" x="0.0" y="0.0" width="480" height="360"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
@@ -454,14 +662,6 @@
|
||||
<outlet property="window" destination="371" id="532"/>
|
||||
</connections>
|
||||
</customObject>
|
||||
<customObject id="420" customClass="NSFontManager">
|
||||
<connections>
|
||||
<action selector="addFontTrait:" destination="390" id="421"/>
|
||||
<action selector="addFontTrait:" destination="391" id="422"/>
|
||||
<action selector="modifyFont:" destination="395" id="423"/>
|
||||
<action selector="modifyFont:" destination="394" id="425"/>
|
||||
<action selector="orderFrontFontPanel:" destination="389" id="424"/>
|
||||
</connections>
|
||||
</customObject>
|
||||
<customObject id="420" customClass="NSFontManager"/>
|
||||
</objects>
|
||||
</document>
|
||||
|
||||
+18
-2
@@ -33,18 +33,34 @@
|
||||
*/
|
||||
@interface CoreGraphicsWaveformViewController : NSViewController <EZMicrophoneDelegate>
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Components
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
The CoreGraphics based audio plot
|
||||
*/
|
||||
@property (nonatomic,weak) IBOutlet EZAudioPlot *audioPlot;
|
||||
@property (nonatomic, weak) IBOutlet EZAudioPlot *audioPlot;
|
||||
|
||||
/**
|
||||
The microphone component
|
||||
*/
|
||||
@property (nonatomic,strong) EZMicrophone *microphone;
|
||||
@property (nonatomic, strong) EZMicrophone *microphone;
|
||||
|
||||
/**
|
||||
The microphone pop up button (contains the menu for choosing a microphone input)
|
||||
*/
|
||||
@property (nonatomic, weak) IBOutlet NSPopUpButton *microphoneInputPopUpButton;
|
||||
|
||||
/**
|
||||
The microphone input channel pop up button (contains the menu for choosing a microphone input channel)
|
||||
*/
|
||||
@property (nonatomic, weak) IBOutlet NSPopUpButton *microphoneInputChannelPopUpButton;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Actions
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Switches the plot drawing type between a buffer plot (visualizes the current stream of audio data from the update function) or a rolling plot (visualizes the audio data over time, this is the classic waveform look)
|
||||
*/
|
||||
|
||||
+187
-104
@@ -25,140 +25,223 @@
|
||||
|
||||
#import "CoreGraphicsWaveformViewController.h"
|
||||
|
||||
@interface CoreGraphicsWaveformViewController ()
|
||||
|
||||
@end
|
||||
|
||||
@implementation CoreGraphicsWaveformViewController
|
||||
|
||||
#pragma mark - Initialization
|
||||
-(id)init {
|
||||
self = [super initWithNibName:NSStringFromClass(self.class) bundle:nil];
|
||||
if(self){
|
||||
[self initializeViewController];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(id)initWithCoder:(NSCoder *)aDecoder {
|
||||
self = [super initWithNibName:NSStringFromClass(self.class) bundle:nil];
|
||||
if(self){
|
||||
[self initializeViewController];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
|
||||
self = [super initWithNibName:NSStringFromClass(self.class) bundle:nil];
|
||||
if(self){
|
||||
[self initializeViewController];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Initialize View Controller
|
||||
-(void)initializeViewController {
|
||||
// Create an instance of the microphone and tell it to use this view controller instance as the delegate
|
||||
self.microphone = [EZMicrophone microphoneWithDelegate:self];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Customize the Audio Plot
|
||||
-(void)awakeFromNib {
|
||||
|
||||
/*
|
||||
Customizing the audio plot's look
|
||||
*/
|
||||
// Background color
|
||||
self.audioPlot.backgroundColor = [NSColor colorWithCalibratedRed: 0.984 green: 0.471 blue: 0.525 alpha: 1];
|
||||
// Waveform color
|
||||
self.audioPlot.color = [NSColor colorWithCalibratedRed: 1.000 green: 1.000 blue: 1.000 alpha: 1];
|
||||
// Plot type
|
||||
self.audioPlot.plotType = EZPlotTypeBuffer;
|
||||
|
||||
/*
|
||||
Start the microphone
|
||||
*/
|
||||
[self.microphone startFetchingAudio];
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
//
|
||||
// Customizing the audio plot's look
|
||||
//
|
||||
// Background color
|
||||
self.audioPlot.backgroundColor = [NSColor colorWithCalibratedRed: 0.984 green: 0.471 blue: 0.525 alpha: 1];
|
||||
|
||||
// Waveform color
|
||||
self.audioPlot.color = [NSColor colorWithCalibratedRed: 1.000 green: 1.000 blue: 1.000 alpha: 1];
|
||||
|
||||
// Plot type
|
||||
self.audioPlot.plotType = EZPlotTypeBuffer;
|
||||
|
||||
//
|
||||
// Create the microphone
|
||||
//
|
||||
self.microphone = [EZMicrophone microphoneWithDelegate:self];
|
||||
|
||||
//
|
||||
// Start the microphone
|
||||
//
|
||||
[self.microphone startFetchingAudio];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Setup
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void) reloadMicrophoneInputPopUpButtonMenu
|
||||
{
|
||||
NSArray *inputDevices = [EZAudioDevice inputDevices];
|
||||
NSMenu *menu = [[NSMenu alloc] init];
|
||||
NSMenuItem *defaultInputMenuItem;
|
||||
for (EZAudioDevice *device in inputDevices)
|
||||
{
|
||||
NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:device.name
|
||||
action:@selector(changedInput:)
|
||||
keyEquivalent:@""];
|
||||
item.representedObject = device;
|
||||
item.target = self;
|
||||
[menu addItem:item];
|
||||
|
||||
// If this device is the same one the microphone is using then
|
||||
// we will use this menu item as the currently selected item
|
||||
// in the microphone input popup button's list of items. For instance,
|
||||
// if you are connected to an external display by default the external
|
||||
// display's microphone might be used instead of the mac's built in
|
||||
// mic.
|
||||
if ([device isEqual:self.microphone.device])
|
||||
{
|
||||
defaultInputMenuItem = item;
|
||||
}
|
||||
}
|
||||
self.microphoneInputPopUpButton.menu = menu;
|
||||
|
||||
//
|
||||
// Set the selected device to the current selection on the
|
||||
// microphone input popup button
|
||||
//
|
||||
[self.microphoneInputPopUpButton selectItem:defaultInputMenuItem];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void) reloadMicrophoneInputChannelPopUpButtonMenu
|
||||
{
|
||||
NSMenu *menu = [[NSMenu alloc] init];
|
||||
for (int i = 0; i < self.microphone.device.inputChannelCount; i++)
|
||||
{
|
||||
NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:@(i).stringValue
|
||||
action:@selector(changedInputChannel:)
|
||||
keyEquivalent:@""];
|
||||
item.representedObject = @(i);
|
||||
item.target = self;
|
||||
[menu addItem:item];
|
||||
}
|
||||
self.microphoneInputChannelPopUpButton.menu = menu;
|
||||
[self.microphoneInputChannelPopUpButton selectItemAtIndex:0];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Actions
|
||||
-(void)changePlotType:(id)sender {
|
||||
NSInteger selectedSegment = [sender selectedSegment];
|
||||
switch(selectedSegment){
|
||||
case 0:
|
||||
[self drawBufferPlot];
|
||||
break;
|
||||
case 1:
|
||||
[self drawRollingPlot];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)changedInput:(id)sender
|
||||
{
|
||||
EZAudioDevice *device = [sender representedObject];
|
||||
[self.microphone setDevice:device];
|
||||
}
|
||||
|
||||
-(void)toggleMicrophone:(id)sender {
|
||||
switch([sender state]){
|
||||
case NSOffState:
|
||||
[self.microphone stopFetchingAudio];
|
||||
break;
|
||||
case NSOnState:
|
||||
[self.microphone startFetchingAudio];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)changedInputChannel:(id)sender
|
||||
{
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)changePlotType:(id)sender
|
||||
{
|
||||
NSInteger selectedSegment = [sender selectedSegment];
|
||||
switch(selectedSegment)
|
||||
{
|
||||
case 0:
|
||||
[self drawBufferPlot];
|
||||
break;
|
||||
case 1:
|
||||
[self drawRollingPlot];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)toggleMicrophone:(id)sender
|
||||
{
|
||||
switch([sender state])
|
||||
{
|
||||
case NSOffState:
|
||||
[self.microphone stopFetchingAudio];
|
||||
break;
|
||||
case NSOnState:
|
||||
[self.microphone startFetchingAudio];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Action Extensions
|
||||
/*
|
||||
Give the visualization of the current buffer (this is almost exactly the openFrameworks audio input eample)
|
||||
*/
|
||||
-(void)drawBufferPlot {
|
||||
// Change the plot type to the buffer plot
|
||||
self.audioPlot.plotType = EZPlotTypeBuffer;
|
||||
// Don't mirror over the x-axis
|
||||
self.audioPlot.shouldMirror = NO;
|
||||
// Don't fill
|
||||
self.audioPlot.shouldFill = NO;
|
||||
- (void)drawBufferPlot
|
||||
{
|
||||
self.audioPlot.plotType = EZPlotTypeBuffer;
|
||||
self.audioPlot.shouldMirror = NO;
|
||||
self.audioPlot.shouldFill = NO;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
Give the classic mirrored, rolling waveform look
|
||||
*/
|
||||
-(void)drawRollingPlot {
|
||||
self.audioPlot.plotType = EZPlotTypeRolling;
|
||||
self.audioPlot.shouldFill = YES;
|
||||
self.audioPlot.shouldMirror = YES;
|
||||
- (void)drawRollingPlot
|
||||
{
|
||||
self.audioPlot.plotType = EZPlotTypeRolling;
|
||||
self.audioPlot.shouldFill = YES;
|
||||
self.audioPlot.shouldMirror = YES;
|
||||
}
|
||||
|
||||
#pragma mark - EZMicrophoneDelegate
|
||||
#warning Thread Safety
|
||||
// Note that any callback that provides streamed audio data (like streaming microphone input) happens on a separate audio thread that should not be blocked. When we feed audio data into any of the UI components we need to explicity create a GCD block on the main thread to properly get the UI to work.
|
||||
-(void)microphone:(EZMicrophone *)microphone
|
||||
hasAudioReceived:(float **)buffer
|
||||
withBufferSize:(UInt32)bufferSize
|
||||
withNumberOfChannels:(UInt32)numberOfChannels {
|
||||
// Getting audio data as an array of float buffer arrays. What does that mean? Because the audio is coming in as a stereo signal the data is split into a left and right channel. So buffer[0] corresponds to the float* data for the left channel while buffer[1] corresponds to the float* data for the right channel.
|
||||
|
||||
// See the Thread Safety warning above, but in a nutshell these callbacks happen on a separate audio thread. We wrap any UI updating in a GCD block on the main thread to avoid blocking that audio flow.
|
||||
dispatch_async(dispatch_get_main_queue(),^{
|
||||
- (void)microphone:(EZMicrophone *)microphone
|
||||
hasAudioReceived:(float **)buffer
|
||||
withBufferSize:(UInt32)bufferSize
|
||||
withNumberOfChannels:(UInt32)numberOfChannels
|
||||
{
|
||||
// See the Thread Safety warning above, but in a nutshell these callbacks happen on a separate audio thread. We wrap any UI updating in a GCD block on the main thread to avoid blocking that audio flow.
|
||||
__weak typeof(self) weakSelf = self;
|
||||
dispatch_async(dispatch_get_main_queue(),^{
|
||||
// All the audio plot needs is the buffer data (float*) and the size. Internally the audio plot will handle all the drawing related code, history management, and freeing its own resources. Hence, one badass line of code gets you a pretty plot :)
|
||||
[self.audioPlot updateBuffer:buffer[0] withBufferSize:bufferSize];
|
||||
});
|
||||
NSInteger channel = [weakSelf.microphoneInputChannelPopUpButton indexOfSelectedItem];
|
||||
[weakSelf.audioPlot updateBuffer:buffer[channel] withBufferSize:bufferSize];
|
||||
});
|
||||
}
|
||||
|
||||
-(void)microphone:(EZMicrophone *)microphone hasAudioStreamBasicDescription:(AudioStreamBasicDescription)audioStreamBasicDescription {
|
||||
// The AudioStreamBasicDescription of the microphone stream. This is useful when configuring the EZRecorder or telling another component what audio format type to expect.
|
||||
// Here's a print function to allow you to inspect it a little easier
|
||||
[EZAudio printASBD:audioStreamBasicDescription];
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)microphone:(EZMicrophone *)microphone hasAudioStreamBasicDescription:(AudioStreamBasicDescription)audioStreamBasicDescription
|
||||
{
|
||||
// The AudioStreamBasicDescription of the microphone stream. This is useful when configuring the EZRecorder or telling another component what audio format type to expect.
|
||||
// Here's a print function to allow you to inspect it a little easier
|
||||
[EZAudioUtilities printASBD:audioStreamBasicDescription];
|
||||
}
|
||||
|
||||
-(void)microphone:(EZMicrophone *)microphone
|
||||
hasBufferList:(AudioBufferList *)bufferList
|
||||
withBufferSize:(UInt32)bufferSize
|
||||
withNumberOfChannels:(UInt32)numberOfChannels {
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)microphone:(EZMicrophone *)microphone
|
||||
hasBufferList:(AudioBufferList *)bufferList
|
||||
withBufferSize:(UInt32)bufferSize
|
||||
withNumberOfChannels:(UInt32)numberOfChannels
|
||||
{
|
||||
// Getting audio data as a buffer list that can be directly fed into the EZRecorder or EZOutput. Say whattt...
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)microphone:(EZMicrophone *)microphone
|
||||
changedDevice:(EZAudioDevice *)device
|
||||
{
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
//
|
||||
// Set up the microphone input popup button's items to select
|
||||
// between different microphone inputs
|
||||
//
|
||||
[self reloadMicrophoneInputPopUpButtonMenu];
|
||||
|
||||
//
|
||||
// Set up the microphone input popup button's items to select
|
||||
// between different microphone input channels
|
||||
//
|
||||
[self reloadMicrophoneInputChannelPopUpButtonMenu];
|
||||
});
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@end
|
||||
+97
-46
@@ -1,66 +1,117 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="4514" systemVersion="13A603" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="7702" systemVersion="14C109" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<dependencies>
|
||||
<deployment version="1070" identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="4514"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="7702"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<customObject id="-2" userLabel="File's Owner" customClass="CoreGraphicsWaveformViewController">
|
||||
<connections>
|
||||
<outlet property="audioPlot" destination="1uw-Yi-HM2" id="64z-gn-hPW"/>
|
||||
<outlet property="view" destination="1" id="2"/>
|
||||
<outlet property="audioPlot" destination="wpL-Ou-GSb" id="OME-Hf-I27"/>
|
||||
<outlet property="microphoneInputChannelPopUpButton" destination="Yi6-fS-Cob" id="pLg-4c-klV"/>
|
||||
<outlet property="microphoneInputPopUpButton" destination="SjR-qx-mWV" id="NuN-SS-ESg"/>
|
||||
<outlet property="view" destination="wpL-Ou-GSb" id="oxJ-iT-SKO"/>
|
||||
</connections>
|
||||
</customObject>
|
||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||
<customObject id="-3" userLabel="Application"/>
|
||||
<customView id="1">
|
||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||
<customView id="wpL-Ou-GSb" customClass="EZAudioPlot">
|
||||
<rect key="frame" x="0.0" y="0.0" width="480" height="272"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<subviews>
|
||||
<customView translatesAutoresizingMaskIntoConstraints="NO" id="1uw-Yi-HM2" customClass="EZAudioPlot">
|
||||
<rect key="frame" x="0.0" y="0.0" width="480" height="272"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<subviews>
|
||||
<button translatesAutoresizingMaskIntoConstraints="NO" id="bst-4p-f4H">
|
||||
<rect key="frame" x="18" y="18" width="119" height="18"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<buttonCell key="cell" type="check" title="Microphone On" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="X83-kX-Oau">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="toggleMicrophone:" target="-2" id="WUF-aw-GV2"/>
|
||||
</connections>
|
||||
</button>
|
||||
<segmentedControl verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="xVu-eW-fRp">
|
||||
<rect key="frame" x="333" y="15" width="129" height="24"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<segmentedCell key="cell" alignment="left" style="rounded" trackingMode="selectOne" id="mpa-RS-2hy">
|
||||
<font key="font" metaFont="system"/>
|
||||
<segments>
|
||||
<segment label="Buffer" selected="YES"/>
|
||||
<segment label="Rolling" tag="1"/>
|
||||
</segments>
|
||||
</segmentedCell>
|
||||
<connections>
|
||||
<action selector="changePlotType:" target="-2" id="IsT-Sq-sKO"/>
|
||||
</connections>
|
||||
</segmentedControl>
|
||||
</subviews>
|
||||
<button translatesAutoresizingMaskIntoConstraints="NO" id="kAI-gs-c31">
|
||||
<rect key="frame" x="339" y="44" width="123" height="18"/>
|
||||
<constraints>
|
||||
<constraint firstItem="bst-4p-f4H" firstAttribute="leading" secondItem="1uw-Yi-HM2" secondAttribute="leading" constant="20" id="OEK-K5-KgC"/>
|
||||
<constraint firstAttribute="bottom" secondItem="bst-4p-f4H" secondAttribute="bottom" constant="20" id="Xb8-Oc-8K5"/>
|
||||
<constraint firstAttribute="bottom" secondItem="xVu-eW-fRp" secondAttribute="bottom" constant="17" id="gPn-xu-hrZ"/>
|
||||
<constraint firstAttribute="trailing" secondItem="xVu-eW-fRp" secondAttribute="trailing" constant="20" id="tHh-2L-ypE"/>
|
||||
<constraint firstAttribute="width" constant="119" id="FP4-Wg-HAb"/>
|
||||
</constraints>
|
||||
</customView>
|
||||
<buttonCell key="cell" type="check" title="Microphone On" bezelStyle="regularSquare" imagePosition="right" state="on" inset="2" id="Aml-Gg-JmL">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="toggleMicrophone:" target="-2" id="sFe-vk-GLb"/>
|
||||
</connections>
|
||||
</button>
|
||||
<segmentedControl verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="HTa-6n-EPo">
|
||||
<rect key="frame" x="335" y="15" width="127" height="24"/>
|
||||
<segmentedCell key="cell" borderStyle="border" alignment="left" style="rounded" trackingMode="selectOne" id="bLT-tl-mJ6">
|
||||
<font key="font" metaFont="system"/>
|
||||
<segments>
|
||||
<segment label="Buffer" selected="YES"/>
|
||||
<segment label="Rolling" tag="1"/>
|
||||
</segments>
|
||||
</segmentedCell>
|
||||
<connections>
|
||||
<action selector="changePlotType:" target="-2" id="JTN-f7-xiC"/>
|
||||
</connections>
|
||||
</segmentedControl>
|
||||
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="SjR-qx-mWV" userLabel="microphoneInputPopUpButton">
|
||||
<rect key="frame" x="18" y="14" width="180" height="26"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="175" id="qhz-1c-cOR"/>
|
||||
</constraints>
|
||||
<popUpButtonCell key="cell" type="push" title="Item 1" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="4Kz-CU-9wA" id="Ifz-u8-4sz">
|
||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="menu"/>
|
||||
<menu key="menu" id="si8-Yh-kZX">
|
||||
<items>
|
||||
<menuItem title="Item 1" state="on" id="4Kz-CU-9wA"/>
|
||||
<menuItem title="Item 2" id="XbC-Uc-PrQ"/>
|
||||
<menuItem title="Item 3" id="aao-3c-s5T"/>
|
||||
</items>
|
||||
</menu>
|
||||
</popUpButtonCell>
|
||||
</popUpButton>
|
||||
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Yi6-fS-Cob" userLabel="microphoneInputChannelPopUpButton">
|
||||
<rect key="frame" x="204" y="14" width="79" height="26"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="74" id="w4n-SY-B3n"/>
|
||||
</constraints>
|
||||
<popUpButtonCell key="cell" type="push" title="1" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="K3K-bf-PA5" id="mM3-bX-3dm">
|
||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="menu"/>
|
||||
<menu key="menu" id="u3a-FE-6Wo">
|
||||
<items>
|
||||
<menuItem title="1" state="on" id="K3K-bf-PA5"/>
|
||||
<menuItem title="Item 2" id="gAP-8p-hIp"/>
|
||||
<menuItem title="Item 3" id="5ds-DC-X9S"/>
|
||||
</items>
|
||||
</menu>
|
||||
</popUpButtonCell>
|
||||
</popUpButton>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="fi6-Uh-bvr">
|
||||
<rect key="frame" x="18" y="43" width="31" height="14"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Input" id="Png-Pk-fMc">
|
||||
<font key="font" metaFont="smallSystem"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="HVN-Im-3J1">
|
||||
<rect key="frame" x="204" y="43" width="48" height="14"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Channel" id="lkh-zp-WCY">
|
||||
<font key="font" metaFont="smallSystem"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="1uw-Yi-HM2" firstAttribute="leading" secondItem="1" secondAttribute="leading" id="Fcx-zY-IPv"/>
|
||||
<constraint firstItem="1uw-Yi-HM2" firstAttribute="top" secondItem="1" secondAttribute="top" id="Sfu-lR-KCJ"/>
|
||||
<constraint firstAttribute="trailing" secondItem="1uw-Yi-HM2" secondAttribute="trailing" id="bjW-C2-2Mw"/>
|
||||
<constraint firstAttribute="bottom" secondItem="1uw-Yi-HM2" secondAttribute="bottom" id="f1L-xR-BaI"/>
|
||||
<constraint firstAttribute="bottom" secondItem="SjR-qx-mWV" secondAttribute="bottom" constant="17" id="1kd-d1-9WR"/>
|
||||
<constraint firstAttribute="bottom" secondItem="HTa-6n-EPo" secondAttribute="bottom" constant="17" id="47V-Zg-MD0"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Yi6-fS-Cob" secondAttribute="bottom" constant="17" id="B2R-Tc-cz7"/>
|
||||
<constraint firstItem="Yi6-fS-Cob" firstAttribute="top" secondItem="HVN-Im-3J1" secondAttribute="bottom" constant="5" id="DoN-81-ICT"/>
|
||||
<constraint firstItem="HTa-6n-EPo" firstAttribute="top" secondItem="kAI-gs-c31" secondAttribute="bottom" constant="8" id="GLf-f7-seC"/>
|
||||
<constraint firstItem="Yi6-fS-Cob" firstAttribute="leading" secondItem="SjR-qx-mWV" secondAttribute="trailing" constant="11" id="Pqx-7E-osx"/>
|
||||
<constraint firstItem="Yi6-fS-Cob" firstAttribute="leading" secondItem="HVN-Im-3J1" secondAttribute="leading" id="Ux9-Kd-07J"/>
|
||||
<constraint firstItem="SjR-qx-mWV" firstAttribute="leading" secondItem="wpL-Ou-GSb" secondAttribute="leading" constant="20" id="b29-6j-MdI"/>
|
||||
<constraint firstAttribute="trailing" secondItem="kAI-gs-c31" secondAttribute="trailing" constant="20" id="bR5-ru-Lto"/>
|
||||
<constraint firstItem="fi6-Uh-bvr" firstAttribute="leading" secondItem="wpL-Ou-GSb" secondAttribute="leading" constant="20" id="gqn-qW-0CY"/>
|
||||
<constraint firstItem="HTa-6n-EPo" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="Yi6-fS-Cob" secondAttribute="trailing" constant="11" id="qGD-Te-9IQ"/>
|
||||
<constraint firstItem="SjR-qx-mWV" firstAttribute="top" secondItem="fi6-Uh-bvr" secondAttribute="bottom" constant="5" id="qkS-wp-O0d"/>
|
||||
<constraint firstAttribute="trailing" secondItem="HTa-6n-EPo" secondAttribute="trailing" constant="20" id="rGZ-5W-ZDN"/>
|
||||
</constraints>
|
||||
<point key="canvasLocation" x="178" y="314"/>
|
||||
</customView>
|
||||
</objects>
|
||||
</document>
|
||||
</document>
|
||||
|
||||
BIN
Binary file not shown.
+121
-91
@@ -7,6 +7,24 @@
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
66FC0BDE1B310611005CF3D7 /* EZAudio.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0BBC1B310611005CF3D7 /* EZAudio.m */; };
|
||||
66FC0BDF1B310611005CF3D7 /* EZAudioDevice.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0BBE1B310611005CF3D7 /* EZAudioDevice.m */; };
|
||||
66FC0BE01B310611005CF3D7 /* EZAudioDisplayLink.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0BC01B310611005CF3D7 /* EZAudioDisplayLink.m */; };
|
||||
66FC0BE11B310611005CF3D7 /* EZAudioFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0BC21B310611005CF3D7 /* EZAudioFile.m */; };
|
||||
66FC0BE21B310611005CF3D7 /* EZAudioFloatConverter.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0BC41B310611005CF3D7 /* EZAudioFloatConverter.m */; };
|
||||
66FC0BE31B310611005CF3D7 /* EZAudioFloatData.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0BC61B310611005CF3D7 /* EZAudioFloatData.m */; };
|
||||
66FC0BE41B310611005CF3D7 /* EZAudioPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0BC81B310611005CF3D7 /* EZAudioPlayer.m */; };
|
||||
66FC0BE51B310611005CF3D7 /* EZAudioPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0BCA1B310611005CF3D7 /* EZAudioPlot.m */; };
|
||||
66FC0BE61B310611005CF3D7 /* EZAudioPlotGL.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0BCC1B310611005CF3D7 /* EZAudioPlotGL.m */; };
|
||||
66FC0BE71B310611005CF3D7 /* EZAudioPlotGLKViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0BCE1B310611005CF3D7 /* EZAudioPlotGLKViewController.m */; };
|
||||
66FC0BE81B310611005CF3D7 /* EZAudioUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0BD01B310611005CF3D7 /* EZAudioUtilities.m */; };
|
||||
66FC0BE91B310611005CF3D7 /* EZMicrophone.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0BD21B310611005CF3D7 /* EZMicrophone.m */; };
|
||||
66FC0BEA1B310611005CF3D7 /* EZOutput.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0BD41B310611005CF3D7 /* EZOutput.m */; };
|
||||
66FC0BEB1B310611005CF3D7 /* EZPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0BD61B310611005CF3D7 /* EZPlot.m */; };
|
||||
66FC0BEC1B310611005CF3D7 /* EZRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0BD81B310611005CF3D7 /* EZRecorder.m */; };
|
||||
66FC0BED1B310611005CF3D7 /* TPCircularBuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0BD91B310611005CF3D7 /* TPCircularBuffer.c */; };
|
||||
66FC0BEE1B310611005CF3D7 /* CHANGELOG in Resources */ = {isa = PBXBuildFile; fileRef = 66FC0BDC1B310611005CF3D7 /* CHANGELOG */; };
|
||||
66FC0BEF1B310611005CF3D7 /* VERSION in Resources */ = {isa = PBXBuildFile; fileRef = 66FC0BDD1B310611005CF3D7 /* VERSION */; };
|
||||
9417A8F71871492000D9D37B /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9417A8F61871492000D9D37B /* Cocoa.framework */; };
|
||||
9417A9011871492000D9D37B /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 9417A8FF1871492000D9D37B /* InfoPlist.strings */; };
|
||||
9417A9031871492000D9D37B /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A9021871492000D9D37B /* main.m */; };
|
||||
@@ -18,19 +36,6 @@
|
||||
9417A9171871492100D9D37B /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9417A8F61871492000D9D37B /* Cocoa.framework */; };
|
||||
9417A91F1871492100D9D37B /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 9417A91D1871492100D9D37B /* InfoPlist.strings */; };
|
||||
9417A9211871492100D9D37B /* EZAudioFFTExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A9201871492100D9D37B /* EZAudioFFTExampleTests.m */; };
|
||||
9417A9441871493900D9D37B /* AEFloatConverter.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A92C1871493900D9D37B /* AEFloatConverter.m */; };
|
||||
9417A9451871493900D9D37B /* EZAudio.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A92E1871493900D9D37B /* EZAudio.m */; };
|
||||
9417A9461871493900D9D37B /* EZAudioFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A9301871493900D9D37B /* EZAudioFile.m */; };
|
||||
9417A9471871493900D9D37B /* EZAudioPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A9321871493900D9D37B /* EZAudioPlot.m */; };
|
||||
9417A9481871493900D9D37B /* EZAudioPlotGL.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A9341871493900D9D37B /* EZAudioPlotGL.m */; };
|
||||
9417A9491871493900D9D37B /* EZAudioPlotGLKViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A9361871493900D9D37B /* EZAudioPlotGLKViewController.m */; };
|
||||
9417A94A1871493900D9D37B /* EZMicrophone.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A9381871493900D9D37B /* EZMicrophone.m */; };
|
||||
9417A94B1871493900D9D37B /* EZOutput.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A93A1871493900D9D37B /* EZOutput.m */; };
|
||||
9417A94C1871493900D9D37B /* EZPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A93C1871493900D9D37B /* EZPlot.m */; };
|
||||
9417A94D1871493900D9D37B /* EZRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A93E1871493900D9D37B /* EZRecorder.m */; };
|
||||
9417A94E1871493900D9D37B /* TPCircularBuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 9417A93F1871493900D9D37B /* TPCircularBuffer.c */; };
|
||||
9417A94F1871493900D9D37B /* CHANGELOG in Resources */ = {isa = PBXBuildFile; fileRef = 9417A9421871493900D9D37B /* CHANGELOG */; };
|
||||
9417A9501871493900D9D37B /* VERSION in Resources */ = {isa = PBXBuildFile; fileRef = 9417A9431871493900D9D37B /* VERSION */; };
|
||||
9417A954187149EA00D9D37B /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9417A951187149EA00D9D37B /* AudioToolbox.framework */; };
|
||||
9417A955187149EA00D9D37B /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9417A952187149EA00D9D37B /* AudioUnit.framework */; };
|
||||
9417A956187149EA00D9D37B /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9417A953187149EA00D9D37B /* CoreAudio.framework */; };
|
||||
@@ -53,6 +58,40 @@
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
66FC0BBB1B310611005CF3D7 /* EZAudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudio.h; sourceTree = "<group>"; };
|
||||
66FC0BBC1B310611005CF3D7 /* EZAudio.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudio.m; sourceTree = "<group>"; };
|
||||
66FC0BBD1B310611005CF3D7 /* EZAudioDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioDevice.h; sourceTree = "<group>"; };
|
||||
66FC0BBE1B310611005CF3D7 /* EZAudioDevice.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioDevice.m; sourceTree = "<group>"; };
|
||||
66FC0BBF1B310611005CF3D7 /* EZAudioDisplayLink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioDisplayLink.h; sourceTree = "<group>"; };
|
||||
66FC0BC01B310611005CF3D7 /* EZAudioDisplayLink.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioDisplayLink.m; sourceTree = "<group>"; };
|
||||
66FC0BC11B310611005CF3D7 /* EZAudioFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioFile.h; sourceTree = "<group>"; };
|
||||
66FC0BC21B310611005CF3D7 /* EZAudioFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioFile.m; sourceTree = "<group>"; };
|
||||
66FC0BC31B310611005CF3D7 /* EZAudioFloatConverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioFloatConverter.h; sourceTree = "<group>"; };
|
||||
66FC0BC41B310611005CF3D7 /* EZAudioFloatConverter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioFloatConverter.m; sourceTree = "<group>"; };
|
||||
66FC0BC51B310611005CF3D7 /* EZAudioFloatData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioFloatData.h; sourceTree = "<group>"; };
|
||||
66FC0BC61B310611005CF3D7 /* EZAudioFloatData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioFloatData.m; sourceTree = "<group>"; };
|
||||
66FC0BC71B310611005CF3D7 /* EZAudioPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlayer.h; sourceTree = "<group>"; };
|
||||
66FC0BC81B310611005CF3D7 /* EZAudioPlayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlayer.m; sourceTree = "<group>"; };
|
||||
66FC0BC91B310611005CF3D7 /* EZAudioPlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlot.h; sourceTree = "<group>"; };
|
||||
66FC0BCA1B310611005CF3D7 /* EZAudioPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlot.m; sourceTree = "<group>"; };
|
||||
66FC0BCB1B310611005CF3D7 /* EZAudioPlotGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGL.h; sourceTree = "<group>"; };
|
||||
66FC0BCC1B310611005CF3D7 /* EZAudioPlotGL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGL.m; sourceTree = "<group>"; };
|
||||
66FC0BCD1B310611005CF3D7 /* EZAudioPlotGLKViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGLKViewController.h; sourceTree = "<group>"; };
|
||||
66FC0BCE1B310611005CF3D7 /* EZAudioPlotGLKViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGLKViewController.m; sourceTree = "<group>"; };
|
||||
66FC0BCF1B310611005CF3D7 /* EZAudioUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioUtilities.h; sourceTree = "<group>"; };
|
||||
66FC0BD01B310611005CF3D7 /* EZAudioUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioUtilities.m; sourceTree = "<group>"; };
|
||||
66FC0BD11B310611005CF3D7 /* EZMicrophone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZMicrophone.h; sourceTree = "<group>"; };
|
||||
66FC0BD21B310611005CF3D7 /* EZMicrophone.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZMicrophone.m; sourceTree = "<group>"; };
|
||||
66FC0BD31B310611005CF3D7 /* EZOutput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZOutput.h; sourceTree = "<group>"; };
|
||||
66FC0BD41B310611005CF3D7 /* EZOutput.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZOutput.m; sourceTree = "<group>"; };
|
||||
66FC0BD51B310611005CF3D7 /* EZPlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZPlot.h; sourceTree = "<group>"; };
|
||||
66FC0BD61B310611005CF3D7 /* EZPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZPlot.m; sourceTree = "<group>"; };
|
||||
66FC0BD71B310611005CF3D7 /* EZRecorder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZRecorder.h; sourceTree = "<group>"; };
|
||||
66FC0BD81B310611005CF3D7 /* EZRecorder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZRecorder.m; sourceTree = "<group>"; };
|
||||
66FC0BD91B310611005CF3D7 /* TPCircularBuffer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = TPCircularBuffer.c; sourceTree = "<group>"; };
|
||||
66FC0BDA1B310611005CF3D7 /* TPCircularBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TPCircularBuffer.h; sourceTree = "<group>"; };
|
||||
66FC0BDC1B310611005CF3D7 /* CHANGELOG */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CHANGELOG; sourceTree = "<group>"; };
|
||||
66FC0BDD1B310611005CF3D7 /* VERSION */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VERSION; sourceTree = "<group>"; };
|
||||
9417A8F31871492000D9D37B /* EZAudioFFTExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = EZAudioFFTExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
9417A8F61871492000D9D37B /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
|
||||
9417A8F91871492000D9D37B /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
|
||||
@@ -72,30 +111,6 @@
|
||||
9417A91C1871492100D9D37B /* EZAudioFFTExampleTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "EZAudioFFTExampleTests-Info.plist"; sourceTree = "<group>"; };
|
||||
9417A91E1871492100D9D37B /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
9417A9201871492100D9D37B /* EZAudioFFTExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EZAudioFFTExampleTests.m; sourceTree = "<group>"; };
|
||||
9417A92B1871493900D9D37B /* AEFloatConverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AEFloatConverter.h; sourceTree = "<group>"; };
|
||||
9417A92C1871493900D9D37B /* AEFloatConverter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AEFloatConverter.m; sourceTree = "<group>"; };
|
||||
9417A92D1871493900D9D37B /* EZAudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudio.h; sourceTree = "<group>"; };
|
||||
9417A92E1871493900D9D37B /* EZAudio.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudio.m; sourceTree = "<group>"; };
|
||||
9417A92F1871493900D9D37B /* EZAudioFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioFile.h; sourceTree = "<group>"; };
|
||||
9417A9301871493900D9D37B /* EZAudioFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioFile.m; sourceTree = "<group>"; };
|
||||
9417A9311871493900D9D37B /* EZAudioPlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlot.h; sourceTree = "<group>"; };
|
||||
9417A9321871493900D9D37B /* EZAudioPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlot.m; sourceTree = "<group>"; };
|
||||
9417A9331871493900D9D37B /* EZAudioPlotGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGL.h; sourceTree = "<group>"; };
|
||||
9417A9341871493900D9D37B /* EZAudioPlotGL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGL.m; sourceTree = "<group>"; };
|
||||
9417A9351871493900D9D37B /* EZAudioPlotGLKViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGLKViewController.h; sourceTree = "<group>"; };
|
||||
9417A9361871493900D9D37B /* EZAudioPlotGLKViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGLKViewController.m; sourceTree = "<group>"; };
|
||||
9417A9371871493900D9D37B /* EZMicrophone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZMicrophone.h; sourceTree = "<group>"; };
|
||||
9417A9381871493900D9D37B /* EZMicrophone.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZMicrophone.m; sourceTree = "<group>"; };
|
||||
9417A9391871493900D9D37B /* EZOutput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZOutput.h; sourceTree = "<group>"; };
|
||||
9417A93A1871493900D9D37B /* EZOutput.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZOutput.m; sourceTree = "<group>"; };
|
||||
9417A93B1871493900D9D37B /* EZPlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZPlot.h; sourceTree = "<group>"; };
|
||||
9417A93C1871493900D9D37B /* EZPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZPlot.m; sourceTree = "<group>"; };
|
||||
9417A93D1871493900D9D37B /* EZRecorder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZRecorder.h; sourceTree = "<group>"; };
|
||||
9417A93E1871493900D9D37B /* EZRecorder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZRecorder.m; sourceTree = "<group>"; };
|
||||
9417A93F1871493900D9D37B /* TPCircularBuffer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = TPCircularBuffer.c; sourceTree = "<group>"; };
|
||||
9417A9401871493900D9D37B /* TPCircularBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TPCircularBuffer.h; sourceTree = "<group>"; };
|
||||
9417A9421871493900D9D37B /* CHANGELOG */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CHANGELOG; sourceTree = "<group>"; };
|
||||
9417A9431871493900D9D37B /* VERSION */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VERSION; sourceTree = "<group>"; };
|
||||
9417A951187149EA00D9D37B /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
|
||||
9417A952187149EA00D9D37B /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = System/Library/Frameworks/AudioUnit.framework; sourceTree = SDKROOT; };
|
||||
9417A953187149EA00D9D37B /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
|
||||
@@ -136,6 +151,56 @@
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
66FC0BBA1B310611005CF3D7 /* EZAudio */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
66FC0BBB1B310611005CF3D7 /* EZAudio.h */,
|
||||
66FC0BBC1B310611005CF3D7 /* EZAudio.m */,
|
||||
66FC0BBD1B310611005CF3D7 /* EZAudioDevice.h */,
|
||||
66FC0BBE1B310611005CF3D7 /* EZAudioDevice.m */,
|
||||
66FC0BBF1B310611005CF3D7 /* EZAudioDisplayLink.h */,
|
||||
66FC0BC01B310611005CF3D7 /* EZAudioDisplayLink.m */,
|
||||
66FC0BC11B310611005CF3D7 /* EZAudioFile.h */,
|
||||
66FC0BC21B310611005CF3D7 /* EZAudioFile.m */,
|
||||
66FC0BC31B310611005CF3D7 /* EZAudioFloatConverter.h */,
|
||||
66FC0BC41B310611005CF3D7 /* EZAudioFloatConverter.m */,
|
||||
66FC0BC51B310611005CF3D7 /* EZAudioFloatData.h */,
|
||||
66FC0BC61B310611005CF3D7 /* EZAudioFloatData.m */,
|
||||
66FC0BC71B310611005CF3D7 /* EZAudioPlayer.h */,
|
||||
66FC0BC81B310611005CF3D7 /* EZAudioPlayer.m */,
|
||||
66FC0BC91B310611005CF3D7 /* EZAudioPlot.h */,
|
||||
66FC0BCA1B310611005CF3D7 /* EZAudioPlot.m */,
|
||||
66FC0BCB1B310611005CF3D7 /* EZAudioPlotGL.h */,
|
||||
66FC0BCC1B310611005CF3D7 /* EZAudioPlotGL.m */,
|
||||
66FC0BCD1B310611005CF3D7 /* EZAudioPlotGLKViewController.h */,
|
||||
66FC0BCE1B310611005CF3D7 /* EZAudioPlotGLKViewController.m */,
|
||||
66FC0BCF1B310611005CF3D7 /* EZAudioUtilities.h */,
|
||||
66FC0BD01B310611005CF3D7 /* EZAudioUtilities.m */,
|
||||
66FC0BD11B310611005CF3D7 /* EZMicrophone.h */,
|
||||
66FC0BD21B310611005CF3D7 /* EZMicrophone.m */,
|
||||
66FC0BD31B310611005CF3D7 /* EZOutput.h */,
|
||||
66FC0BD41B310611005CF3D7 /* EZOutput.m */,
|
||||
66FC0BD51B310611005CF3D7 /* EZPlot.h */,
|
||||
66FC0BD61B310611005CF3D7 /* EZPlot.m */,
|
||||
66FC0BD71B310611005CF3D7 /* EZRecorder.h */,
|
||||
66FC0BD81B310611005CF3D7 /* EZRecorder.m */,
|
||||
66FC0BD91B310611005CF3D7 /* TPCircularBuffer.c */,
|
||||
66FC0BDA1B310611005CF3D7 /* TPCircularBuffer.h */,
|
||||
66FC0BDB1B310611005CF3D7 /* VERSION */,
|
||||
);
|
||||
name = EZAudio;
|
||||
path = ../../../../EZAudio;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
66FC0BDB1B310611005CF3D7 /* VERSION */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
66FC0BDC1B310611005CF3D7 /* CHANGELOG */,
|
||||
66FC0BDD1B310611005CF3D7 /* VERSION */,
|
||||
);
|
||||
path = VERSION;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9417A8EA1871492000D9D37B = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -185,7 +250,7 @@
|
||||
9417A8FC1871492000D9D37B /* EZAudioFFTExample */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9417A92A1871493900D9D37B /* EZAudio */,
|
||||
66FC0BBA1B310611005CF3D7 /* EZAudio */,
|
||||
9417A9081871492100D9D37B /* AppDelegate.h */,
|
||||
9417A9091871492100D9D37B /* AppDelegate.m */,
|
||||
9417A9D31872130200D9D37B /* FFTViewController.h */,
|
||||
@@ -228,46 +293,6 @@
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9417A92A1871493900D9D37B /* EZAudio */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9417A92B1871493900D9D37B /* AEFloatConverter.h */,
|
||||
9417A92C1871493900D9D37B /* AEFloatConverter.m */,
|
||||
9417A92D1871493900D9D37B /* EZAudio.h */,
|
||||
9417A92E1871493900D9D37B /* EZAudio.m */,
|
||||
9417A92F1871493900D9D37B /* EZAudioFile.h */,
|
||||
9417A9301871493900D9D37B /* EZAudioFile.m */,
|
||||
9417A9311871493900D9D37B /* EZAudioPlot.h */,
|
||||
9417A9321871493900D9D37B /* EZAudioPlot.m */,
|
||||
9417A9331871493900D9D37B /* EZAudioPlotGL.h */,
|
||||
9417A9341871493900D9D37B /* EZAudioPlotGL.m */,
|
||||
9417A9351871493900D9D37B /* EZAudioPlotGLKViewController.h */,
|
||||
9417A9361871493900D9D37B /* EZAudioPlotGLKViewController.m */,
|
||||
9417A9371871493900D9D37B /* EZMicrophone.h */,
|
||||
9417A9381871493900D9D37B /* EZMicrophone.m */,
|
||||
9417A9391871493900D9D37B /* EZOutput.h */,
|
||||
9417A93A1871493900D9D37B /* EZOutput.m */,
|
||||
9417A93B1871493900D9D37B /* EZPlot.h */,
|
||||
9417A93C1871493900D9D37B /* EZPlot.m */,
|
||||
9417A93D1871493900D9D37B /* EZRecorder.h */,
|
||||
9417A93E1871493900D9D37B /* EZRecorder.m */,
|
||||
9417A93F1871493900D9D37B /* TPCircularBuffer.c */,
|
||||
9417A9401871493900D9D37B /* TPCircularBuffer.h */,
|
||||
9417A9411871493900D9D37B /* VERSION */,
|
||||
);
|
||||
name = EZAudio;
|
||||
path = ../../../../EZAudio;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9417A9411871493900D9D37B /* VERSION */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9417A9421871493900D9D37B /* CHANGELOG */,
|
||||
9417A9431871493900D9D37B /* VERSION */,
|
||||
);
|
||||
path = VERSION;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
@@ -345,12 +370,12 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
9417A9011871492000D9D37B /* InfoPlist.strings in Resources */,
|
||||
66FC0BEF1B310611005CF3D7 /* VERSION in Resources */,
|
||||
9417A9D71872130200D9D37B /* FFTViewController.xib in Resources */,
|
||||
9417A90F1871492100D9D37B /* Images.xcassets in Resources */,
|
||||
9417A9071871492100D9D37B /* Credits.rtf in Resources */,
|
||||
9417A9501871493900D9D37B /* VERSION in Resources */,
|
||||
9417A90D1871492100D9D37B /* MainMenu.xib in Resources */,
|
||||
9417A94F1871493900D9D37B /* CHANGELOG in Resources */,
|
||||
66FC0BEE1B310611005CF3D7 /* CHANGELOG in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -369,20 +394,25 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
9417A94D1871493900D9D37B /* EZRecorder.m in Sources */,
|
||||
9417A9471871493900D9D37B /* EZAudioPlot.m in Sources */,
|
||||
9417A94C1871493900D9D37B /* EZPlot.m in Sources */,
|
||||
66FC0BEC1B310611005CF3D7 /* EZRecorder.m in Sources */,
|
||||
9417A9D61872130200D9D37B /* FFTViewController.m in Sources */,
|
||||
9417A9441871493900D9D37B /* AEFloatConverter.m in Sources */,
|
||||
9417A94A1871493900D9D37B /* EZMicrophone.m in Sources */,
|
||||
9417A94B1871493900D9D37B /* EZOutput.m in Sources */,
|
||||
9417A9451871493900D9D37B /* EZAudio.m in Sources */,
|
||||
9417A94E1871493900D9D37B /* TPCircularBuffer.c in Sources */,
|
||||
9417A9481871493900D9D37B /* EZAudioPlotGL.m in Sources */,
|
||||
9417A9461871493900D9D37B /* EZAudioFile.m in Sources */,
|
||||
66FC0BE21B310611005CF3D7 /* EZAudioFloatConverter.m in Sources */,
|
||||
66FC0BE31B310611005CF3D7 /* EZAudioFloatData.m in Sources */,
|
||||
66FC0BDE1B310611005CF3D7 /* EZAudio.m in Sources */,
|
||||
66FC0BE11B310611005CF3D7 /* EZAudioFile.m in Sources */,
|
||||
66FC0BEA1B310611005CF3D7 /* EZOutput.m in Sources */,
|
||||
66FC0BE61B310611005CF3D7 /* EZAudioPlotGL.m in Sources */,
|
||||
66FC0BED1B310611005CF3D7 /* TPCircularBuffer.c in Sources */,
|
||||
66FC0BE51B310611005CF3D7 /* EZAudioPlot.m in Sources */,
|
||||
9417A90A1871492100D9D37B /* AppDelegate.m in Sources */,
|
||||
9417A9491871493900D9D37B /* EZAudioPlotGLKViewController.m in Sources */,
|
||||
66FC0BE91B310611005CF3D7 /* EZMicrophone.m in Sources */,
|
||||
66FC0BE41B310611005CF3D7 /* EZAudioPlayer.m in Sources */,
|
||||
9417A9031871492000D9D37B /* main.m in Sources */,
|
||||
66FC0BE01B310611005CF3D7 /* EZAudioDisplayLink.m in Sources */,
|
||||
66FC0BEB1B310611005CF3D7 /* EZPlot.m in Sources */,
|
||||
66FC0BDF1B310611005CF3D7 /* EZAudioDevice.m in Sources */,
|
||||
66FC0BE81B310611005CF3D7 /* EZAudioUtilities.m in Sources */,
|
||||
66FC0BE71B310611005CF3D7 /* EZAudioPlotGLKViewController.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
||||
@@ -44,12 +44,12 @@
|
||||
/**
|
||||
EZAudioPlot for frequency plot
|
||||
*/
|
||||
@property (nonatomic,weak) IBOutlet EZAudioPlotGL *audioPlotFreq;
|
||||
@property (nonatomic,weak) IBOutlet EZAudioPlot *audioPlotFreq;
|
||||
|
||||
/**
|
||||
EZAudioPlot for time plot
|
||||
*/
|
||||
@property (nonatomic,weak) IBOutlet EZAudioPlotGL *audioPlotTime;
|
||||
@property (nonatomic,weak) IBOutlet EZAudioPlot *audioPlotTime;
|
||||
|
||||
/**
|
||||
Microphone
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
self.audioPlotFreq.color = [NSColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:1.0];
|
||||
self.audioPlotFreq.shouldFill = YES;
|
||||
self.audioPlotFreq.plotType = EZPlotTypeBuffer;
|
||||
|
||||
self.audioPlotFreq.centerYAxis = NO;
|
||||
}
|
||||
|
||||
#pragma mark - FFT
|
||||
@@ -142,7 +142,7 @@
|
||||
// Calculate the magnitude
|
||||
float mag = _A.realp[i]*_A.realp[i]+_A.imagp[i]*_A.imagp[i];
|
||||
// Bind the value to be less than 1.0 to fit in the graph
|
||||
amp[i] = [EZAudio MAP:mag leftMin:0.0 leftMax:maxMag rightMin:0.0 rightMax:1.0];
|
||||
amp[i] = [EZAudioUtilities MAP:mag leftMin:0.0 leftMax:maxMag rightMin:0.0 rightMax:1.0];
|
||||
}
|
||||
|
||||
// Update the frequency domain plot
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="5056" systemVersion="13C64" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="7702" systemVersion="14C109" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<dependencies>
|
||||
<deployment version="1070" identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="5056"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="7702"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<customObject id="-2" userLabel="File's Owner" customClass="FFTViewController">
|
||||
@@ -13,20 +13,19 @@
|
||||
</connections>
|
||||
</customObject>
|
||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||
<customObject id="-3" userLabel="Application"/>
|
||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||
<customView id="1">
|
||||
<rect key="frame" x="0.0" y="0.0" width="480" height="272"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<subviews>
|
||||
<splitView dividerStyle="thin" translatesAutoresizingMaskIntoConstraints="NO" id="78b-rz-Bpl">
|
||||
<splitView wantsLayer="YES" dividerStyle="thin" translatesAutoresizingMaskIntoConstraints="NO" id="78b-rz-Bpl">
|
||||
<rect key="frame" x="0.0" y="0.0" width="480" height="272"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<subviews>
|
||||
<customView fixedFrame="YES" id="Zcc-CT-67u" customClass="EZAudioPlotGL">
|
||||
<customView fixedFrame="YES" id="Zcc-CT-67u" customClass="EZAudioPlot">
|
||||
<rect key="frame" x="0.0" y="0.0" width="480" height="132"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</customView>
|
||||
<customView fixedFrame="YES" id="4V2-1I-w64" customClass="EZAudioPlotGL">
|
||||
<customView fixedFrame="YES" id="4V2-1I-w64" customClass="EZAudioPlot">
|
||||
<rect key="frame" x="0.0" y="133" width="480" height="139"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</customView>
|
||||
|
||||
+121
-91
@@ -7,6 +7,24 @@
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
66FC0AD01B3105EC005CF3D7 /* EZAudio.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0AAE1B3105EC005CF3D7 /* EZAudio.m */; };
|
||||
66FC0AD11B3105EC005CF3D7 /* EZAudioDevice.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0AB01B3105EC005CF3D7 /* EZAudioDevice.m */; };
|
||||
66FC0AD21B3105EC005CF3D7 /* EZAudioDisplayLink.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0AB21B3105EC005CF3D7 /* EZAudioDisplayLink.m */; };
|
||||
66FC0AD31B3105EC005CF3D7 /* EZAudioFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0AB41B3105EC005CF3D7 /* EZAudioFile.m */; };
|
||||
66FC0AD41B3105EC005CF3D7 /* EZAudioFloatConverter.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0AB61B3105EC005CF3D7 /* EZAudioFloatConverter.m */; };
|
||||
66FC0AD51B3105EC005CF3D7 /* EZAudioFloatData.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0AB81B3105EC005CF3D7 /* EZAudioFloatData.m */; };
|
||||
66FC0AD61B3105EC005CF3D7 /* EZAudioPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0ABA1B3105EC005CF3D7 /* EZAudioPlayer.m */; };
|
||||
66FC0AD71B3105EC005CF3D7 /* EZAudioPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0ABC1B3105EC005CF3D7 /* EZAudioPlot.m */; };
|
||||
66FC0AD81B3105EC005CF3D7 /* EZAudioPlotGL.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0ABE1B3105EC005CF3D7 /* EZAudioPlotGL.m */; };
|
||||
66FC0AD91B3105EC005CF3D7 /* EZAudioPlotGLKViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0AC01B3105EC005CF3D7 /* EZAudioPlotGLKViewController.m */; };
|
||||
66FC0ADA1B3105EC005CF3D7 /* EZAudioUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0AC21B3105EC005CF3D7 /* EZAudioUtilities.m */; };
|
||||
66FC0ADB1B3105EC005CF3D7 /* EZMicrophone.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0AC41B3105EC005CF3D7 /* EZMicrophone.m */; };
|
||||
66FC0ADC1B3105EC005CF3D7 /* EZOutput.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0AC61B3105EC005CF3D7 /* EZOutput.m */; };
|
||||
66FC0ADD1B3105EC005CF3D7 /* EZPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0AC81B3105EC005CF3D7 /* EZPlot.m */; };
|
||||
66FC0ADE1B3105EC005CF3D7 /* EZRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0ACA1B3105EC005CF3D7 /* EZRecorder.m */; };
|
||||
66FC0ADF1B3105EC005CF3D7 /* TPCircularBuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0ACB1B3105EC005CF3D7 /* TPCircularBuffer.c */; };
|
||||
66FC0AE01B3105EC005CF3D7 /* CHANGELOG in Resources */ = {isa = PBXBuildFile; fileRef = 66FC0ACE1B3105EC005CF3D7 /* CHANGELOG */; };
|
||||
66FC0AE11B3105EC005CF3D7 /* VERSION in Resources */ = {isa = PBXBuildFile; fileRef = 66FC0ACF1B3105EC005CF3D7 /* VERSION */; };
|
||||
94056D97185BB0BC00EB94BA /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94056D96185BB0BC00EB94BA /* Cocoa.framework */; };
|
||||
94056DA1185BB0BC00EB94BA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 94056D9F185BB0BC00EB94BA /* InfoPlist.strings */; };
|
||||
94056DA3185BB0BC00EB94BA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 94056DA2185BB0BC00EB94BA /* main.m */; };
|
||||
@@ -26,19 +44,6 @@
|
||||
94056DD8185BB0F400EB94BA /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94056DD5185BB0F400EB94BA /* AudioToolbox.framework */; };
|
||||
94056DD9185BB0F400EB94BA /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94056DD6185BB0F400EB94BA /* AudioUnit.framework */; };
|
||||
94056DDA185BB0F400EB94BA /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94056DD7185BB0F400EB94BA /* CoreAudio.framework */; };
|
||||
9417A7171867DD2800D9D37B /* AEFloatConverter.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A6FF1867DD2800D9D37B /* AEFloatConverter.m */; };
|
||||
9417A7181867DD2800D9D37B /* EZAudio.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7011867DD2800D9D37B /* EZAudio.m */; };
|
||||
9417A7191867DD2800D9D37B /* EZAudioFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7031867DD2800D9D37B /* EZAudioFile.m */; };
|
||||
9417A71A1867DD2800D9D37B /* EZAudioPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7051867DD2800D9D37B /* EZAudioPlot.m */; };
|
||||
9417A71B1867DD2800D9D37B /* EZAudioPlotGL.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7071867DD2800D9D37B /* EZAudioPlotGL.m */; };
|
||||
9417A71C1867DD2800D9D37B /* EZAudioPlotGLKViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7091867DD2800D9D37B /* EZAudioPlotGLKViewController.m */; };
|
||||
9417A71D1867DD2800D9D37B /* EZMicrophone.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A70B1867DD2800D9D37B /* EZMicrophone.m */; };
|
||||
9417A71E1867DD2800D9D37B /* EZOutput.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A70D1867DD2800D9D37B /* EZOutput.m */; };
|
||||
9417A71F1867DD2800D9D37B /* EZPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A70F1867DD2800D9D37B /* EZPlot.m */; };
|
||||
9417A7201867DD2800D9D37B /* EZRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7111867DD2800D9D37B /* EZRecorder.m */; };
|
||||
9417A7211867DD2800D9D37B /* TPCircularBuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7121867DD2800D9D37B /* TPCircularBuffer.c */; };
|
||||
9417A7221867DD2800D9D37B /* CHANGELOG in Resources */ = {isa = PBXBuildFile; fileRef = 9417A7151867DD2800D9D37B /* CHANGELOG */; };
|
||||
9417A7231867DD2800D9D37B /* VERSION in Resources */ = {isa = PBXBuildFile; fileRef = 9417A7161867DD2800D9D37B /* VERSION */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
@@ -52,6 +57,40 @@
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
66FC0AAD1B3105EC005CF3D7 /* EZAudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudio.h; sourceTree = "<group>"; };
|
||||
66FC0AAE1B3105EC005CF3D7 /* EZAudio.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudio.m; sourceTree = "<group>"; };
|
||||
66FC0AAF1B3105EC005CF3D7 /* EZAudioDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioDevice.h; sourceTree = "<group>"; };
|
||||
66FC0AB01B3105EC005CF3D7 /* EZAudioDevice.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioDevice.m; sourceTree = "<group>"; };
|
||||
66FC0AB11B3105EC005CF3D7 /* EZAudioDisplayLink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioDisplayLink.h; sourceTree = "<group>"; };
|
||||
66FC0AB21B3105EC005CF3D7 /* EZAudioDisplayLink.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioDisplayLink.m; sourceTree = "<group>"; };
|
||||
66FC0AB31B3105EC005CF3D7 /* EZAudioFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioFile.h; sourceTree = "<group>"; };
|
||||
66FC0AB41B3105EC005CF3D7 /* EZAudioFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioFile.m; sourceTree = "<group>"; };
|
||||
66FC0AB51B3105EC005CF3D7 /* EZAudioFloatConverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioFloatConverter.h; sourceTree = "<group>"; };
|
||||
66FC0AB61B3105EC005CF3D7 /* EZAudioFloatConverter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioFloatConverter.m; sourceTree = "<group>"; };
|
||||
66FC0AB71B3105EC005CF3D7 /* EZAudioFloatData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioFloatData.h; sourceTree = "<group>"; };
|
||||
66FC0AB81B3105EC005CF3D7 /* EZAudioFloatData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioFloatData.m; sourceTree = "<group>"; };
|
||||
66FC0AB91B3105EC005CF3D7 /* EZAudioPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlayer.h; sourceTree = "<group>"; };
|
||||
66FC0ABA1B3105EC005CF3D7 /* EZAudioPlayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlayer.m; sourceTree = "<group>"; };
|
||||
66FC0ABB1B3105EC005CF3D7 /* EZAudioPlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlot.h; sourceTree = "<group>"; };
|
||||
66FC0ABC1B3105EC005CF3D7 /* EZAudioPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlot.m; sourceTree = "<group>"; };
|
||||
66FC0ABD1B3105EC005CF3D7 /* EZAudioPlotGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGL.h; sourceTree = "<group>"; };
|
||||
66FC0ABE1B3105EC005CF3D7 /* EZAudioPlotGL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGL.m; sourceTree = "<group>"; };
|
||||
66FC0ABF1B3105EC005CF3D7 /* EZAudioPlotGLKViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGLKViewController.h; sourceTree = "<group>"; };
|
||||
66FC0AC01B3105EC005CF3D7 /* EZAudioPlotGLKViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGLKViewController.m; sourceTree = "<group>"; };
|
||||
66FC0AC11B3105EC005CF3D7 /* EZAudioUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioUtilities.h; sourceTree = "<group>"; };
|
||||
66FC0AC21B3105EC005CF3D7 /* EZAudioUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioUtilities.m; sourceTree = "<group>"; };
|
||||
66FC0AC31B3105EC005CF3D7 /* EZMicrophone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZMicrophone.h; sourceTree = "<group>"; };
|
||||
66FC0AC41B3105EC005CF3D7 /* EZMicrophone.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZMicrophone.m; sourceTree = "<group>"; };
|
||||
66FC0AC51B3105EC005CF3D7 /* EZOutput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZOutput.h; sourceTree = "<group>"; };
|
||||
66FC0AC61B3105EC005CF3D7 /* EZOutput.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZOutput.m; sourceTree = "<group>"; };
|
||||
66FC0AC71B3105EC005CF3D7 /* EZPlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZPlot.h; sourceTree = "<group>"; };
|
||||
66FC0AC81B3105EC005CF3D7 /* EZPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZPlot.m; sourceTree = "<group>"; };
|
||||
66FC0AC91B3105EC005CF3D7 /* EZRecorder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZRecorder.h; sourceTree = "<group>"; };
|
||||
66FC0ACA1B3105EC005CF3D7 /* EZRecorder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZRecorder.m; sourceTree = "<group>"; };
|
||||
66FC0ACB1B3105EC005CF3D7 /* TPCircularBuffer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = TPCircularBuffer.c; sourceTree = "<group>"; };
|
||||
66FC0ACC1B3105EC005CF3D7 /* TPCircularBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TPCircularBuffer.h; sourceTree = "<group>"; };
|
||||
66FC0ACE1B3105EC005CF3D7 /* CHANGELOG */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CHANGELOG; sourceTree = "<group>"; };
|
||||
66FC0ACF1B3105EC005CF3D7 /* VERSION */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VERSION; sourceTree = "<group>"; };
|
||||
94056D93185BB0BC00EB94BA /* EZAudioOpenGLWaveformExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = EZAudioOpenGLWaveformExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
94056D96185BB0BC00EB94BA /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
|
||||
94056D99185BB0BC00EB94BA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
|
||||
@@ -80,30 +119,6 @@
|
||||
94056DD5185BB0F400EB94BA /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
|
||||
94056DD6185BB0F400EB94BA /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = System/Library/Frameworks/AudioUnit.framework; sourceTree = SDKROOT; };
|
||||
94056DD7185BB0F400EB94BA /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
|
||||
9417A6FE1867DD2800D9D37B /* AEFloatConverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AEFloatConverter.h; sourceTree = "<group>"; };
|
||||
9417A6FF1867DD2800D9D37B /* AEFloatConverter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AEFloatConverter.m; sourceTree = "<group>"; };
|
||||
9417A7001867DD2800D9D37B /* EZAudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudio.h; sourceTree = "<group>"; };
|
||||
9417A7011867DD2800D9D37B /* EZAudio.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudio.m; sourceTree = "<group>"; };
|
||||
9417A7021867DD2800D9D37B /* EZAudioFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioFile.h; sourceTree = "<group>"; };
|
||||
9417A7031867DD2800D9D37B /* EZAudioFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioFile.m; sourceTree = "<group>"; };
|
||||
9417A7041867DD2800D9D37B /* EZAudioPlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlot.h; sourceTree = "<group>"; };
|
||||
9417A7051867DD2800D9D37B /* EZAudioPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlot.m; sourceTree = "<group>"; };
|
||||
9417A7061867DD2800D9D37B /* EZAudioPlotGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGL.h; sourceTree = "<group>"; };
|
||||
9417A7071867DD2800D9D37B /* EZAudioPlotGL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGL.m; sourceTree = "<group>"; };
|
||||
9417A7081867DD2800D9D37B /* EZAudioPlotGLKViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGLKViewController.h; sourceTree = "<group>"; };
|
||||
9417A7091867DD2800D9D37B /* EZAudioPlotGLKViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGLKViewController.m; sourceTree = "<group>"; };
|
||||
9417A70A1867DD2800D9D37B /* EZMicrophone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZMicrophone.h; sourceTree = "<group>"; };
|
||||
9417A70B1867DD2800D9D37B /* EZMicrophone.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZMicrophone.m; sourceTree = "<group>"; };
|
||||
9417A70C1867DD2800D9D37B /* EZOutput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZOutput.h; sourceTree = "<group>"; };
|
||||
9417A70D1867DD2800D9D37B /* EZOutput.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZOutput.m; sourceTree = "<group>"; };
|
||||
9417A70E1867DD2800D9D37B /* EZPlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZPlot.h; sourceTree = "<group>"; };
|
||||
9417A70F1867DD2800D9D37B /* EZPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZPlot.m; sourceTree = "<group>"; };
|
||||
9417A7101867DD2800D9D37B /* EZRecorder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZRecorder.h; sourceTree = "<group>"; };
|
||||
9417A7111867DD2800D9D37B /* EZRecorder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZRecorder.m; sourceTree = "<group>"; };
|
||||
9417A7121867DD2800D9D37B /* TPCircularBuffer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = TPCircularBuffer.c; sourceTree = "<group>"; };
|
||||
9417A7131867DD2800D9D37B /* TPCircularBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TPCircularBuffer.h; sourceTree = "<group>"; };
|
||||
9417A7151867DD2800D9D37B /* CHANGELOG */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CHANGELOG; sourceTree = "<group>"; };
|
||||
9417A7161867DD2800D9D37B /* VERSION */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VERSION; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@@ -133,6 +148,56 @@
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
66FC0AAC1B3105EC005CF3D7 /* EZAudio */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
66FC0AAD1B3105EC005CF3D7 /* EZAudio.h */,
|
||||
66FC0AAE1B3105EC005CF3D7 /* EZAudio.m */,
|
||||
66FC0AAF1B3105EC005CF3D7 /* EZAudioDevice.h */,
|
||||
66FC0AB01B3105EC005CF3D7 /* EZAudioDevice.m */,
|
||||
66FC0AB11B3105EC005CF3D7 /* EZAudioDisplayLink.h */,
|
||||
66FC0AB21B3105EC005CF3D7 /* EZAudioDisplayLink.m */,
|
||||
66FC0AB31B3105EC005CF3D7 /* EZAudioFile.h */,
|
||||
66FC0AB41B3105EC005CF3D7 /* EZAudioFile.m */,
|
||||
66FC0AB51B3105EC005CF3D7 /* EZAudioFloatConverter.h */,
|
||||
66FC0AB61B3105EC005CF3D7 /* EZAudioFloatConverter.m */,
|
||||
66FC0AB71B3105EC005CF3D7 /* EZAudioFloatData.h */,
|
||||
66FC0AB81B3105EC005CF3D7 /* EZAudioFloatData.m */,
|
||||
66FC0AB91B3105EC005CF3D7 /* EZAudioPlayer.h */,
|
||||
66FC0ABA1B3105EC005CF3D7 /* EZAudioPlayer.m */,
|
||||
66FC0ABB1B3105EC005CF3D7 /* EZAudioPlot.h */,
|
||||
66FC0ABC1B3105EC005CF3D7 /* EZAudioPlot.m */,
|
||||
66FC0ABD1B3105EC005CF3D7 /* EZAudioPlotGL.h */,
|
||||
66FC0ABE1B3105EC005CF3D7 /* EZAudioPlotGL.m */,
|
||||
66FC0ABF1B3105EC005CF3D7 /* EZAudioPlotGLKViewController.h */,
|
||||
66FC0AC01B3105EC005CF3D7 /* EZAudioPlotGLKViewController.m */,
|
||||
66FC0AC11B3105EC005CF3D7 /* EZAudioUtilities.h */,
|
||||
66FC0AC21B3105EC005CF3D7 /* EZAudioUtilities.m */,
|
||||
66FC0AC31B3105EC005CF3D7 /* EZMicrophone.h */,
|
||||
66FC0AC41B3105EC005CF3D7 /* EZMicrophone.m */,
|
||||
66FC0AC51B3105EC005CF3D7 /* EZOutput.h */,
|
||||
66FC0AC61B3105EC005CF3D7 /* EZOutput.m */,
|
||||
66FC0AC71B3105EC005CF3D7 /* EZPlot.h */,
|
||||
66FC0AC81B3105EC005CF3D7 /* EZPlot.m */,
|
||||
66FC0AC91B3105EC005CF3D7 /* EZRecorder.h */,
|
||||
66FC0ACA1B3105EC005CF3D7 /* EZRecorder.m */,
|
||||
66FC0ACB1B3105EC005CF3D7 /* TPCircularBuffer.c */,
|
||||
66FC0ACC1B3105EC005CF3D7 /* TPCircularBuffer.h */,
|
||||
66FC0ACD1B3105EC005CF3D7 /* VERSION */,
|
||||
);
|
||||
name = EZAudio;
|
||||
path = ../../../../EZAudio;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
66FC0ACD1B3105EC005CF3D7 /* VERSION */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
66FC0ACE1B3105EC005CF3D7 /* CHANGELOG */,
|
||||
66FC0ACF1B3105EC005CF3D7 /* VERSION */,
|
||||
);
|
||||
path = VERSION;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
94056D8A185BB0BC00EB94BA = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -181,7 +246,7 @@
|
||||
94056D9C185BB0BC00EB94BA /* EZAudioOpenGLWaveformExample */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9417A6FD1867DD2800D9D37B /* EZAudio */,
|
||||
66FC0AAC1B3105EC005CF3D7 /* EZAudio */,
|
||||
94056DA8185BB0BC00EB94BA /* AppDelegate.h */,
|
||||
94056DA9185BB0BC00EB94BA /* AppDelegate.m */,
|
||||
94056DCA185BB0D600EB94BA /* OpenGLWaveformViewController.h */,
|
||||
@@ -224,46 +289,6 @@
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9417A6FD1867DD2800D9D37B /* EZAudio */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9417A6FE1867DD2800D9D37B /* AEFloatConverter.h */,
|
||||
9417A6FF1867DD2800D9D37B /* AEFloatConverter.m */,
|
||||
9417A7001867DD2800D9D37B /* EZAudio.h */,
|
||||
9417A7011867DD2800D9D37B /* EZAudio.m */,
|
||||
9417A7021867DD2800D9D37B /* EZAudioFile.h */,
|
||||
9417A7031867DD2800D9D37B /* EZAudioFile.m */,
|
||||
9417A7041867DD2800D9D37B /* EZAudioPlot.h */,
|
||||
9417A7051867DD2800D9D37B /* EZAudioPlot.m */,
|
||||
9417A7061867DD2800D9D37B /* EZAudioPlotGL.h */,
|
||||
9417A7071867DD2800D9D37B /* EZAudioPlotGL.m */,
|
||||
9417A7081867DD2800D9D37B /* EZAudioPlotGLKViewController.h */,
|
||||
9417A7091867DD2800D9D37B /* EZAudioPlotGLKViewController.m */,
|
||||
9417A70A1867DD2800D9D37B /* EZMicrophone.h */,
|
||||
9417A70B1867DD2800D9D37B /* EZMicrophone.m */,
|
||||
9417A70C1867DD2800D9D37B /* EZOutput.h */,
|
||||
9417A70D1867DD2800D9D37B /* EZOutput.m */,
|
||||
9417A70E1867DD2800D9D37B /* EZPlot.h */,
|
||||
9417A70F1867DD2800D9D37B /* EZPlot.m */,
|
||||
9417A7101867DD2800D9D37B /* EZRecorder.h */,
|
||||
9417A7111867DD2800D9D37B /* EZRecorder.m */,
|
||||
9417A7121867DD2800D9D37B /* TPCircularBuffer.c */,
|
||||
9417A7131867DD2800D9D37B /* TPCircularBuffer.h */,
|
||||
9417A7141867DD2800D9D37B /* VERSION */,
|
||||
);
|
||||
name = EZAudio;
|
||||
path = ../../../../EZAudio;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9417A7141867DD2800D9D37B /* VERSION */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9417A7151867DD2800D9D37B /* CHANGELOG */,
|
||||
9417A7161867DD2800D9D37B /* VERSION */,
|
||||
);
|
||||
path = VERSION;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
@@ -341,12 +366,12 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
94056DA1185BB0BC00EB94BA /* InfoPlist.strings in Resources */,
|
||||
9417A7231867DD2800D9D37B /* VERSION in Resources */,
|
||||
66FC0AE11B3105EC005CF3D7 /* VERSION in Resources */,
|
||||
94056DAF185BB0BC00EB94BA /* Images.xcassets in Resources */,
|
||||
94056DA7185BB0BC00EB94BA /* Credits.rtf in Resources */,
|
||||
94056DCE185BB0D600EB94BA /* OpenGLWaveformViewController.xib in Resources */,
|
||||
94056DAD185BB0BC00EB94BA /* MainMenu.xib in Resources */,
|
||||
9417A7221867DD2800D9D37B /* CHANGELOG in Resources */,
|
||||
66FC0AE01B3105EC005CF3D7 /* CHANGELOG in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -365,20 +390,25 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
9417A7211867DD2800D9D37B /* TPCircularBuffer.c in Sources */,
|
||||
9417A71E1867DD2800D9D37B /* EZOutput.m in Sources */,
|
||||
9417A71C1867DD2800D9D37B /* EZAudioPlotGLKViewController.m in Sources */,
|
||||
66FC0ADE1B3105EC005CF3D7 /* EZRecorder.m in Sources */,
|
||||
94056DAA185BB0BC00EB94BA /* AppDelegate.m in Sources */,
|
||||
9417A7171867DD2800D9D37B /* AEFloatConverter.m in Sources */,
|
||||
66FC0AD41B3105EC005CF3D7 /* EZAudioFloatConverter.m in Sources */,
|
||||
66FC0AD51B3105EC005CF3D7 /* EZAudioFloatData.m in Sources */,
|
||||
66FC0AD01B3105EC005CF3D7 /* EZAudio.m in Sources */,
|
||||
66FC0AD31B3105EC005CF3D7 /* EZAudioFile.m in Sources */,
|
||||
66FC0ADC1B3105EC005CF3D7 /* EZOutput.m in Sources */,
|
||||
66FC0AD81B3105EC005CF3D7 /* EZAudioPlotGL.m in Sources */,
|
||||
66FC0ADF1B3105EC005CF3D7 /* TPCircularBuffer.c in Sources */,
|
||||
66FC0AD71B3105EC005CF3D7 /* EZAudioPlot.m in Sources */,
|
||||
94056DA3185BB0BC00EB94BA /* main.m in Sources */,
|
||||
9417A71A1867DD2800D9D37B /* EZAudioPlot.m in Sources */,
|
||||
9417A7191867DD2800D9D37B /* EZAudioFile.m in Sources */,
|
||||
9417A71B1867DD2800D9D37B /* EZAudioPlotGL.m in Sources */,
|
||||
66FC0ADB1B3105EC005CF3D7 /* EZMicrophone.m in Sources */,
|
||||
66FC0AD61B3105EC005CF3D7 /* EZAudioPlayer.m in Sources */,
|
||||
94056DCD185BB0D600EB94BA /* OpenGLWaveformViewController.m in Sources */,
|
||||
9417A71F1867DD2800D9D37B /* EZPlot.m in Sources */,
|
||||
9417A71D1867DD2800D9D37B /* EZMicrophone.m in Sources */,
|
||||
9417A7201867DD2800D9D37B /* EZRecorder.m in Sources */,
|
||||
9417A7181867DD2800D9D37B /* EZAudio.m in Sources */,
|
||||
66FC0AD21B3105EC005CF3D7 /* EZAudioDisplayLink.m in Sources */,
|
||||
66FC0ADD1B3105EC005CF3D7 /* EZPlot.m in Sources */,
|
||||
66FC0AD11B3105EC005CF3D7 /* EZAudioDevice.m in Sources */,
|
||||
66FC0ADA1B3105EC005CF3D7 /* EZAudioUtilities.m in Sources */,
|
||||
66FC0AD91B3105EC005CF3D7 /* EZAudioPlotGLKViewController.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
||||
+22
-2
@@ -28,23 +28,43 @@
|
||||
// Import EZAudio header
|
||||
#import "EZAudio.h"
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - OpenGLWaveformViewController
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
We will allow this view controller to act as an EZMicrophoneDelegate. This is how we listen for the microphone callback.
|
||||
*/
|
||||
@interface OpenGLWaveformViewController : NSViewController <EZMicrophoneDelegate>
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Components
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
The OpenGL based audio plot
|
||||
*/
|
||||
@property (nonatomic,weak) IBOutlet EZAudioPlotGL *audioPlot;
|
||||
@property (nonatomic, weak) IBOutlet EZAudioPlotGL *audioPlot;
|
||||
|
||||
/**
|
||||
The microphone component
|
||||
*/
|
||||
@property (nonatomic,strong) EZMicrophone *microphone;
|
||||
@property (nonatomic, strong) EZMicrophone *microphone;
|
||||
|
||||
/**
|
||||
The microphone pop up button (contains the menu for choosing a microphone input)
|
||||
*/
|
||||
@property (nonatomic, weak) IBOutlet NSPopUpButton *microphoneInputPopUpButton;
|
||||
|
||||
/**
|
||||
The microphone input channel pop up button (contains the menu for choosing a microphone input channel)
|
||||
*/
|
||||
@property (nonatomic, weak) IBOutlet NSPopUpButton *microphoneInputChannelPopUpButton;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Actions
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Switches the plot drawing type between a buffer plot (visualizes the current stream of audio data from the update function) or a rolling plot (visualizes the audio data over time, this is the classic waveform look)
|
||||
*/
|
||||
|
||||
+187
-105
@@ -25,145 +25,227 @@
|
||||
|
||||
#import "OpenGLWaveformViewController.h"
|
||||
|
||||
@interface OpenGLWaveformViewController ()
|
||||
|
||||
@end
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - OpenGLWaveformViewController
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@implementation OpenGLWaveformViewController
|
||||
|
||||
#pragma mark - Initialization
|
||||
-(id)init {
|
||||
self = [super initWithNibName:NSStringFromClass(self.class) bundle:nil];
|
||||
if(self){
|
||||
[self initializeViewController];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(id)initWithCoder:(NSCoder *)aDecoder {
|
||||
self = [super initWithNibName:NSStringFromClass(self.class) bundle:nil];
|
||||
if(self){
|
||||
[self initializeViewController];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
|
||||
self = [super initWithNibName:NSStringFromClass(self.class) bundle:nil];
|
||||
if(self){
|
||||
[self initializeViewController];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Initialize View Controller
|
||||
-(void)initializeViewController {
|
||||
// Create an instance of the microphone and tell it to use this view controller instance as the delegate
|
||||
self.microphone = [EZMicrophone microphoneWithDelegate:self];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Customize the Audio Plot
|
||||
-(void)awakeFromNib {
|
||||
|
||||
/*
|
||||
Customizing the audio plot's look
|
||||
*/
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
//
|
||||
// Customizing the audio plot's look
|
||||
//
|
||||
// Background color
|
||||
self.audioPlot.backgroundColor = [NSColor colorWithDeviceRed:0 green:0 blue:0 alpha:0];
|
||||
|
||||
self.audioPlot.backgroundColor = [NSColor colorWithCalibratedRed: 0.569 green: 0.82 blue: 0.478 alpha: 1];
|
||||
|
||||
// Waveform color
|
||||
self.audioPlot.color = [NSColor colorWithCalibratedRed: 1.000 green: 1.000 blue: 1.000 alpha: 1];
|
||||
|
||||
self.audioPlot.color = [NSColor colorWithCalibratedRed: 1.000 green: 1.000 blue: 1.000 alpha: 1];
|
||||
|
||||
// Plot type
|
||||
self.audioPlot.plotType = EZPlotTypeBuffer;
|
||||
|
||||
// Set length
|
||||
[self.audioPlot setRollingHistoryLength:1024];
|
||||
|
||||
/*
|
||||
Start the microphone
|
||||
*/
|
||||
self.audioPlot.plotType = EZPlotTypeBuffer;
|
||||
|
||||
//
|
||||
// Create the microphone
|
||||
//
|
||||
self.microphone = [EZMicrophone microphoneWithDelegate:self];
|
||||
|
||||
//
|
||||
// Start the microphone
|
||||
//
|
||||
[self.microphone startFetchingAudio];
|
||||
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Setup
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void) reloadMicrophoneInputPopUpButtonMenu
|
||||
{
|
||||
NSArray *inputDevices = [EZAudioDevice inputDevices];
|
||||
NSMenu *menu = [[NSMenu alloc] init];
|
||||
NSMenuItem *defaultInputMenuItem;
|
||||
for (EZAudioDevice *device in inputDevices)
|
||||
{
|
||||
NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:device.name
|
||||
action:@selector(changedInput:)
|
||||
keyEquivalent:@""];
|
||||
item.representedObject = device;
|
||||
item.target = self;
|
||||
[menu addItem:item];
|
||||
|
||||
// If this device is the same one the microphone is using then
|
||||
// we will use this menu item as the currently selected item
|
||||
// in the microphone input popup button's list of items. For instance,
|
||||
// if you are connected to an external display by default the external
|
||||
// display's microphone might be used instead of the mac's built in
|
||||
// mic.
|
||||
if ([device isEqual:self.microphone.device])
|
||||
{
|
||||
defaultInputMenuItem = item;
|
||||
}
|
||||
}
|
||||
self.microphoneInputPopUpButton.menu = menu;
|
||||
|
||||
//
|
||||
// Set the selected device to the current selection on the
|
||||
// microphone input popup button
|
||||
//
|
||||
[self.microphoneInputPopUpButton selectItem:defaultInputMenuItem];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void) reloadMicrophoneInputChannelPopUpButtonMenu
|
||||
{
|
||||
NSMenu *menu = [[NSMenu alloc] init];
|
||||
for (int i = 0; i < self.microphone.device.inputChannelCount; i++)
|
||||
{
|
||||
NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:@(i).stringValue
|
||||
action:@selector(changedInputChannel:)
|
||||
keyEquivalent:@""];
|
||||
item.representedObject = @(i);
|
||||
item.target = self;
|
||||
[menu addItem:item];
|
||||
}
|
||||
self.microphoneInputChannelPopUpButton.menu = menu;
|
||||
[self.microphoneInputChannelPopUpButton selectItemAtIndex:0];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Actions
|
||||
-(void)changePlotType:(id)sender {
|
||||
NSInteger selectedSegment = [sender selectedSegment];
|
||||
switch(selectedSegment){
|
||||
case 0:
|
||||
[self drawBufferPlot];
|
||||
break;
|
||||
case 1:
|
||||
[self drawRollingPlot];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)changedInput:(id)sender
|
||||
{
|
||||
EZAudioDevice *device = [sender representedObject];
|
||||
[self.microphone setDevice:device];
|
||||
}
|
||||
|
||||
-(void)toggleMicrophone:(id)sender {
|
||||
switch([sender state]){
|
||||
case NSOffState:
|
||||
[self.microphone stopFetchingAudio];
|
||||
break;
|
||||
case NSOnState:
|
||||
[self.microphone startFetchingAudio];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)changedInputChannel:(id)sender
|
||||
{
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)changePlotType:(id)sender
|
||||
{
|
||||
NSInteger selectedSegment = [sender selectedSegment];
|
||||
switch(selectedSegment)
|
||||
{
|
||||
case 0:
|
||||
[self drawBufferPlot];
|
||||
break;
|
||||
case 1:
|
||||
[self drawRollingPlot];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)toggleMicrophone:(id)sender
|
||||
{
|
||||
switch([sender state])
|
||||
{
|
||||
case NSOffState:
|
||||
[self.microphone stopFetchingAudio];
|
||||
break;
|
||||
case NSOnState:
|
||||
[self.microphone startFetchingAudio];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Action Extensions
|
||||
/*
|
||||
Give the visualization of the current buffer (this is almost exactly the openFrameworks audio input eample)
|
||||
*/
|
||||
-(void)drawBufferPlot {
|
||||
// Change the plot type to the buffer plot
|
||||
self.audioPlot.plotType = EZPlotTypeBuffer;
|
||||
// Don't mirror over the x-axis
|
||||
self.audioPlot.shouldMirror = NO;
|
||||
// Don't fill
|
||||
self.audioPlot.shouldFill = NO;
|
||||
- (void)drawBufferPlot
|
||||
{
|
||||
self.audioPlot.plotType = EZPlotTypeBuffer;
|
||||
self.audioPlot.shouldMirror = NO;
|
||||
self.audioPlot.shouldFill = NO;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
Give the classic mirrored, rolling waveform look
|
||||
*/
|
||||
-(void)drawRollingPlot {
|
||||
self.audioPlot.plotType = EZPlotTypeRolling;
|
||||
self.audioPlot.shouldFill = YES;
|
||||
self.audioPlot.shouldMirror = YES;
|
||||
- (void)drawRollingPlot
|
||||
{
|
||||
self.audioPlot.plotType = EZPlotTypeRolling;
|
||||
self.audioPlot.shouldFill = YES;
|
||||
self.audioPlot.shouldMirror = YES;
|
||||
}
|
||||
|
||||
#pragma mark - EZMicrophoneDelegate
|
||||
#warning Thread Safety
|
||||
// Note that any callback that provides streamed audio data (like streaming microphone input) happens on a separate audio thread that should not be blocked. When we feed audio data into any of the UI components we need to explicity create a GCD block on the main thread to properly get the UI to work.
|
||||
-(void)microphone:(EZMicrophone *)microphone
|
||||
hasAudioReceived:(float **)buffer
|
||||
withBufferSize:(UInt32)bufferSize
|
||||
withNumberOfChannels:(UInt32)numberOfChannels {
|
||||
// Getting audio data as an array of float buffer arrays. What does that mean? Because the audio is coming in as a stereo signal the data is split into a left and right channel. So buffer[0] corresponds to the float* data for the left channel while buffer[1] corresponds to the float* data for the right channel.
|
||||
|
||||
// See the Thread Safety warning above, but in a nutshell these callbacks happen on a separate audio thread. We wrap any UI updating in a GCD block on the main thread to avoid blocking that audio flow.
|
||||
dispatch_async(dispatch_get_main_queue(),^{
|
||||
- (void)microphone:(EZMicrophone *)microphone
|
||||
hasAudioReceived:(float **)buffer
|
||||
withBufferSize:(UInt32)bufferSize
|
||||
withNumberOfChannels:(UInt32)numberOfChannels
|
||||
{
|
||||
// See the Thread Safety warning above, but in a nutshell these callbacks happen on a separate audio thread. We wrap any UI updating in a GCD block on the main thread to avoid blocking that audio flow.
|
||||
__weak typeof(self) weakSelf = self;
|
||||
dispatch_async(dispatch_get_main_queue(),^{
|
||||
// All the audio plot needs is the buffer data (float*) and the size. Internally the audio plot will handle all the drawing related code, history management, and freeing its own resources. Hence, one badass line of code gets you a pretty plot :)
|
||||
[self.audioPlot updateBuffer:buffer[0] withBufferSize:bufferSize];
|
||||
});
|
||||
NSInteger channel = [weakSelf.microphoneInputChannelPopUpButton indexOfSelectedItem];
|
||||
[weakSelf.audioPlot updateBuffer:buffer[channel] withBufferSize:bufferSize];
|
||||
});
|
||||
}
|
||||
|
||||
-(void)microphone:(EZMicrophone *)microphone hasAudioStreamBasicDescription:(AudioStreamBasicDescription)audioStreamBasicDescription {
|
||||
// The AudioStreamBasicDescription of the microphone stream. This is useful when configuring the EZRecorder or telling another component what audio format type to expect.
|
||||
// Here's a print function to allow you to inspect it a little easier
|
||||
// [EZAudio printASBD:audioStreamBasicDescription];
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)microphone:(EZMicrophone *)microphone hasAudioStreamBasicDescription:(AudioStreamBasicDescription)audioStreamBasicDescription
|
||||
{
|
||||
// The AudioStreamBasicDescription of the microphone stream. This is useful when configuring the EZRecorder or telling another component what audio format type to expect.
|
||||
// Here's a print function to allow you to inspect it a little easier
|
||||
[EZAudioUtilities printASBD:audioStreamBasicDescription];
|
||||
}
|
||||
|
||||
-(void)microphone:(EZMicrophone *)microphone
|
||||
hasBufferList:(AudioBufferList *)bufferList
|
||||
withBufferSize:(UInt32)bufferSize
|
||||
withNumberOfChannels:(UInt32)numberOfChannels {
|
||||
// Getting audio data as a buffer list that can be directly fed into the EZRecorder or EZOutput. Say whattt...
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)microphone:(EZMicrophone *)microphone
|
||||
hasBufferList:(AudioBufferList *)bufferList
|
||||
withBufferSize:(UInt32)bufferSize
|
||||
withNumberOfChannels:(UInt32)numberOfChannels
|
||||
{
|
||||
// Getting audio data as a buffer list that can be directly fed into the EZRecorder or EZOutput. Say whattt...
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)microphone:(EZMicrophone *)microphone
|
||||
changedDevice:(EZAudioDevice *)device
|
||||
{
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
//
|
||||
// Set up the microphone input popup button's items to select
|
||||
// between different microphone inputs
|
||||
//
|
||||
[self reloadMicrophoneInputPopUpButtonMenu];
|
||||
|
||||
//
|
||||
// Set up the microphone input popup button's items to select
|
||||
// between different microphone input channels
|
||||
//
|
||||
[self reloadMicrophoneInputChannelPopUpButtonMenu];
|
||||
});
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@end
|
||||
|
||||
+86
-29
@@ -1,44 +1,40 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="6185.11" systemVersion="13E28" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="7702" systemVersion="14C109" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<dependencies>
|
||||
<deployment version="1070" identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="6185.11"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="7702"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<customObject id="-2" userLabel="File's Owner" customClass="OpenGLWaveformViewController">
|
||||
<connections>
|
||||
<outlet property="audioPlot" destination="sjT-Ri-IOJ" id="Wf8-PJ-0mY"/>
|
||||
<outlet property="view" destination="Zy4-iU-8jm" id="Plx-tA-1tK"/>
|
||||
<outlet property="audioPlot" destination="foT-nv-032" id="Baw-Le-z98"/>
|
||||
<outlet property="microphoneInputChannelPopUpButton" destination="Usd-lp-n8s" id="FbQ-hj-24k"/>
|
||||
<outlet property="microphoneInputPopUpButton" destination="wBG-jf-wVy" id="thS-Ur-IMj"/>
|
||||
<outlet property="view" destination="hFn-jA-9Se" id="cfu-I4-qhQ"/>
|
||||
</connections>
|
||||
</customObject>
|
||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||
<customView id="Zy4-iU-8jm">
|
||||
<customView id="hFn-jA-9Se">
|
||||
<rect key="frame" x="0.0" y="0.0" width="480" height="272"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<subviews>
|
||||
<customView translatesAutoresizingMaskIntoConstraints="NO" id="sjT-Ri-IOJ" customClass="EZAudioPlotGL">
|
||||
<rect key="frame" x="0.0" y="42" width="480" height="230"/>
|
||||
</customView>
|
||||
<button translatesAutoresizingMaskIntoConstraints="NO" id="0kM-1N-88d">
|
||||
<rect key="frame" x="18" y="14" width="119" height="18"/>
|
||||
<button translatesAutoresizingMaskIntoConstraints="NO" id="TbW-ha-PgJ">
|
||||
<rect key="frame" x="339" y="44" width="123" height="18"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="14" id="Da9-ZF-OaJ"/>
|
||||
<constraint firstAttribute="width" constant="119" id="xPL-Un-c5O"/>
|
||||
</constraints>
|
||||
<buttonCell key="cell" type="check" title="Microphone On" bezelStyle="regularSquare" imagePosition="left" state="on" inset="2" id="2YD-1T-DAq">
|
||||
<buttonCell key="cell" type="check" title="Microphone On" bezelStyle="regularSquare" imagePosition="right" state="on" inset="2" id="DaM-FV-gba">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="toggleMicrophone:" target="-2" id="jZt-bz-cRP"/>
|
||||
<action selector="toggleMicrophone:" target="-2" id="Zb5-tE-lf2"/>
|
||||
</connections>
|
||||
</button>
|
||||
<segmentedControl verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="M6h-53-a8o">
|
||||
<rect key="frame" x="333" y="11" width="129" height="24"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="21" id="a5H-w4-lUa"/>
|
||||
</constraints>
|
||||
<segmentedCell key="cell" borderStyle="border" alignment="left" style="rounded" trackingMode="selectOne" id="NWl-cZ-1Qx">
|
||||
<segmentedControl verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="UPI-59-15v">
|
||||
<rect key="frame" x="335" y="15" width="127" height="24"/>
|
||||
<segmentedCell key="cell" borderStyle="border" alignment="left" style="rounded" trackingMode="selectOne" id="VRd-fb-9nH">
|
||||
<font key="font" metaFont="system"/>
|
||||
<segments>
|
||||
<segment label="Buffer" selected="YES"/>
|
||||
@@ -46,20 +42,81 @@
|
||||
</segments>
|
||||
</segmentedCell>
|
||||
<connections>
|
||||
<action selector="changePlotType:" target="-2" id="gyT-zv-Y88"/>
|
||||
<action selector="changePlotType:" target="-2" id="BMJ-vA-3ce"/>
|
||||
</connections>
|
||||
</segmentedControl>
|
||||
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="wBG-jf-wVy" userLabel="microphoneInputPopUpButton">
|
||||
<rect key="frame" x="18" y="14" width="180" height="26"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="175" id="aMw-9p-rHt"/>
|
||||
</constraints>
|
||||
<popUpButtonCell key="cell" type="push" title="Item 1" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="cAL-rs-h1w" id="H5k-ea-wV5">
|
||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="menu"/>
|
||||
<menu key="menu" id="15c-sS-jR2">
|
||||
<items>
|
||||
<menuItem title="Item 1" state="on" id="cAL-rs-h1w"/>
|
||||
<menuItem title="Item 2" id="LTz-i3-N0M"/>
|
||||
<menuItem title="Item 3" id="twD-3N-rcl"/>
|
||||
</items>
|
||||
</menu>
|
||||
</popUpButtonCell>
|
||||
</popUpButton>
|
||||
<popUpButton verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Usd-lp-n8s" userLabel="microphoneInputChannelPopUpButton">
|
||||
<rect key="frame" x="204" y="14" width="79" height="26"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="74" id="oDB-ke-aGz"/>
|
||||
</constraints>
|
||||
<popUpButtonCell key="cell" type="push" title="1" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="Oit-zz-O9w" id="Eyb-QQ-0bg">
|
||||
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="menu"/>
|
||||
<menu key="menu" id="IPB-NH-My1">
|
||||
<items>
|
||||
<menuItem title="1" state="on" id="Oit-zz-O9w"/>
|
||||
<menuItem title="Item 2" id="v3y-Nn-80j"/>
|
||||
<menuItem title="Item 3" id="IHk-VR-fPC"/>
|
||||
</items>
|
||||
</menu>
|
||||
</popUpButtonCell>
|
||||
</popUpButton>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="AuX-d2-dD9">
|
||||
<rect key="frame" x="18" y="43" width="31" height="14"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Input" id="Fq3-tX-8aU">
|
||||
<font key="font" metaFont="smallSystem"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="PMV-Zt-Wg6">
|
||||
<rect key="frame" x="204" y="43" width="48" height="14"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Channel" id="PTE-g2-mTV">
|
||||
<font key="font" metaFont="smallSystem"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<customView translatesAutoresizingMaskIntoConstraints="NO" id="foT-nv-032" customClass="EZAudioPlotGL">
|
||||
<rect key="frame" x="0.0" y="77" width="480" height="195"/>
|
||||
</customView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="sjT-Ri-IOJ" secondAttribute="trailing" id="6Up-ZF-7DX"/>
|
||||
<constraint firstAttribute="trailing" secondItem="M6h-53-a8o" secondAttribute="trailing" constant="20" id="HMG-wO-794"/>
|
||||
<constraint firstItem="0kM-1N-88d" firstAttribute="top" secondItem="sjT-Ri-IOJ" secondAttribute="bottom" constant="12" id="OKD-YZ-l6b"/>
|
||||
<constraint firstItem="sjT-Ri-IOJ" firstAttribute="leading" secondItem="Zy4-iU-8jm" secondAttribute="leading" id="cCR-2i-qMC"/>
|
||||
<constraint firstItem="sjT-Ri-IOJ" firstAttribute="top" secondItem="Zy4-iU-8jm" secondAttribute="top" id="eCi-yv-OES"/>
|
||||
<constraint firstItem="0kM-1N-88d" firstAttribute="leading" secondItem="Zy4-iU-8jm" secondAttribute="leading" constant="20" id="eGv-dK-bH8"/>
|
||||
<constraint firstAttribute="bottom" secondItem="M6h-53-a8o" secondAttribute="bottom" constant="13" id="mLO-CB-wrB"/>
|
||||
<constraint firstItem="M6h-53-a8o" firstAttribute="top" secondItem="sjT-Ri-IOJ" secondAttribute="bottom" constant="8" id="od9-ut-rVh"/>
|
||||
<constraint firstAttribute="bottom" secondItem="0kM-1N-88d" secondAttribute="bottom" constant="16" id="opv-CP-vhv"/>
|
||||
<constraint firstAttribute="bottom" secondItem="wBG-jf-wVy" secondAttribute="bottom" constant="17" id="39Q-dq-Ifx"/>
|
||||
<constraint firstAttribute="trailing" secondItem="foT-nv-032" secondAttribute="trailing" id="4QC-HO-oMa"/>
|
||||
<constraint firstItem="foT-nv-032" firstAttribute="top" secondItem="hFn-jA-9Se" secondAttribute="top" id="5zo-Yc-OKX"/>
|
||||
<constraint firstItem="UPI-59-15v" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="Usd-lp-n8s" secondAttribute="trailing" constant="11" id="AXw-KY-VEi"/>
|
||||
<constraint firstItem="Usd-lp-n8s" firstAttribute="top" secondItem="PMV-Zt-Wg6" secondAttribute="bottom" constant="5" id="GZn-x5-gDa"/>
|
||||
<constraint firstAttribute="trailing" secondItem="UPI-59-15v" secondAttribute="trailing" constant="20" id="Ihi-YB-8cN"/>
|
||||
<constraint firstItem="AuX-d2-dD9" firstAttribute="leading" secondItem="hFn-jA-9Se" secondAttribute="leading" constant="20" id="RFU-gK-hRd"/>
|
||||
<constraint firstItem="TbW-ha-PgJ" firstAttribute="top" secondItem="foT-nv-032" secondAttribute="bottom" constant="17" id="aWO-qE-S52"/>
|
||||
<constraint firstAttribute="bottom" secondItem="UPI-59-15v" secondAttribute="bottom" constant="17" id="biy-0r-WsW"/>
|
||||
<constraint firstItem="wBG-jf-wVy" firstAttribute="top" secondItem="AuX-d2-dD9" secondAttribute="bottom" constant="5" id="fEE-bx-NVl"/>
|
||||
<constraint firstItem="UPI-59-15v" firstAttribute="top" secondItem="TbW-ha-PgJ" secondAttribute="bottom" constant="8" id="gMX-Q1-9Ly"/>
|
||||
<constraint firstAttribute="trailing" secondItem="TbW-ha-PgJ" secondAttribute="trailing" constant="20" id="gek-Wl-IPz"/>
|
||||
<constraint firstItem="Usd-lp-n8s" firstAttribute="leading" secondItem="wBG-jf-wVy" secondAttribute="trailing" constant="11" id="gqi-4E-1Wf"/>
|
||||
<constraint firstItem="Usd-lp-n8s" firstAttribute="leading" secondItem="PMV-Zt-Wg6" secondAttribute="leading" id="lT3-RX-en8"/>
|
||||
<constraint firstItem="foT-nv-032" firstAttribute="leading" secondItem="hFn-jA-9Se" secondAttribute="leading" id="o4A-j4-xiR"/>
|
||||
<constraint firstItem="wBG-jf-wVy" firstAttribute="leading" secondItem="hFn-jA-9Se" secondAttribute="leading" constant="20" id="uyC-v9-bP1"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Usd-lp-n8s" secondAttribute="bottom" constant="17" id="yk6-Fm-gXu"/>
|
||||
</constraints>
|
||||
</customView>
|
||||
</objects>
|
||||
|
||||
+108
-78
@@ -7,19 +7,24 @@
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
9417A7B31867DD6600D9D37B /* AEFloatConverter.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A79B1867DD6600D9D37B /* AEFloatConverter.m */; };
|
||||
9417A7B41867DD6600D9D37B /* EZAudio.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A79D1867DD6600D9D37B /* EZAudio.m */; };
|
||||
9417A7B51867DD6600D9D37B /* EZAudioFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A79F1867DD6600D9D37B /* EZAudioFile.m */; };
|
||||
9417A7B61867DD6600D9D37B /* EZAudioPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7A11867DD6600D9D37B /* EZAudioPlot.m */; };
|
||||
9417A7B71867DD6600D9D37B /* EZAudioPlotGL.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7A31867DD6600D9D37B /* EZAudioPlotGL.m */; };
|
||||
9417A7B81867DD6600D9D37B /* EZAudioPlotGLKViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7A51867DD6600D9D37B /* EZAudioPlotGLKViewController.m */; };
|
||||
9417A7B91867DD6600D9D37B /* EZMicrophone.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7A71867DD6600D9D37B /* EZMicrophone.m */; };
|
||||
9417A7BA1867DD6600D9D37B /* EZOutput.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7A91867DD6600D9D37B /* EZOutput.m */; };
|
||||
9417A7BB1867DD6600D9D37B /* EZPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7AB1867DD6600D9D37B /* EZPlot.m */; };
|
||||
9417A7BC1867DD6600D9D37B /* EZRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7AD1867DD6600D9D37B /* EZRecorder.m */; };
|
||||
9417A7BD1867DD6600D9D37B /* TPCircularBuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7AE1867DD6600D9D37B /* TPCircularBuffer.c */; };
|
||||
9417A7BE1867DD6600D9D37B /* CHANGELOG in Resources */ = {isa = PBXBuildFile; fileRef = 9417A7B11867DD6600D9D37B /* CHANGELOG */; };
|
||||
9417A7BF1867DD6600D9D37B /* VERSION in Resources */ = {isa = PBXBuildFile; fileRef = 9417A7B21867DD6600D9D37B /* VERSION */; };
|
||||
66FC0BA81B31060B005CF3D7 /* EZAudio.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B861B31060A005CF3D7 /* EZAudio.m */; };
|
||||
66FC0BA91B31060B005CF3D7 /* EZAudioDevice.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B881B31060A005CF3D7 /* EZAudioDevice.m */; };
|
||||
66FC0BAA1B31060B005CF3D7 /* EZAudioDisplayLink.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B8A1B31060A005CF3D7 /* EZAudioDisplayLink.m */; };
|
||||
66FC0BAB1B31060B005CF3D7 /* EZAudioFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B8C1B31060A005CF3D7 /* EZAudioFile.m */; };
|
||||
66FC0BAC1B31060B005CF3D7 /* EZAudioFloatConverter.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B8E1B31060A005CF3D7 /* EZAudioFloatConverter.m */; };
|
||||
66FC0BAD1B31060B005CF3D7 /* EZAudioFloatData.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B901B31060B005CF3D7 /* EZAudioFloatData.m */; };
|
||||
66FC0BAE1B31060B005CF3D7 /* EZAudioPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B921B31060B005CF3D7 /* EZAudioPlayer.m */; };
|
||||
66FC0BAF1B31060B005CF3D7 /* EZAudioPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B941B31060B005CF3D7 /* EZAudioPlot.m */; };
|
||||
66FC0BB01B31060B005CF3D7 /* EZAudioPlotGL.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B961B31060B005CF3D7 /* EZAudioPlotGL.m */; };
|
||||
66FC0BB11B31060B005CF3D7 /* EZAudioPlotGLKViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B981B31060B005CF3D7 /* EZAudioPlotGLKViewController.m */; };
|
||||
66FC0BB21B31060B005CF3D7 /* EZAudioUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B9A1B31060B005CF3D7 /* EZAudioUtilities.m */; };
|
||||
66FC0BB31B31060B005CF3D7 /* EZMicrophone.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B9C1B31060B005CF3D7 /* EZMicrophone.m */; };
|
||||
66FC0BB41B31060B005CF3D7 /* EZOutput.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B9E1B31060B005CF3D7 /* EZOutput.m */; };
|
||||
66FC0BB51B31060B005CF3D7 /* EZPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0BA01B31060B005CF3D7 /* EZPlot.m */; };
|
||||
66FC0BB61B31060B005CF3D7 /* EZRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0BA21B31060B005CF3D7 /* EZRecorder.m */; };
|
||||
66FC0BB71B31060B005CF3D7 /* TPCircularBuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0BA31B31060B005CF3D7 /* TPCircularBuffer.c */; };
|
||||
66FC0BB81B31060B005CF3D7 /* CHANGELOG in Resources */ = {isa = PBXBuildFile; fileRef = 66FC0BA61B31060B005CF3D7 /* CHANGELOG */; };
|
||||
66FC0BB91B31060B005CF3D7 /* VERSION in Resources */ = {isa = PBXBuildFile; fileRef = 66FC0BA71B31060B005CF3D7 /* VERSION */; };
|
||||
941D71B81864C457007D52D8 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 941D71B71864C457007D52D8 /* Cocoa.framework */; };
|
||||
941D71C21864C457007D52D8 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 941D71C01864C457007D52D8 /* InfoPlist.strings */; };
|
||||
941D71C41864C457007D52D8 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 941D71C31864C457007D52D8 /* main.m */; };
|
||||
@@ -52,30 +57,40 @@
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
9417A79A1867DD6600D9D37B /* AEFloatConverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AEFloatConverter.h; sourceTree = "<group>"; };
|
||||
9417A79B1867DD6600D9D37B /* AEFloatConverter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AEFloatConverter.m; sourceTree = "<group>"; };
|
||||
9417A79C1867DD6600D9D37B /* EZAudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudio.h; sourceTree = "<group>"; };
|
||||
9417A79D1867DD6600D9D37B /* EZAudio.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudio.m; sourceTree = "<group>"; };
|
||||
9417A79E1867DD6600D9D37B /* EZAudioFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioFile.h; sourceTree = "<group>"; };
|
||||
9417A79F1867DD6600D9D37B /* EZAudioFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioFile.m; sourceTree = "<group>"; };
|
||||
9417A7A01867DD6600D9D37B /* EZAudioPlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlot.h; sourceTree = "<group>"; };
|
||||
9417A7A11867DD6600D9D37B /* EZAudioPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlot.m; sourceTree = "<group>"; };
|
||||
9417A7A21867DD6600D9D37B /* EZAudioPlotGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGL.h; sourceTree = "<group>"; };
|
||||
9417A7A31867DD6600D9D37B /* EZAudioPlotGL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGL.m; sourceTree = "<group>"; };
|
||||
9417A7A41867DD6600D9D37B /* EZAudioPlotGLKViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGLKViewController.h; sourceTree = "<group>"; };
|
||||
9417A7A51867DD6600D9D37B /* EZAudioPlotGLKViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGLKViewController.m; sourceTree = "<group>"; };
|
||||
9417A7A61867DD6600D9D37B /* EZMicrophone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZMicrophone.h; sourceTree = "<group>"; };
|
||||
9417A7A71867DD6600D9D37B /* EZMicrophone.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZMicrophone.m; sourceTree = "<group>"; };
|
||||
9417A7A81867DD6600D9D37B /* EZOutput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZOutput.h; sourceTree = "<group>"; };
|
||||
9417A7A91867DD6600D9D37B /* EZOutput.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZOutput.m; sourceTree = "<group>"; };
|
||||
9417A7AA1867DD6600D9D37B /* EZPlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZPlot.h; sourceTree = "<group>"; };
|
||||
9417A7AB1867DD6600D9D37B /* EZPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZPlot.m; sourceTree = "<group>"; };
|
||||
9417A7AC1867DD6600D9D37B /* EZRecorder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZRecorder.h; sourceTree = "<group>"; };
|
||||
9417A7AD1867DD6600D9D37B /* EZRecorder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZRecorder.m; sourceTree = "<group>"; };
|
||||
9417A7AE1867DD6600D9D37B /* TPCircularBuffer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = TPCircularBuffer.c; sourceTree = "<group>"; };
|
||||
9417A7AF1867DD6600D9D37B /* TPCircularBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TPCircularBuffer.h; sourceTree = "<group>"; };
|
||||
9417A7B11867DD6600D9D37B /* CHANGELOG */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CHANGELOG; sourceTree = "<group>"; };
|
||||
9417A7B21867DD6600D9D37B /* VERSION */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VERSION; sourceTree = "<group>"; };
|
||||
66FC0B851B31060A005CF3D7 /* EZAudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudio.h; sourceTree = "<group>"; };
|
||||
66FC0B861B31060A005CF3D7 /* EZAudio.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudio.m; sourceTree = "<group>"; };
|
||||
66FC0B871B31060A005CF3D7 /* EZAudioDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioDevice.h; sourceTree = "<group>"; };
|
||||
66FC0B881B31060A005CF3D7 /* EZAudioDevice.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioDevice.m; sourceTree = "<group>"; };
|
||||
66FC0B891B31060A005CF3D7 /* EZAudioDisplayLink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioDisplayLink.h; sourceTree = "<group>"; };
|
||||
66FC0B8A1B31060A005CF3D7 /* EZAudioDisplayLink.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioDisplayLink.m; sourceTree = "<group>"; };
|
||||
66FC0B8B1B31060A005CF3D7 /* EZAudioFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioFile.h; sourceTree = "<group>"; };
|
||||
66FC0B8C1B31060A005CF3D7 /* EZAudioFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioFile.m; sourceTree = "<group>"; };
|
||||
66FC0B8D1B31060A005CF3D7 /* EZAudioFloatConverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioFloatConverter.h; sourceTree = "<group>"; };
|
||||
66FC0B8E1B31060A005CF3D7 /* EZAudioFloatConverter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioFloatConverter.m; sourceTree = "<group>"; };
|
||||
66FC0B8F1B31060A005CF3D7 /* EZAudioFloatData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioFloatData.h; sourceTree = "<group>"; };
|
||||
66FC0B901B31060B005CF3D7 /* EZAudioFloatData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioFloatData.m; sourceTree = "<group>"; };
|
||||
66FC0B911B31060B005CF3D7 /* EZAudioPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlayer.h; sourceTree = "<group>"; };
|
||||
66FC0B921B31060B005CF3D7 /* EZAudioPlayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlayer.m; sourceTree = "<group>"; };
|
||||
66FC0B931B31060B005CF3D7 /* EZAudioPlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlot.h; sourceTree = "<group>"; };
|
||||
66FC0B941B31060B005CF3D7 /* EZAudioPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlot.m; sourceTree = "<group>"; };
|
||||
66FC0B951B31060B005CF3D7 /* EZAudioPlotGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGL.h; sourceTree = "<group>"; };
|
||||
66FC0B961B31060B005CF3D7 /* EZAudioPlotGL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGL.m; sourceTree = "<group>"; };
|
||||
66FC0B971B31060B005CF3D7 /* EZAudioPlotGLKViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGLKViewController.h; sourceTree = "<group>"; };
|
||||
66FC0B981B31060B005CF3D7 /* EZAudioPlotGLKViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGLKViewController.m; sourceTree = "<group>"; };
|
||||
66FC0B991B31060B005CF3D7 /* EZAudioUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioUtilities.h; sourceTree = "<group>"; };
|
||||
66FC0B9A1B31060B005CF3D7 /* EZAudioUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioUtilities.m; sourceTree = "<group>"; };
|
||||
66FC0B9B1B31060B005CF3D7 /* EZMicrophone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZMicrophone.h; sourceTree = "<group>"; };
|
||||
66FC0B9C1B31060B005CF3D7 /* EZMicrophone.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZMicrophone.m; sourceTree = "<group>"; };
|
||||
66FC0B9D1B31060B005CF3D7 /* EZOutput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZOutput.h; sourceTree = "<group>"; };
|
||||
66FC0B9E1B31060B005CF3D7 /* EZOutput.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZOutput.m; sourceTree = "<group>"; };
|
||||
66FC0B9F1B31060B005CF3D7 /* EZPlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZPlot.h; sourceTree = "<group>"; };
|
||||
66FC0BA01B31060B005CF3D7 /* EZPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZPlot.m; sourceTree = "<group>"; };
|
||||
66FC0BA11B31060B005CF3D7 /* EZRecorder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZRecorder.h; sourceTree = "<group>"; };
|
||||
66FC0BA21B31060B005CF3D7 /* EZRecorder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZRecorder.m; sourceTree = "<group>"; };
|
||||
66FC0BA31B31060B005CF3D7 /* TPCircularBuffer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = TPCircularBuffer.c; sourceTree = "<group>"; };
|
||||
66FC0BA41B31060B005CF3D7 /* TPCircularBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TPCircularBuffer.h; sourceTree = "<group>"; };
|
||||
66FC0BA61B31060B005CF3D7 /* CHANGELOG */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CHANGELOG; sourceTree = "<group>"; };
|
||||
66FC0BA71B31060B005CF3D7 /* VERSION */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VERSION; sourceTree = "<group>"; };
|
||||
941D71B41864C457007D52D8 /* EZAudioPassThroughExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = EZAudioPassThroughExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
941D71B71864C457007D52D8 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
|
||||
941D71BA1864C457007D52D8 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
|
||||
@@ -133,42 +148,52 @@
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
9417A7991867DD6600D9D37B /* EZAudio */ = {
|
||||
66FC0B841B31060A005CF3D7 /* EZAudio */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9417A79A1867DD6600D9D37B /* AEFloatConverter.h */,
|
||||
9417A79B1867DD6600D9D37B /* AEFloatConverter.m */,
|
||||
9417A79C1867DD6600D9D37B /* EZAudio.h */,
|
||||
9417A79D1867DD6600D9D37B /* EZAudio.m */,
|
||||
9417A79E1867DD6600D9D37B /* EZAudioFile.h */,
|
||||
9417A79F1867DD6600D9D37B /* EZAudioFile.m */,
|
||||
9417A7A01867DD6600D9D37B /* EZAudioPlot.h */,
|
||||
9417A7A11867DD6600D9D37B /* EZAudioPlot.m */,
|
||||
9417A7A21867DD6600D9D37B /* EZAudioPlotGL.h */,
|
||||
9417A7A31867DD6600D9D37B /* EZAudioPlotGL.m */,
|
||||
9417A7A41867DD6600D9D37B /* EZAudioPlotGLKViewController.h */,
|
||||
9417A7A51867DD6600D9D37B /* EZAudioPlotGLKViewController.m */,
|
||||
9417A7A61867DD6600D9D37B /* EZMicrophone.h */,
|
||||
9417A7A71867DD6600D9D37B /* EZMicrophone.m */,
|
||||
9417A7A81867DD6600D9D37B /* EZOutput.h */,
|
||||
9417A7A91867DD6600D9D37B /* EZOutput.m */,
|
||||
9417A7AA1867DD6600D9D37B /* EZPlot.h */,
|
||||
9417A7AB1867DD6600D9D37B /* EZPlot.m */,
|
||||
9417A7AC1867DD6600D9D37B /* EZRecorder.h */,
|
||||
9417A7AD1867DD6600D9D37B /* EZRecorder.m */,
|
||||
9417A7AE1867DD6600D9D37B /* TPCircularBuffer.c */,
|
||||
9417A7AF1867DD6600D9D37B /* TPCircularBuffer.h */,
|
||||
9417A7B01867DD6600D9D37B /* VERSION */,
|
||||
66FC0B851B31060A005CF3D7 /* EZAudio.h */,
|
||||
66FC0B861B31060A005CF3D7 /* EZAudio.m */,
|
||||
66FC0B871B31060A005CF3D7 /* EZAudioDevice.h */,
|
||||
66FC0B881B31060A005CF3D7 /* EZAudioDevice.m */,
|
||||
66FC0B891B31060A005CF3D7 /* EZAudioDisplayLink.h */,
|
||||
66FC0B8A1B31060A005CF3D7 /* EZAudioDisplayLink.m */,
|
||||
66FC0B8B1B31060A005CF3D7 /* EZAudioFile.h */,
|
||||
66FC0B8C1B31060A005CF3D7 /* EZAudioFile.m */,
|
||||
66FC0B8D1B31060A005CF3D7 /* EZAudioFloatConverter.h */,
|
||||
66FC0B8E1B31060A005CF3D7 /* EZAudioFloatConverter.m */,
|
||||
66FC0B8F1B31060A005CF3D7 /* EZAudioFloatData.h */,
|
||||
66FC0B901B31060B005CF3D7 /* EZAudioFloatData.m */,
|
||||
66FC0B911B31060B005CF3D7 /* EZAudioPlayer.h */,
|
||||
66FC0B921B31060B005CF3D7 /* EZAudioPlayer.m */,
|
||||
66FC0B931B31060B005CF3D7 /* EZAudioPlot.h */,
|
||||
66FC0B941B31060B005CF3D7 /* EZAudioPlot.m */,
|
||||
66FC0B951B31060B005CF3D7 /* EZAudioPlotGL.h */,
|
||||
66FC0B961B31060B005CF3D7 /* EZAudioPlotGL.m */,
|
||||
66FC0B971B31060B005CF3D7 /* EZAudioPlotGLKViewController.h */,
|
||||
66FC0B981B31060B005CF3D7 /* EZAudioPlotGLKViewController.m */,
|
||||
66FC0B991B31060B005CF3D7 /* EZAudioUtilities.h */,
|
||||
66FC0B9A1B31060B005CF3D7 /* EZAudioUtilities.m */,
|
||||
66FC0B9B1B31060B005CF3D7 /* EZMicrophone.h */,
|
||||
66FC0B9C1B31060B005CF3D7 /* EZMicrophone.m */,
|
||||
66FC0B9D1B31060B005CF3D7 /* EZOutput.h */,
|
||||
66FC0B9E1B31060B005CF3D7 /* EZOutput.m */,
|
||||
66FC0B9F1B31060B005CF3D7 /* EZPlot.h */,
|
||||
66FC0BA01B31060B005CF3D7 /* EZPlot.m */,
|
||||
66FC0BA11B31060B005CF3D7 /* EZRecorder.h */,
|
||||
66FC0BA21B31060B005CF3D7 /* EZRecorder.m */,
|
||||
66FC0BA31B31060B005CF3D7 /* TPCircularBuffer.c */,
|
||||
66FC0BA41B31060B005CF3D7 /* TPCircularBuffer.h */,
|
||||
66FC0BA51B31060B005CF3D7 /* VERSION */,
|
||||
);
|
||||
name = EZAudio;
|
||||
path = ../../../../EZAudio;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9417A7B01867DD6600D9D37B /* VERSION */ = {
|
||||
66FC0BA51B31060B005CF3D7 /* VERSION */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9417A7B11867DD6600D9D37B /* CHANGELOG */,
|
||||
9417A7B21867DD6600D9D37B /* VERSION */,
|
||||
66FC0BA61B31060B005CF3D7 /* CHANGELOG */,
|
||||
66FC0BA71B31060B005CF3D7 /* VERSION */,
|
||||
);
|
||||
path = VERSION;
|
||||
sourceTree = "<group>";
|
||||
@@ -221,7 +246,7 @@
|
||||
941D71BD1864C457007D52D8 /* EZAudioPassThroughExample */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9417A7991867DD6600D9D37B /* EZAudio */,
|
||||
66FC0B841B31060A005CF3D7 /* EZAudio */,
|
||||
941D71C91864C457007D52D8 /* AppDelegate.h */,
|
||||
941D71CA1864C457007D52D8 /* AppDelegate.m */,
|
||||
941D721E1864C4D7007D52D8 /* PassThroughViewController.h */,
|
||||
@@ -341,12 +366,12 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
941D72221864C4D7007D52D8 /* PassThroughViewController.xib in Resources */,
|
||||
9417A7BF1867DD6600D9D37B /* VERSION in Resources */,
|
||||
66FC0BB91B31060B005CF3D7 /* VERSION in Resources */,
|
||||
941D71C21864C457007D52D8 /* InfoPlist.strings in Resources */,
|
||||
941D71D01864C457007D52D8 /* Images.xcassets in Resources */,
|
||||
941D71C81864C457007D52D8 /* Credits.rtf in Resources */,
|
||||
941D71CE1864C457007D52D8 /* MainMenu.xib in Resources */,
|
||||
9417A7BE1867DD6600D9D37B /* CHANGELOG in Resources */,
|
||||
66FC0BB81B31060B005CF3D7 /* CHANGELOG in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -365,20 +390,25 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
9417A7BD1867DD6600D9D37B /* TPCircularBuffer.c in Sources */,
|
||||
9417A7BA1867DD6600D9D37B /* EZOutput.m in Sources */,
|
||||
9417A7B81867DD6600D9D37B /* EZAudioPlotGLKViewController.m in Sources */,
|
||||
66FC0BB61B31060B005CF3D7 /* EZRecorder.m in Sources */,
|
||||
941D72211864C4D7007D52D8 /* PassThroughViewController.m in Sources */,
|
||||
9417A7B31867DD6600D9D37B /* AEFloatConverter.m in Sources */,
|
||||
66FC0BAC1B31060B005CF3D7 /* EZAudioFloatConverter.m in Sources */,
|
||||
66FC0BAD1B31060B005CF3D7 /* EZAudioFloatData.m in Sources */,
|
||||
66FC0BA81B31060B005CF3D7 /* EZAudio.m in Sources */,
|
||||
66FC0BAB1B31060B005CF3D7 /* EZAudioFile.m in Sources */,
|
||||
66FC0BB41B31060B005CF3D7 /* EZOutput.m in Sources */,
|
||||
66FC0BB01B31060B005CF3D7 /* EZAudioPlotGL.m in Sources */,
|
||||
66FC0BB71B31060B005CF3D7 /* TPCircularBuffer.c in Sources */,
|
||||
66FC0BAF1B31060B005CF3D7 /* EZAudioPlot.m in Sources */,
|
||||
941D71CB1864C457007D52D8 /* AppDelegate.m in Sources */,
|
||||
9417A7B61867DD6600D9D37B /* EZAudioPlot.m in Sources */,
|
||||
9417A7B51867DD6600D9D37B /* EZAudioFile.m in Sources */,
|
||||
9417A7B71867DD6600D9D37B /* EZAudioPlotGL.m in Sources */,
|
||||
66FC0BB31B31060B005CF3D7 /* EZMicrophone.m in Sources */,
|
||||
66FC0BAE1B31060B005CF3D7 /* EZAudioPlayer.m in Sources */,
|
||||
941D71C41864C457007D52D8 /* main.m in Sources */,
|
||||
9417A7BB1867DD6600D9D37B /* EZPlot.m in Sources */,
|
||||
9417A7B91867DD6600D9D37B /* EZMicrophone.m in Sources */,
|
||||
9417A7BC1867DD6600D9D37B /* EZRecorder.m in Sources */,
|
||||
9417A7B41867DD6600D9D37B /* EZAudio.m in Sources */,
|
||||
66FC0BAA1B31060B005CF3D7 /* EZAudioDisplayLink.m in Sources */,
|
||||
66FC0BB51B31060B005CF3D7 /* EZPlot.m in Sources */,
|
||||
66FC0BA91B31060B005CF3D7 /* EZAudioDevice.m in Sources */,
|
||||
66FC0BB21B31060B005CF3D7 /* EZAudioUtilities.m in Sources */,
|
||||
66FC0BB11B31060B005CF3D7 /* EZAudioPlotGLKViewController.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
||||
+4
-4
@@ -63,7 +63,7 @@
|
||||
/**
|
||||
Initialize the circular buffer
|
||||
*/
|
||||
[EZAudio circularBuffer:&_circularBuffer withSize:2048];
|
||||
[EZAudioUtilities circularBuffer:&_circularBuffer withSize:2048];
|
||||
}
|
||||
|
||||
#pragma mark - Customize the Audio Plot
|
||||
@@ -82,7 +82,7 @@
|
||||
/*
|
||||
Start the microphone
|
||||
*/
|
||||
[EZMicrophone sharedMicrophone].microphoneDelegate = self;
|
||||
[EZMicrophone sharedMicrophone].delegate = self;
|
||||
[[EZMicrophone sharedMicrophone] startFetchingAudio];
|
||||
|
||||
/**
|
||||
@@ -162,7 +162,7 @@ withNumberOfChannels:(UInt32)numberOfChannels {
|
||||
/**
|
||||
Append the audio data to a circular buffer
|
||||
*/
|
||||
[EZAudio appendDataToCircularBuffer:&_circularBuffer
|
||||
[EZAudioUtilities appendDataToCircularBuffer:&_circularBuffer
|
||||
fromAudioBufferList:bufferList];
|
||||
}
|
||||
|
||||
@@ -173,7 +173,7 @@ withNumberOfChannels:(UInt32)numberOfChannels {
|
||||
|
||||
#pragma mark - Cleanup
|
||||
-(void)dealloc {
|
||||
[EZAudio freeCircularBuffer:&_circularBuffer];
|
||||
[EZAudioUtilities freeCircularBuffer:&_circularBuffer];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Binary file not shown.
+121
-91
@@ -7,6 +7,24 @@
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
66FC0B061B3105F4005CF3D7 /* EZAudio.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0AE41B3105F4005CF3D7 /* EZAudio.m */; };
|
||||
66FC0B071B3105F4005CF3D7 /* EZAudioDevice.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0AE61B3105F4005CF3D7 /* EZAudioDevice.m */; };
|
||||
66FC0B081B3105F4005CF3D7 /* EZAudioDisplayLink.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0AE81B3105F4005CF3D7 /* EZAudioDisplayLink.m */; };
|
||||
66FC0B091B3105F4005CF3D7 /* EZAudioFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0AEA1B3105F4005CF3D7 /* EZAudioFile.m */; };
|
||||
66FC0B0A1B3105F4005CF3D7 /* EZAudioFloatConverter.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0AEC1B3105F4005CF3D7 /* EZAudioFloatConverter.m */; };
|
||||
66FC0B0B1B3105F4005CF3D7 /* EZAudioFloatData.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0AEE1B3105F4005CF3D7 /* EZAudioFloatData.m */; };
|
||||
66FC0B0C1B3105F4005CF3D7 /* EZAudioPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0AF01B3105F4005CF3D7 /* EZAudioPlayer.m */; };
|
||||
66FC0B0D1B3105F4005CF3D7 /* EZAudioPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0AF21B3105F4005CF3D7 /* EZAudioPlot.m */; };
|
||||
66FC0B0E1B3105F4005CF3D7 /* EZAudioPlotGL.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0AF41B3105F4005CF3D7 /* EZAudioPlotGL.m */; };
|
||||
66FC0B0F1B3105F4005CF3D7 /* EZAudioPlotGLKViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0AF61B3105F4005CF3D7 /* EZAudioPlotGLKViewController.m */; };
|
||||
66FC0B101B3105F4005CF3D7 /* EZAudioUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0AF81B3105F4005CF3D7 /* EZAudioUtilities.m */; };
|
||||
66FC0B111B3105F4005CF3D7 /* EZMicrophone.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0AFA1B3105F4005CF3D7 /* EZMicrophone.m */; };
|
||||
66FC0B121B3105F4005CF3D7 /* EZOutput.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0AFC1B3105F4005CF3D7 /* EZOutput.m */; };
|
||||
66FC0B131B3105F4005CF3D7 /* EZPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0AFE1B3105F4005CF3D7 /* EZPlot.m */; };
|
||||
66FC0B141B3105F4005CF3D7 /* EZRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B001B3105F4005CF3D7 /* EZRecorder.m */; };
|
||||
66FC0B151B3105F4005CF3D7 /* TPCircularBuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B011B3105F4005CF3D7 /* TPCircularBuffer.c */; };
|
||||
66FC0B161B3105F4005CF3D7 /* CHANGELOG in Resources */ = {isa = PBXBuildFile; fileRef = 66FC0B041B3105F4005CF3D7 /* CHANGELOG */; };
|
||||
66FC0B171B3105F4005CF3D7 /* VERSION in Resources */ = {isa = PBXBuildFile; fileRef = 66FC0B051B3105F4005CF3D7 /* VERSION */; };
|
||||
94056EFB185BD83400EB94BA /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94056EFA185BD83400EB94BA /* Cocoa.framework */; };
|
||||
94056F05185BD83400EB94BA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 94056F03185BD83400EB94BA /* InfoPlist.strings */; };
|
||||
94056F07185BD83400EB94BA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 94056F06185BD83400EB94BA /* main.m */; };
|
||||
@@ -27,19 +45,6 @@
|
||||
94056F66185BDB4700EB94BA /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94056F63185BDB4700EB94BA /* AudioUnit.framework */; };
|
||||
94056F67185BDB4700EB94BA /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94056F64185BDB4700EB94BA /* CoreAudio.framework */; };
|
||||
9417A6D51865928C00D9D37B /* simple-drum-beat.wav in Resources */ = {isa = PBXBuildFile; fileRef = 9417A6D41865928C00D9D37B /* simple-drum-beat.wav */; };
|
||||
9417A73E1867DD3400D9D37B /* AEFloatConverter.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7261867DD3400D9D37B /* AEFloatConverter.m */; };
|
||||
9417A73F1867DD3400D9D37B /* EZAudio.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7281867DD3400D9D37B /* EZAudio.m */; };
|
||||
9417A7401867DD3400D9D37B /* EZAudioFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A72A1867DD3400D9D37B /* EZAudioFile.m */; };
|
||||
9417A7411867DD3400D9D37B /* EZAudioPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A72C1867DD3400D9D37B /* EZAudioPlot.m */; };
|
||||
9417A7421867DD3400D9D37B /* EZAudioPlotGL.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A72E1867DD3400D9D37B /* EZAudioPlotGL.m */; };
|
||||
9417A7431867DD3400D9D37B /* EZAudioPlotGLKViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7301867DD3400D9D37B /* EZAudioPlotGLKViewController.m */; };
|
||||
9417A7441867DD3400D9D37B /* EZMicrophone.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7321867DD3400D9D37B /* EZMicrophone.m */; };
|
||||
9417A7451867DD3400D9D37B /* EZOutput.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7341867DD3400D9D37B /* EZOutput.m */; };
|
||||
9417A7461867DD3400D9D37B /* EZPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7361867DD3400D9D37B /* EZPlot.m */; };
|
||||
9417A7471867DD3400D9D37B /* EZRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7381867DD3400D9D37B /* EZRecorder.m */; };
|
||||
9417A7481867DD3400D9D37B /* TPCircularBuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7391867DD3400D9D37B /* TPCircularBuffer.c */; };
|
||||
9417A7491867DD3400D9D37B /* CHANGELOG in Resources */ = {isa = PBXBuildFile; fileRef = 9417A73C1867DD3400D9D37B /* CHANGELOG */; };
|
||||
9417A74A1867DD3400D9D37B /* VERSION in Resources */ = {isa = PBXBuildFile; fileRef = 9417A73D1867DD3400D9D37B /* VERSION */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
@@ -53,6 +58,40 @@
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
66FC0AE31B3105F4005CF3D7 /* EZAudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudio.h; sourceTree = "<group>"; };
|
||||
66FC0AE41B3105F4005CF3D7 /* EZAudio.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudio.m; sourceTree = "<group>"; };
|
||||
66FC0AE51B3105F4005CF3D7 /* EZAudioDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioDevice.h; sourceTree = "<group>"; };
|
||||
66FC0AE61B3105F4005CF3D7 /* EZAudioDevice.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioDevice.m; sourceTree = "<group>"; };
|
||||
66FC0AE71B3105F4005CF3D7 /* EZAudioDisplayLink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioDisplayLink.h; sourceTree = "<group>"; };
|
||||
66FC0AE81B3105F4005CF3D7 /* EZAudioDisplayLink.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioDisplayLink.m; sourceTree = "<group>"; };
|
||||
66FC0AE91B3105F4005CF3D7 /* EZAudioFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioFile.h; sourceTree = "<group>"; };
|
||||
66FC0AEA1B3105F4005CF3D7 /* EZAudioFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioFile.m; sourceTree = "<group>"; };
|
||||
66FC0AEB1B3105F4005CF3D7 /* EZAudioFloatConverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioFloatConverter.h; sourceTree = "<group>"; };
|
||||
66FC0AEC1B3105F4005CF3D7 /* EZAudioFloatConverter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioFloatConverter.m; sourceTree = "<group>"; };
|
||||
66FC0AED1B3105F4005CF3D7 /* EZAudioFloatData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioFloatData.h; sourceTree = "<group>"; };
|
||||
66FC0AEE1B3105F4005CF3D7 /* EZAudioFloatData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioFloatData.m; sourceTree = "<group>"; };
|
||||
66FC0AEF1B3105F4005CF3D7 /* EZAudioPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlayer.h; sourceTree = "<group>"; };
|
||||
66FC0AF01B3105F4005CF3D7 /* EZAudioPlayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlayer.m; sourceTree = "<group>"; };
|
||||
66FC0AF11B3105F4005CF3D7 /* EZAudioPlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlot.h; sourceTree = "<group>"; };
|
||||
66FC0AF21B3105F4005CF3D7 /* EZAudioPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlot.m; sourceTree = "<group>"; };
|
||||
66FC0AF31B3105F4005CF3D7 /* EZAudioPlotGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGL.h; sourceTree = "<group>"; };
|
||||
66FC0AF41B3105F4005CF3D7 /* EZAudioPlotGL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGL.m; sourceTree = "<group>"; };
|
||||
66FC0AF51B3105F4005CF3D7 /* EZAudioPlotGLKViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGLKViewController.h; sourceTree = "<group>"; };
|
||||
66FC0AF61B3105F4005CF3D7 /* EZAudioPlotGLKViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGLKViewController.m; sourceTree = "<group>"; };
|
||||
66FC0AF71B3105F4005CF3D7 /* EZAudioUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioUtilities.h; sourceTree = "<group>"; };
|
||||
66FC0AF81B3105F4005CF3D7 /* EZAudioUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioUtilities.m; sourceTree = "<group>"; };
|
||||
66FC0AF91B3105F4005CF3D7 /* EZMicrophone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZMicrophone.h; sourceTree = "<group>"; };
|
||||
66FC0AFA1B3105F4005CF3D7 /* EZMicrophone.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZMicrophone.m; sourceTree = "<group>"; };
|
||||
66FC0AFB1B3105F4005CF3D7 /* EZOutput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZOutput.h; sourceTree = "<group>"; };
|
||||
66FC0AFC1B3105F4005CF3D7 /* EZOutput.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZOutput.m; sourceTree = "<group>"; };
|
||||
66FC0AFD1B3105F4005CF3D7 /* EZPlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZPlot.h; sourceTree = "<group>"; };
|
||||
66FC0AFE1B3105F4005CF3D7 /* EZPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZPlot.m; sourceTree = "<group>"; };
|
||||
66FC0AFF1B3105F4005CF3D7 /* EZRecorder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZRecorder.h; sourceTree = "<group>"; };
|
||||
66FC0B001B3105F4005CF3D7 /* EZRecorder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZRecorder.m; sourceTree = "<group>"; };
|
||||
66FC0B011B3105F4005CF3D7 /* TPCircularBuffer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = TPCircularBuffer.c; sourceTree = "<group>"; };
|
||||
66FC0B021B3105F4005CF3D7 /* TPCircularBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TPCircularBuffer.h; sourceTree = "<group>"; };
|
||||
66FC0B041B3105F4005CF3D7 /* CHANGELOG */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CHANGELOG; sourceTree = "<group>"; };
|
||||
66FC0B051B3105F4005CF3D7 /* VERSION */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VERSION; sourceTree = "<group>"; };
|
||||
94056EF7185BD83400EB94BA /* EZAudioPlayFileExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = EZAudioPlayFileExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
94056EFA185BD83400EB94BA /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
|
||||
94056EFD185BD83400EB94BA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
|
||||
@@ -82,30 +121,6 @@
|
||||
94056F63185BDB4700EB94BA /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = System/Library/Frameworks/AudioUnit.framework; sourceTree = SDKROOT; };
|
||||
94056F64185BDB4700EB94BA /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
|
||||
9417A6D41865928C00D9D37B /* simple-drum-beat.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = "simple-drum-beat.wav"; path = "../../../simple-drum-beat.wav"; sourceTree = "<group>"; };
|
||||
9417A7251867DD3400D9D37B /* AEFloatConverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AEFloatConverter.h; sourceTree = "<group>"; };
|
||||
9417A7261867DD3400D9D37B /* AEFloatConverter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AEFloatConverter.m; sourceTree = "<group>"; };
|
||||
9417A7271867DD3400D9D37B /* EZAudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudio.h; sourceTree = "<group>"; };
|
||||
9417A7281867DD3400D9D37B /* EZAudio.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudio.m; sourceTree = "<group>"; };
|
||||
9417A7291867DD3400D9D37B /* EZAudioFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioFile.h; sourceTree = "<group>"; };
|
||||
9417A72A1867DD3400D9D37B /* EZAudioFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioFile.m; sourceTree = "<group>"; };
|
||||
9417A72B1867DD3400D9D37B /* EZAudioPlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlot.h; sourceTree = "<group>"; };
|
||||
9417A72C1867DD3400D9D37B /* EZAudioPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlot.m; sourceTree = "<group>"; };
|
||||
9417A72D1867DD3400D9D37B /* EZAudioPlotGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGL.h; sourceTree = "<group>"; };
|
||||
9417A72E1867DD3400D9D37B /* EZAudioPlotGL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGL.m; sourceTree = "<group>"; };
|
||||
9417A72F1867DD3400D9D37B /* EZAudioPlotGLKViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGLKViewController.h; sourceTree = "<group>"; };
|
||||
9417A7301867DD3400D9D37B /* EZAudioPlotGLKViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGLKViewController.m; sourceTree = "<group>"; };
|
||||
9417A7311867DD3400D9D37B /* EZMicrophone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZMicrophone.h; sourceTree = "<group>"; };
|
||||
9417A7321867DD3400D9D37B /* EZMicrophone.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZMicrophone.m; sourceTree = "<group>"; };
|
||||
9417A7331867DD3400D9D37B /* EZOutput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZOutput.h; sourceTree = "<group>"; };
|
||||
9417A7341867DD3400D9D37B /* EZOutput.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZOutput.m; sourceTree = "<group>"; };
|
||||
9417A7351867DD3400D9D37B /* EZPlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZPlot.h; sourceTree = "<group>"; };
|
||||
9417A7361867DD3400D9D37B /* EZPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZPlot.m; sourceTree = "<group>"; };
|
||||
9417A7371867DD3400D9D37B /* EZRecorder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZRecorder.h; sourceTree = "<group>"; };
|
||||
9417A7381867DD3400D9D37B /* EZRecorder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZRecorder.m; sourceTree = "<group>"; };
|
||||
9417A7391867DD3400D9D37B /* TPCircularBuffer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = TPCircularBuffer.c; sourceTree = "<group>"; };
|
||||
9417A73A1867DD3400D9D37B /* TPCircularBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TPCircularBuffer.h; sourceTree = "<group>"; };
|
||||
9417A73C1867DD3400D9D37B /* CHANGELOG */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CHANGELOG; sourceTree = "<group>"; };
|
||||
9417A73D1867DD3400D9D37B /* VERSION */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VERSION; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@@ -135,6 +150,56 @@
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
66FC0AE21B3105F4005CF3D7 /* EZAudio */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
66FC0AE31B3105F4005CF3D7 /* EZAudio.h */,
|
||||
66FC0AE41B3105F4005CF3D7 /* EZAudio.m */,
|
||||
66FC0AE51B3105F4005CF3D7 /* EZAudioDevice.h */,
|
||||
66FC0AE61B3105F4005CF3D7 /* EZAudioDevice.m */,
|
||||
66FC0AE71B3105F4005CF3D7 /* EZAudioDisplayLink.h */,
|
||||
66FC0AE81B3105F4005CF3D7 /* EZAudioDisplayLink.m */,
|
||||
66FC0AE91B3105F4005CF3D7 /* EZAudioFile.h */,
|
||||
66FC0AEA1B3105F4005CF3D7 /* EZAudioFile.m */,
|
||||
66FC0AEB1B3105F4005CF3D7 /* EZAudioFloatConverter.h */,
|
||||
66FC0AEC1B3105F4005CF3D7 /* EZAudioFloatConverter.m */,
|
||||
66FC0AED1B3105F4005CF3D7 /* EZAudioFloatData.h */,
|
||||
66FC0AEE1B3105F4005CF3D7 /* EZAudioFloatData.m */,
|
||||
66FC0AEF1B3105F4005CF3D7 /* EZAudioPlayer.h */,
|
||||
66FC0AF01B3105F4005CF3D7 /* EZAudioPlayer.m */,
|
||||
66FC0AF11B3105F4005CF3D7 /* EZAudioPlot.h */,
|
||||
66FC0AF21B3105F4005CF3D7 /* EZAudioPlot.m */,
|
||||
66FC0AF31B3105F4005CF3D7 /* EZAudioPlotGL.h */,
|
||||
66FC0AF41B3105F4005CF3D7 /* EZAudioPlotGL.m */,
|
||||
66FC0AF51B3105F4005CF3D7 /* EZAudioPlotGLKViewController.h */,
|
||||
66FC0AF61B3105F4005CF3D7 /* EZAudioPlotGLKViewController.m */,
|
||||
66FC0AF71B3105F4005CF3D7 /* EZAudioUtilities.h */,
|
||||
66FC0AF81B3105F4005CF3D7 /* EZAudioUtilities.m */,
|
||||
66FC0AF91B3105F4005CF3D7 /* EZMicrophone.h */,
|
||||
66FC0AFA1B3105F4005CF3D7 /* EZMicrophone.m */,
|
||||
66FC0AFB1B3105F4005CF3D7 /* EZOutput.h */,
|
||||
66FC0AFC1B3105F4005CF3D7 /* EZOutput.m */,
|
||||
66FC0AFD1B3105F4005CF3D7 /* EZPlot.h */,
|
||||
66FC0AFE1B3105F4005CF3D7 /* EZPlot.m */,
|
||||
66FC0AFF1B3105F4005CF3D7 /* EZRecorder.h */,
|
||||
66FC0B001B3105F4005CF3D7 /* EZRecorder.m */,
|
||||
66FC0B011B3105F4005CF3D7 /* TPCircularBuffer.c */,
|
||||
66FC0B021B3105F4005CF3D7 /* TPCircularBuffer.h */,
|
||||
66FC0B031B3105F4005CF3D7 /* VERSION */,
|
||||
);
|
||||
name = EZAudio;
|
||||
path = ../../../../EZAudio;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
66FC0B031B3105F4005CF3D7 /* VERSION */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
66FC0B041B3105F4005CF3D7 /* CHANGELOG */,
|
||||
66FC0B051B3105F4005CF3D7 /* VERSION */,
|
||||
);
|
||||
path = VERSION;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
94056EEE185BD83400EB94BA = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -183,7 +248,7 @@
|
||||
94056F00185BD83400EB94BA /* EZAudioPlayFileExample */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9417A7241867DD3400D9D37B /* EZAudio */,
|
||||
66FC0AE21B3105F4005CF3D7 /* EZAudio */,
|
||||
94056F0C185BD83400EB94BA /* AppDelegate.h */,
|
||||
94056F0D185BD83400EB94BA /* AppDelegate.m */,
|
||||
94056F2E185BD86D00EB94BA /* PlayFileViewController.h */,
|
||||
@@ -227,46 +292,6 @@
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9417A7241867DD3400D9D37B /* EZAudio */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9417A7251867DD3400D9D37B /* AEFloatConverter.h */,
|
||||
9417A7261867DD3400D9D37B /* AEFloatConverter.m */,
|
||||
9417A7271867DD3400D9D37B /* EZAudio.h */,
|
||||
9417A7281867DD3400D9D37B /* EZAudio.m */,
|
||||
9417A7291867DD3400D9D37B /* EZAudioFile.h */,
|
||||
9417A72A1867DD3400D9D37B /* EZAudioFile.m */,
|
||||
9417A72B1867DD3400D9D37B /* EZAudioPlot.h */,
|
||||
9417A72C1867DD3400D9D37B /* EZAudioPlot.m */,
|
||||
9417A72D1867DD3400D9D37B /* EZAudioPlotGL.h */,
|
||||
9417A72E1867DD3400D9D37B /* EZAudioPlotGL.m */,
|
||||
9417A72F1867DD3400D9D37B /* EZAudioPlotGLKViewController.h */,
|
||||
9417A7301867DD3400D9D37B /* EZAudioPlotGLKViewController.m */,
|
||||
9417A7311867DD3400D9D37B /* EZMicrophone.h */,
|
||||
9417A7321867DD3400D9D37B /* EZMicrophone.m */,
|
||||
9417A7331867DD3400D9D37B /* EZOutput.h */,
|
||||
9417A7341867DD3400D9D37B /* EZOutput.m */,
|
||||
9417A7351867DD3400D9D37B /* EZPlot.h */,
|
||||
9417A7361867DD3400D9D37B /* EZPlot.m */,
|
||||
9417A7371867DD3400D9D37B /* EZRecorder.h */,
|
||||
9417A7381867DD3400D9D37B /* EZRecorder.m */,
|
||||
9417A7391867DD3400D9D37B /* TPCircularBuffer.c */,
|
||||
9417A73A1867DD3400D9D37B /* TPCircularBuffer.h */,
|
||||
9417A73B1867DD3400D9D37B /* VERSION */,
|
||||
);
|
||||
name = EZAudio;
|
||||
path = ../../../../EZAudio;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9417A73B1867DD3400D9D37B /* VERSION */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9417A73C1867DD3400D9D37B /* CHANGELOG */,
|
||||
9417A73D1867DD3400D9D37B /* VERSION */,
|
||||
);
|
||||
path = VERSION;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
@@ -345,10 +370,10 @@
|
||||
files = (
|
||||
94056F05185BD83400EB94BA /* InfoPlist.strings in Resources */,
|
||||
94056F13185BD83400EB94BA /* Images.xcassets in Resources */,
|
||||
9417A7491867DD3400D9D37B /* CHANGELOG in Resources */,
|
||||
66FC0B161B3105F4005CF3D7 /* CHANGELOG in Resources */,
|
||||
9417A6D51865928C00D9D37B /* simple-drum-beat.wav in Resources */,
|
||||
94056F0B185BD83400EB94BA /* Credits.rtf in Resources */,
|
||||
9417A74A1867DD3400D9D37B /* VERSION in Resources */,
|
||||
66FC0B171B3105F4005CF3D7 /* VERSION in Resources */,
|
||||
94056F32185BD86D00EB94BA /* PlayFileViewController.xib in Resources */,
|
||||
94056F11185BD83400EB94BA /* MainMenu.xib in Resources */,
|
||||
);
|
||||
@@ -369,20 +394,25 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
9417A7481867DD3400D9D37B /* TPCircularBuffer.c in Sources */,
|
||||
9417A7451867DD3400D9D37B /* EZOutput.m in Sources */,
|
||||
9417A7431867DD3400D9D37B /* EZAudioPlotGLKViewController.m in Sources */,
|
||||
66FC0B141B3105F4005CF3D7 /* EZRecorder.m in Sources */,
|
||||
94056F31185BD86D00EB94BA /* PlayFileViewController.m in Sources */,
|
||||
9417A73E1867DD3400D9D37B /* AEFloatConverter.m in Sources */,
|
||||
66FC0B0A1B3105F4005CF3D7 /* EZAudioFloatConverter.m in Sources */,
|
||||
66FC0B0B1B3105F4005CF3D7 /* EZAudioFloatData.m in Sources */,
|
||||
66FC0B061B3105F4005CF3D7 /* EZAudio.m in Sources */,
|
||||
66FC0B091B3105F4005CF3D7 /* EZAudioFile.m in Sources */,
|
||||
66FC0B121B3105F4005CF3D7 /* EZOutput.m in Sources */,
|
||||
66FC0B0E1B3105F4005CF3D7 /* EZAudioPlotGL.m in Sources */,
|
||||
66FC0B151B3105F4005CF3D7 /* TPCircularBuffer.c in Sources */,
|
||||
66FC0B0D1B3105F4005CF3D7 /* EZAudioPlot.m in Sources */,
|
||||
94056F0E185BD83400EB94BA /* AppDelegate.m in Sources */,
|
||||
9417A7411867DD3400D9D37B /* EZAudioPlot.m in Sources */,
|
||||
9417A7401867DD3400D9D37B /* EZAudioFile.m in Sources */,
|
||||
9417A7421867DD3400D9D37B /* EZAudioPlotGL.m in Sources */,
|
||||
66FC0B111B3105F4005CF3D7 /* EZMicrophone.m in Sources */,
|
||||
66FC0B0C1B3105F4005CF3D7 /* EZAudioPlayer.m in Sources */,
|
||||
94056F07185BD83400EB94BA /* main.m in Sources */,
|
||||
9417A7461867DD3400D9D37B /* EZPlot.m in Sources */,
|
||||
9417A7441867DD3400D9D37B /* EZMicrophone.m in Sources */,
|
||||
9417A7471867DD3400D9D37B /* EZRecorder.m in Sources */,
|
||||
9417A73F1867DD3400D9D37B /* EZAudio.m in Sources */,
|
||||
66FC0B081B3105F4005CF3D7 /* EZAudioDisplayLink.m in Sources */,
|
||||
66FC0B131B3105F4005CF3D7 /* EZPlot.m in Sources */,
|
||||
66FC0B071B3105F4005CF3D7 /* EZAudioDevice.m in Sources */,
|
||||
66FC0B101B3105F4005CF3D7 /* EZAudioUtilities.m in Sources */,
|
||||
66FC0B0F1B3105F4005CF3D7 /* EZAudioPlotGLKViewController.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
||||
+6
-1
@@ -47,7 +47,8 @@
|
||||
/**
|
||||
The CoreGraphics based audio plot
|
||||
*/
|
||||
@property (nonatomic,weak) IBOutlet EZAudioPlotGL *audioPlot;
|
||||
@property (nonatomic,weak) IBOutlet EZAudioPlot *audioPlotLeft;
|
||||
@property (nonatomic,weak) IBOutlet EZAudioPlot *audioPlotRight;
|
||||
|
||||
#pragma mark - UI Extras
|
||||
/**
|
||||
@@ -60,6 +61,10 @@
|
||||
*/
|
||||
@property (nonatomic,weak) IBOutlet NSSlider *framePositionSlider;
|
||||
|
||||
@property (nonatomic, weak) IBOutlet NSButton *playButton;
|
||||
@property (nonatomic, weak) IBOutlet NSSegmentedControl *plotSegmentControl;
|
||||
@property (nonatomic, weak) IBOutlet NSProgressIndicator *progressIndicator;
|
||||
|
||||
/**
|
||||
A slider to adjust the sample rate.
|
||||
*/
|
||||
|
||||
+180
-187
@@ -26,247 +26,240 @@
|
||||
#import "PlayFileViewController.h"
|
||||
|
||||
@interface PlayFileViewController ()
|
||||
@property (nonatomic,weak) IBOutlet NSSegmentedControl *plotSegmentControl;
|
||||
@property (nonatomic,weak) IBOutlet NSButton *playButton;
|
||||
@property (nonatomic, strong) EZOutput *output;
|
||||
@end
|
||||
|
||||
@implementation PlayFileViewController
|
||||
@synthesize audioFile;
|
||||
@synthesize audioPlot;
|
||||
@synthesize eof = _eof;
|
||||
@synthesize framePositionSlider;
|
||||
|
||||
#pragma mark - Initialization
|
||||
-(id)init {
|
||||
self = [super initWithNibName:NSStringFromClass(self.class) bundle:nil];
|
||||
if(self){
|
||||
[self initializeViewController];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(id)initWithCoder:(NSCoder *)aDecoder {
|
||||
self = [super initWithNibName:NSStringFromClass(self.class) bundle:nil];
|
||||
if(self){
|
||||
[self initializeViewController];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
|
||||
self = [super initWithNibName:NSStringFromClass(self.class) bundle:nil];
|
||||
if(self){
|
||||
[self initializeViewController];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Initialize View Controller
|
||||
-(void)initializeViewController {
|
||||
}
|
||||
|
||||
#pragma mark - Customize the Audio Plot
|
||||
-(void)awakeFromNib {
|
||||
|
||||
/*
|
||||
Customizing the audio plot's look
|
||||
*/
|
||||
// Background color
|
||||
self.audioPlot.backgroundColor = [NSColor colorWithCalibratedRed: 0.175 green: 0.151 blue: 0.137 alpha: 1];
|
||||
// Waveform color
|
||||
self.audioPlot.color = [NSColor colorWithCalibratedRed: 1.000 green: 1.000 blue: 1.000 alpha: 1];
|
||||
// Plot type
|
||||
self.audioPlot.plotType = EZPlotTypeBuffer;
|
||||
// Fill
|
||||
self.audioPlot.shouldFill = YES;
|
||||
// Mirror
|
||||
self.audioPlot.shouldMirror = YES;
|
||||
|
||||
/*
|
||||
Try opening the sample file
|
||||
*/
|
||||
[self openFileWithFilePathURL:[NSURL fileURLWithPath:kAudioFileDefault]];
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
/*
|
||||
Customizing the audio plot's look
|
||||
*/
|
||||
self.audioPlotLeft.backgroundColor = [NSColor colorWithCalibratedRed:0.0 green:0.0 blue:0.0 alpha:0.0];
|
||||
self.audioPlotLeft.color = [NSColor colorWithCalibratedRed: 0.255 green: 0.608 blue: 0.976 alpha: 1];
|
||||
self.audioPlotLeft.plotType = EZPlotTypeBuffer;
|
||||
self.audioPlotLeft.shouldFill = YES;
|
||||
self.audioPlotLeft.shouldMirror = YES;
|
||||
self.audioPlotRight.backgroundColor = [NSColor colorWithCalibratedRed:0.0 green:0.0 blue:0.0 alpha:0.0];
|
||||
self.audioPlotRight.color = [NSColor colorWithCalibratedRed: 0.255 green: 0.608 blue: 0.976 alpha: 1];
|
||||
self.audioPlotRight.plotType = EZPlotTypeBuffer;
|
||||
self.audioPlotRight.shouldFill = YES;
|
||||
self.audioPlotRight.shouldMirror = YES;
|
||||
|
||||
/**
|
||||
Setup an output
|
||||
*/
|
||||
self.output = [EZOutput outputWithDataSource:self];
|
||||
|
||||
/*
|
||||
Try opening the sample file
|
||||
*/
|
||||
[self openFileWithFilePathURL:[NSURL fileURLWithPath:kAudioFileDefault]];
|
||||
}
|
||||
|
||||
#pragma mark - Actions
|
||||
-(void)changePlotType:(id)sender {
|
||||
NSInteger selectedSegment = [sender selectedSegment];
|
||||
switch(selectedSegment){
|
||||
case 0:
|
||||
[self drawBufferPlot];
|
||||
break;
|
||||
case 1:
|
||||
[self drawRollingPlot];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
-(void)changePlotType:(id)sender
|
||||
{
|
||||
NSInteger selectedSegment = [sender selectedSegment];
|
||||
switch (selectedSegment)
|
||||
{
|
||||
case 0:
|
||||
[self drawBufferPlot];
|
||||
break;
|
||||
case 1:
|
||||
[self drawRollingPlot];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
-(void)changeOutputSamplingFrequency:(id)sender
|
||||
{
|
||||
AudioStreamBasicDescription asbd = [EZOutput sharedOutput].audioStreamBasicDescription;
|
||||
float samplingFrequency = ((NSSlider *)sender).floatValue;
|
||||
asbd.mSampleRate = samplingFrequency;
|
||||
[[EZOutput sharedOutput] setAudioStreamBasicDescription:asbd];
|
||||
AudioStreamBasicDescription asbd = self.output.audioStreamBasicDescription;
|
||||
float samplingFrequency = [sender floatValue];
|
||||
asbd.mSampleRate = samplingFrequency;
|
||||
self.output.audioStreamBasicDescription = asbd;
|
||||
}
|
||||
|
||||
-(void)openFile:(id)sender {
|
||||
NSOpenPanel* openDlg = [NSOpenPanel openPanel];
|
||||
openDlg.canChooseFiles = YES;
|
||||
openDlg.canChooseDirectories = NO;
|
||||
openDlg.delegate = self;
|
||||
if( [openDlg runModal] == NSOKButton ){
|
||||
NSArray *selectedFiles = [openDlg URLs];
|
||||
[self openFileWithFilePathURL:selectedFiles.firstObject];
|
||||
}
|
||||
}
|
||||
|
||||
-(void)play:(id)sender {
|
||||
if( ![[EZOutput sharedOutput] isPlaying] ){
|
||||
if( self.eof ){
|
||||
[self.audioFile seekToFrame:0];
|
||||
-(void)openFile:(id)sender
|
||||
{
|
||||
NSOpenPanel *openDlg = [NSOpenPanel openPanel];
|
||||
openDlg.canChooseFiles = YES;
|
||||
openDlg.canChooseDirectories = NO;
|
||||
openDlg.delegate = self;
|
||||
if( [openDlg runModal] == NSOKButton )
|
||||
{
|
||||
NSArray *selectedFiles = [openDlg URLs];
|
||||
[self openFileWithFilePathURL:selectedFiles.firstObject];
|
||||
NSLog(@"selected files: %@", selectedFiles);
|
||||
}
|
||||
if( self.audioPlot.plotType == EZPlotTypeBuffer &&
|
||||
self.audioPlot.shouldFill == YES ){
|
||||
self.audioPlot.plotType = EZPlotTypeRolling;
|
||||
}
|
||||
[EZOutput sharedOutput].outputDataSource = self;
|
||||
[[EZOutput sharedOutput] startPlayback];
|
||||
}
|
||||
else {
|
||||
[EZOutput sharedOutput].outputDataSource = nil;
|
||||
[[EZOutput sharedOutput] stopPlayback];
|
||||
}
|
||||
}
|
||||
|
||||
-(void)seekToFrame:(id)sender {
|
||||
[self.audioFile seekToFrame:(SInt64)[(NSSlider*)sender doubleValue]];
|
||||
-(void)play:(id)sender
|
||||
{
|
||||
if( ![self.output isPlaying] )
|
||||
{
|
||||
if( self.eof )
|
||||
{
|
||||
[self.audioFile seekToFrame:0];
|
||||
}
|
||||
[self.output startPlayback];
|
||||
}
|
||||
else
|
||||
{
|
||||
[self.output stopPlayback];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)seekToFrame:(id)sender
|
||||
{
|
||||
SInt64 frame = [sender integerValue];
|
||||
[self.audioFile seekToFrame:frame];
|
||||
}
|
||||
|
||||
#pragma mark - Action Extensions
|
||||
/*
|
||||
Give the visualization of the current buffer (this is almost exactly the openFrameworks audio input example)
|
||||
*/
|
||||
-(void)drawBufferPlot {
|
||||
// Change the plot type to the buffer plot
|
||||
self.audioPlot.plotType = EZPlotTypeBuffer;
|
||||
// Don't fill
|
||||
self.audioPlot.shouldFill = NO;
|
||||
// Don't mirror over the x-axis
|
||||
self.audioPlot.shouldMirror = NO;
|
||||
- (void)drawBufferPlot
|
||||
{
|
||||
self.audioPlotLeft.plotType = EZPlotTypeBuffer;
|
||||
self.audioPlotLeft.shouldFill = NO;
|
||||
self.audioPlotLeft.shouldMirror = NO;
|
||||
self.audioPlotRight.plotType = EZPlotTypeBuffer;
|
||||
self.audioPlotRight.shouldFill = NO;
|
||||
self.audioPlotRight.shouldMirror = NO;
|
||||
}
|
||||
|
||||
/*
|
||||
Give the classic mirrored, rolling waveform look
|
||||
*/
|
||||
-(void)drawRollingPlot {
|
||||
// Change the plot type to the rolling plot
|
||||
self.audioPlot.plotType = EZPlotTypeRolling;
|
||||
// Fill the waveform
|
||||
self.audioPlot.shouldFill = YES;
|
||||
// Mirror over the x-axis
|
||||
self.audioPlot.shouldMirror = YES;
|
||||
- (void)drawRollingPlot
|
||||
{
|
||||
self.audioPlotLeft.plotType = EZPlotTypeRolling;
|
||||
self.audioPlotLeft.shouldFill = YES;
|
||||
self.audioPlotLeft.shouldMirror = YES;
|
||||
self.audioPlotRight.plotType = EZPlotTypeRolling;
|
||||
self.audioPlotRight.shouldFill = YES;
|
||||
self.audioPlotRight.shouldMirror = YES;
|
||||
}
|
||||
|
||||
-(void)openFileWithFilePathURL:(NSURL*)filePathURL {
|
||||
|
||||
// Stop playback
|
||||
[[EZOutput sharedOutput] stopPlayback];
|
||||
|
||||
self.audioFile = [EZAudioFile audioFileWithURL:filePathURL andDelegate:self];
|
||||
self.eof = NO;
|
||||
self.filePathLabel.stringValue = filePathURL.lastPathComponent;
|
||||
self.framePositionSlider.minValue = 0.0f;
|
||||
self.framePositionSlider.maxValue = (double)self.audioFile.totalFrames;
|
||||
self.playButton.state = NSOffState;
|
||||
self.plotSegmentControl.selectedSegment = 1;
|
||||
- (void)openFileWithFilePathURL:(NSURL *)filePathURL
|
||||
{
|
||||
// stop playback
|
||||
[self.output stopPlayback];
|
||||
|
||||
// Set the client format from the EZAudioFile on the output
|
||||
|
||||
#pragma mark Mess Around With Audio Stream Basic Description Here!
|
||||
self.sampleRateSlider.floatValue = self.audioFile.clientFormat.mSampleRate;
|
||||
AudioStreamBasicDescription outputASBD = self.audioFile.clientFormat;
|
||||
|
||||
[[EZOutput sharedOutput] setAudioStreamBasicDescription:[EZAudio stereoFloatInterleavedFormatWithSampleRate:44100]];
|
||||
|
||||
|
||||
// Plot the whole waveform
|
||||
self.audioPlot.plotType = EZPlotTypeBuffer;
|
||||
self.audioPlot.shouldFill = YES;
|
||||
self.audioPlot.shouldMirror = YES;
|
||||
[self.audioFile getWaveformDataWithCompletionBlock:^(float *waveformData, UInt32 length) {
|
||||
self.audioPlot.shouldFill = YES;
|
||||
self.audioPlot.shouldMirror = YES;
|
||||
[self.audioPlot updateBuffer:waveformData withBufferSize:length];
|
||||
}];
|
||||
// create a new audio file
|
||||
AudioStreamBasicDescription asbd;
|
||||
self.audioFile = [EZAudioFile audioFileWithURL:filePathURL
|
||||
delegate:self
|
||||
permission:EZAudioFilePermissionRead
|
||||
fileFormat:asbd];
|
||||
|
||||
[EZAudioUtilities printASBD:self.audioFile.fileFormat];
|
||||
|
||||
//
|
||||
self.filePathLabel.stringValue = filePathURL.lastPathComponent;
|
||||
self.framePositionSlider.minValue = 0.0;
|
||||
self.framePositionSlider.maxValue = (double)self.audioFile.totalFrames;
|
||||
self.output.audioStreamBasicDescription = self.audioFile.clientFormat;
|
||||
self.playButton.state = NSOffState;
|
||||
self.plotSegmentControl.selectedSegment = 1;
|
||||
self.sampleRateSlider.floatValue = self.audioFile.clientFormat.mSampleRate;
|
||||
|
||||
// plot the whole waveform
|
||||
self.audioPlotLeft.plotType = EZPlotTypeBuffer;
|
||||
self.audioPlotLeft.shouldFill = YES;
|
||||
self.audioPlotLeft.shouldMirror = YES;
|
||||
self.audioPlotRight.plotType = EZPlotTypeBuffer;
|
||||
self.audioPlotRight.shouldFill = YES;
|
||||
self.audioPlotRight.shouldMirror = YES;
|
||||
[self.progressIndicator startAnimation:nil];
|
||||
|
||||
//
|
||||
__weak PlayFileViewController *weakSelf = self;
|
||||
[self.audioFile getWaveformDataWithCompletionBlock:^(EZAudioFloatData *waveformData)
|
||||
{
|
||||
[weakSelf.progressIndicator stopAnimation:nil];
|
||||
[weakSelf.audioPlotLeft updateBuffer:[waveformData bufferForChannel:0]
|
||||
withBufferSize:waveformData.bufferSize];
|
||||
[weakSelf.audioPlotRight updateBuffer:[waveformData bufferForChannel:1]
|
||||
withBufferSize:waveformData.bufferSize];
|
||||
}];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - EZAudioFileDelegate
|
||||
-(void)audioFile:(EZAudioFile *)audioFile readAudio:(float **)buffer withBufferSize:(UInt32)bufferSize withNumberOfChannels:(UInt32)numberOfChannels {
|
||||
if( [EZOutput sharedOutput].isPlaying ){
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
if( self.audioPlot.plotType == EZPlotTypeBuffer &&
|
||||
self.audioPlot.shouldFill == YES &&
|
||||
self.audioPlot.shouldMirror == YES ){
|
||||
self.audioPlot.shouldFill = NO;
|
||||
self.audioPlot.shouldMirror = NO;
|
||||
}
|
||||
[self.audioPlot updateBuffer:buffer[0] withBufferSize:bufferSize];
|
||||
});
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
- (void)audioFile:(EZAudioFile *)audioFile
|
||||
readAudio:(float **)buffer
|
||||
withBufferSize:(UInt32)bufferSize
|
||||
withNumberOfChannels:(UInt32)numberOfChannels
|
||||
{
|
||||
if( self.output.isPlaying )
|
||||
{
|
||||
__weak PlayFileViewController *weakSelf = self;
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[weakSelf.audioPlotLeft updateBuffer:buffer[0]
|
||||
withBufferSize:bufferSize];
|
||||
[weakSelf.audioPlotRight updateBuffer:buffer[1]
|
||||
withBufferSize:bufferSize];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
-(void)audioFile:(EZAudioFile *)audioFile
|
||||
updatedPosition:(SInt64)framePosition {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
if( ![self.framePositionSlider.cell isHighlighted] ){
|
||||
self.framePositionSlider.floatValue = (float)framePosition;
|
||||
}
|
||||
});
|
||||
updatedPosition:(SInt64)framePosition
|
||||
{
|
||||
__weak typeof (self) weakSelf = self;
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
if (![weakSelf.framePositionSlider.cell isHighlighted])
|
||||
{
|
||||
weakSelf.framePositionSlider.floatValue = (float)framePosition;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - EZOutputDataSource
|
||||
//------------------------------------------------------------------------------
|
||||
-(void) output:(EZOutput *)output
|
||||
shouldFillAudioBufferList:(AudioBufferList *)audioBufferList
|
||||
withNumberOfFrames:(UInt32)frames
|
||||
{
|
||||
if( self.audioFile )
|
||||
{
|
||||
UInt32 bufferSize;
|
||||
[self.audioFile readFrames:frames
|
||||
audioBufferList:audioBufferList
|
||||
bufferSize:&bufferSize
|
||||
eof:&_eof];
|
||||
if( _eof )
|
||||
if( self.audioFile )
|
||||
{
|
||||
[self seekToFrame:0];
|
||||
UInt32 bufferSize;
|
||||
[self.audioFile readFrames:frames
|
||||
audioBufferList:audioBufferList
|
||||
bufferSize:&bufferSize
|
||||
eof:&_eof];
|
||||
if( _eof )
|
||||
{
|
||||
[self seekToFrame:0];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - NSOpenSavePanelDelegate
|
||||
//------------------------------------------------------------------------------
|
||||
/**
|
||||
Here's an example how to filter the open panel to only show the supported file types by the EZAudioFile (which are just the audio file types supported by Core Audio).
|
||||
*/
|
||||
-(BOOL)panel:(id)sender shouldShowFilename:(NSString *)filename {
|
||||
NSString* ext = [filename pathExtension];
|
||||
if ([ext isEqualToString:@""] || [ext isEqualToString:@"/"] || ext == nil || ext == NULL || [ext length] < 1) {
|
||||
return YES;
|
||||
}
|
||||
NSArray *fileTypes = [EZAudioFile supportedAudioFileTypes];
|
||||
NSEnumerator* tagEnumerator = [fileTypes objectEnumerator];
|
||||
NSString* allowedExt;
|
||||
while ((allowedExt = [tagEnumerator nextObject]))
|
||||
{
|
||||
if ([ext caseInsensitiveCompare:allowedExt] == NSOrderedSame)
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
}
|
||||
return NO;
|
||||
- (BOOL)panel:(id)sender shouldShowFilename:(NSString *)filename
|
||||
{
|
||||
NSString *ext = [filename pathExtension];
|
||||
NSArray *fileTypes = [EZAudioFile supportedAudioFileTypes];
|
||||
BOOL isDirectory = [ext isEqualToString:@""];
|
||||
return [fileTypes containsObject:ext] || isDirectory;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@end
|
||||
|
||||
+60
-41
@@ -1,17 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="6250" systemVersion="14A389" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="7702" systemVersion="14C109" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<dependencies>
|
||||
<deployment version="1070" identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="6250"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="7702"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<customObject id="-2" userLabel="File's Owner" customClass="PlayFileViewController">
|
||||
<connections>
|
||||
<outlet property="audioPlot" destination="Lz1-Gs-1lD" id="V5w-yH-ZVR"/>
|
||||
<outlet property="audioPlotLeft" destination="Lz1-Gs-1lD" id="3gY-At-3ZY"/>
|
||||
<outlet property="filePathLabel" destination="0eT-7c-7fJ" id="IGv-mA-5Hw"/>
|
||||
<outlet property="framePositionSlider" destination="CFP-v0-TzQ" id="3oy-Xn-4JK"/>
|
||||
<outlet property="playButton" destination="OQp-Lr-dlS" id="K5R-Qg-7DY"/>
|
||||
<outlet property="plotSegmentControl" destination="bZW-tA-C61" id="4ic-Ou-qh2"/>
|
||||
<outlet property="progressIndicator" destination="ASF-7j-bsr" id="n2Y-ej-m4e"/>
|
||||
<outlet property="sampleRateSlider" destination="rRH-oS-VV3" id="8ij-Ff-CZK"/>
|
||||
<outlet property="view" destination="Xpo-HP-Ost" id="zlj-bW-4iz"/>
|
||||
</connections>
|
||||
@@ -19,18 +20,11 @@
|
||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||
<customView id="Xpo-HP-Ost">
|
||||
<rect key="frame" x="0.0" y="0.0" width="480" height="272"/>
|
||||
<rect key="frame" x="0.0" y="5" width="480" height="420"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<subviews>
|
||||
<customView misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Lz1-Gs-1lD" customClass="EZAudioPlotGL">
|
||||
<rect key="frame" x="0.0" y="0.0" width="480" height="148"/>
|
||||
</customView>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="2Ma-jj-U3z">
|
||||
<rect key="frame" x="14" y="224" width="125" height="32"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="21" id="Lm5-0d-A72"/>
|
||||
<constraint firstAttribute="width" constant="113" id="Tij-5V-y1Q"/>
|
||||
</constraints>
|
||||
<rect key="frame" x="14" y="372" width="125" height="32"/>
|
||||
<buttonCell key="cell" type="push" title="Choose File..." bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="KLq-bf-Xkh">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
@@ -40,7 +34,7 @@
|
||||
</connections>
|
||||
</button>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="0eT-7c-7fJ">
|
||||
<rect key="frame" x="141" y="235" width="38" height="17"/>
|
||||
<rect key="frame" x="141" y="383" width="38" height="17"/>
|
||||
<textFieldCell key="cell" lineBreakMode="truncatingMiddle" sendsActionOnEndEditing="YES" title="Label" id="vXQ-HF-vLX">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
@@ -48,11 +42,7 @@
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="OQp-Lr-dlS">
|
||||
<rect key="frame" x="14" y="191" width="125" height="32"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="21" id="geC-A9-48j"/>
|
||||
<constraint firstAttribute="width" constant="113" id="lc3-4H-QK6"/>
|
||||
</constraints>
|
||||
<rect key="frame" x="14" y="339" width="125" height="32"/>
|
||||
<buttonCell key="cell" type="push" title="Play" alternateTitle="Pause" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="Z2A-7U-sb6">
|
||||
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
@@ -61,8 +51,8 @@
|
||||
<action selector="play:" target="-2" id="y83-JF-y4e"/>
|
||||
</connections>
|
||||
</button>
|
||||
<segmentedControl verticalHuggingPriority="750" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="bZW-tA-C61">
|
||||
<rect key="frame" x="333" y="196" width="129" height="24"/>
|
||||
<segmentedControl verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="bZW-tA-C61">
|
||||
<rect key="frame" x="335" y="344" width="127" height="24"/>
|
||||
<segmentedCell key="cell" borderStyle="border" alignment="left" style="rounded" trackingMode="selectOne" id="8U1-ER-vPJ">
|
||||
<font key="font" metaFont="system"/>
|
||||
<segments>
|
||||
@@ -74,39 +64,68 @@
|
||||
<action selector="changePlotType:" target="-2" id="alU-Rf-22L"/>
|
||||
</connections>
|
||||
</segmentedControl>
|
||||
<slider verticalHuggingPriority="750" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="CFP-v0-TzQ">
|
||||
<rect key="frame" x="18" y="159" width="444" height="20"/>
|
||||
<sliderCell key="cell" alignment="left" maxValue="100" doubleValue="9.3380614657210401" tickMarkPosition="above" sliderType="linear" id="gPc-pN-dmP"/>
|
||||
<slider verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="CFP-v0-TzQ">
|
||||
<rect key="frame" x="18" y="307" width="444" height="20"/>
|
||||
<sliderCell key="cell" continuous="YES" alignment="left" maxValue="100" doubleValue="9.3380614657210401" tickMarkPosition="above" sliderType="linear" id="gPc-pN-dmP"/>
|
||||
<connections>
|
||||
<action selector="seekToFrame:" target="-2" id="iVY-so-6X2"/>
|
||||
</connections>
|
||||
</slider>
|
||||
<slider verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="rRH-oS-VV3">
|
||||
<rect key="frame" x="141" y="199" width="96" height="20"/>
|
||||
<slider verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="rRH-oS-VV3">
|
||||
<rect key="frame" x="141" y="347" width="96" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="92" id="d7e-sB-A5i"/>
|
||||
</constraints>
|
||||
<sliderCell key="cell" state="on" alignment="left" minValue="8000" maxValue="88200" doubleValue="44100" tickMarkPosition="above" sliderType="linear" id="xbX-Ce-da5"/>
|
||||
<connections>
|
||||
<action selector="changeOutputSamplingFrequency:" target="-2" id="yWM-Ei-ztA"/>
|
||||
</connections>
|
||||
</slider>
|
||||
<customView translatesAutoresizingMaskIntoConstraints="NO" id="kKR-UQ-0CX" userLabel="Plots Container">
|
||||
<rect key="frame" x="0.0" y="0.0" width="480" height="308"/>
|
||||
<subviews>
|
||||
<customView translatesAutoresizingMaskIntoConstraints="NO" id="Lz1-Gs-1lD" customClass="EZAudioPlot">
|
||||
<rect key="frame" x="20" y="12" width="440" height="284"/>
|
||||
<subviews>
|
||||
<progressIndicator horizontalHuggingPriority="750" verticalHuggingPriority="750" misplaced="YES" maxValue="100" displayedWhenStopped="NO" bezeled="NO" indeterminate="YES" style="spinning" translatesAutoresizingMaskIntoConstraints="NO" id="ASF-7j-bsr">
|
||||
<rect key="frame" x="204" y="194" width="32" height="32"/>
|
||||
</progressIndicator>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="ASF-7j-bsr" firstAttribute="centerY" secondItem="Lz1-Gs-1lD" secondAttribute="centerY" id="Q5M-Xr-1jo"/>
|
||||
<constraint firstItem="ASF-7j-bsr" firstAttribute="centerX" secondItem="Lz1-Gs-1lD" secondAttribute="centerX" id="tqb-7Y-xY2"/>
|
||||
</constraints>
|
||||
</customView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="Lz1-Gs-1lD" secondAttribute="trailing" constant="20" symbolic="YES" id="Q4k-cK-ckj"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Lz1-Gs-1lD" secondAttribute="bottom" constant="12" id="V63-Mt-zyk"/>
|
||||
<constraint firstItem="Lz1-Gs-1lD" firstAttribute="leading" secondItem="kKR-UQ-0CX" secondAttribute="leading" constant="20" symbolic="YES" id="xGM-aA-IPe"/>
|
||||
<constraint firstItem="Lz1-Gs-1lD" firstAttribute="top" secondItem="kKR-UQ-0CX" secondAttribute="top" constant="12" id="yIJ-ko-mkg"/>
|
||||
</constraints>
|
||||
</customView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="CFP-v0-TzQ" firstAttribute="top" secondItem="OQp-Lr-dlS" secondAttribute="bottom" constant="20" id="6uf-rh-zEf"/>
|
||||
<constraint firstItem="0eT-7c-7fJ" firstAttribute="leading" secondItem="2Ma-jj-U3z" secondAttribute="trailing" constant="10" id="AcA-Rv-Lwl"/>
|
||||
<constraint firstItem="Lz1-Gs-1lD" firstAttribute="top" secondItem="CFP-v0-TzQ" secondAttribute="bottom" constant="13" id="JjU-ri-rxV"/>
|
||||
<constraint firstItem="0eT-7c-7fJ" firstAttribute="top" secondItem="Xpo-HP-Ost" secondAttribute="top" constant="20" id="T86-Jj-i0N"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Lz1-Gs-1lD" secondAttribute="bottom" id="U2b-77-5uo"/>
|
||||
<constraint firstAttribute="trailing" secondItem="bZW-tA-C61" secondAttribute="trailing" constant="20" id="UGO-OL-Dmk"/>
|
||||
<constraint firstAttribute="trailing" secondItem="CFP-v0-TzQ" secondAttribute="trailing" constant="20" id="UpE-fD-Skp"/>
|
||||
<constraint firstItem="2Ma-jj-U3z" firstAttribute="top" secondItem="Xpo-HP-Ost" secondAttribute="top" constant="20" id="a1a-7J-lzc"/>
|
||||
<constraint firstItem="Lz1-Gs-1lD" firstAttribute="leading" secondItem="Xpo-HP-Ost" secondAttribute="leading" id="bZz-am-fqe"/>
|
||||
<constraint firstItem="2Ma-jj-U3z" firstAttribute="leading" secondItem="Xpo-HP-Ost" secondAttribute="leading" constant="20" id="dc1-KX-H5W"/>
|
||||
<constraint firstItem="OQp-Lr-dlS" firstAttribute="leading" secondItem="Xpo-HP-Ost" secondAttribute="leading" constant="20" id="g5e-2M-sHn"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Lz1-Gs-1lD" secondAttribute="trailing" id="jDC-Iz-9c4"/>
|
||||
<constraint firstItem="bZW-tA-C61" firstAttribute="top" secondItem="0eT-7c-7fJ" secondAttribute="bottom" constant="16" id="ll5-1d-SaQ"/>
|
||||
<constraint firstItem="CFP-v0-TzQ" firstAttribute="leading" secondItem="Xpo-HP-Ost" secondAttribute="leading" constant="20" id="qhq-Io-tdF"/>
|
||||
<constraint firstItem="Lz1-Gs-1lD" firstAttribute="leading" secondItem="Xpo-HP-Ost" secondAttribute="leading" id="xtr-M9-Uot"/>
|
||||
<constraint firstItem="OQp-Lr-dlS" firstAttribute="top" secondItem="2Ma-jj-U3z" secondAttribute="bottom" constant="12" id="yGn-40-QqT"/>
|
||||
<constraint firstItem="kKR-UQ-0CX" firstAttribute="top" secondItem="CFP-v0-TzQ" secondAttribute="bottom" constant="1" id="2Yw-mb-sEW"/>
|
||||
<constraint firstItem="2Ma-jj-U3z" firstAttribute="top" secondItem="Xpo-HP-Ost" secondAttribute="top" constant="20" symbolic="YES" id="3cM-aR-P60"/>
|
||||
<constraint firstItem="kKR-UQ-0CX" firstAttribute="leading" secondItem="Xpo-HP-Ost" secondAttribute="leading" id="5Ml-yr-Seg"/>
|
||||
<constraint firstItem="bZW-tA-C61" firstAttribute="trailing" secondItem="CFP-v0-TzQ" secondAttribute="trailing" id="7UZ-Xm-enk"/>
|
||||
<constraint firstItem="OQp-Lr-dlS" firstAttribute="baseline" secondItem="rRH-oS-VV3" secondAttribute="baseline" id="93I-ij-mJW"/>
|
||||
<constraint firstItem="OQp-Lr-dlS" firstAttribute="top" secondItem="bZW-tA-C61" secondAttribute="top" id="Bzk-dF-HFV"/>
|
||||
<constraint firstItem="OQp-Lr-dlS" firstAttribute="top" secondItem="2Ma-jj-U3z" secondAttribute="bottom" constant="12" symbolic="YES" id="Ei1-u5-SHk"/>
|
||||
<constraint firstItem="0eT-7c-7fJ" firstAttribute="leading" secondItem="2Ma-jj-U3z" secondAttribute="trailing" constant="10" id="Jdq-ug-sk1"/>
|
||||
<constraint firstItem="kKR-UQ-0CX" firstAttribute="centerX" secondItem="CFP-v0-TzQ" secondAttribute="centerX" id="TCO-pi-coH"/>
|
||||
<constraint firstItem="2Ma-jj-U3z" firstAttribute="leading" secondItem="Xpo-HP-Ost" secondAttribute="leading" constant="20" symbolic="YES" id="TDN-13-ylu"/>
|
||||
<constraint firstItem="0eT-7c-7fJ" firstAttribute="top" secondItem="2Ma-jj-U3z" secondAttribute="top" id="WAO-JW-s3G"/>
|
||||
<constraint firstItem="2Ma-jj-U3z" firstAttribute="trailing" secondItem="OQp-Lr-dlS" secondAttribute="trailing" id="ZGH-92-tnO"/>
|
||||
<constraint firstAttribute="bottom" secondItem="kKR-UQ-0CX" secondAttribute="bottom" id="ZHv-uA-8OA"/>
|
||||
<constraint firstItem="CFP-v0-TzQ" firstAttribute="top" secondItem="OQp-Lr-dlS" secondAttribute="bottom" constant="21" id="a8i-2K-OW7"/>
|
||||
<constraint firstAttribute="trailing" secondItem="bZW-tA-C61" secondAttribute="trailing" constant="20" symbolic="YES" id="fVa-zq-bD0"/>
|
||||
<constraint firstItem="OQp-Lr-dlS" firstAttribute="leading" secondItem="2Ma-jj-U3z" secondAttribute="leading" id="hcU-3T-xVM"/>
|
||||
<constraint firstItem="0eT-7c-7fJ" firstAttribute="leading" secondItem="rRH-oS-VV3" secondAttribute="leading" id="l3q-6O-HVo"/>
|
||||
<constraint firstItem="OQp-Lr-dlS" firstAttribute="leading" secondItem="CFP-v0-TzQ" secondAttribute="leading" id="wm2-4I-O7o"/>
|
||||
</constraints>
|
||||
<point key="canvasLocation" x="319" y="367"/>
|
||||
</customView>
|
||||
</objects>
|
||||
</document>
|
||||
|
||||
+121
-91
@@ -7,6 +7,24 @@
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
66FC0B3C1B3105FB005CF3D7 /* EZAudio.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B1A1B3105FB005CF3D7 /* EZAudio.m */; };
|
||||
66FC0B3D1B3105FB005CF3D7 /* EZAudioDevice.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B1C1B3105FB005CF3D7 /* EZAudioDevice.m */; };
|
||||
66FC0B3E1B3105FB005CF3D7 /* EZAudioDisplayLink.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B1E1B3105FB005CF3D7 /* EZAudioDisplayLink.m */; };
|
||||
66FC0B3F1B3105FB005CF3D7 /* EZAudioFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B201B3105FB005CF3D7 /* EZAudioFile.m */; };
|
||||
66FC0B401B3105FB005CF3D7 /* EZAudioFloatConverter.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B221B3105FB005CF3D7 /* EZAudioFloatConverter.m */; };
|
||||
66FC0B411B3105FB005CF3D7 /* EZAudioFloatData.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B241B3105FB005CF3D7 /* EZAudioFloatData.m */; };
|
||||
66FC0B421B3105FB005CF3D7 /* EZAudioPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B261B3105FB005CF3D7 /* EZAudioPlayer.m */; };
|
||||
66FC0B431B3105FB005CF3D7 /* EZAudioPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B281B3105FB005CF3D7 /* EZAudioPlot.m */; };
|
||||
66FC0B441B3105FB005CF3D7 /* EZAudioPlotGL.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B2A1B3105FB005CF3D7 /* EZAudioPlotGL.m */; };
|
||||
66FC0B451B3105FB005CF3D7 /* EZAudioPlotGLKViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B2C1B3105FB005CF3D7 /* EZAudioPlotGLKViewController.m */; };
|
||||
66FC0B461B3105FB005CF3D7 /* EZAudioUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B2E1B3105FB005CF3D7 /* EZAudioUtilities.m */; };
|
||||
66FC0B471B3105FB005CF3D7 /* EZMicrophone.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B301B3105FB005CF3D7 /* EZMicrophone.m */; };
|
||||
66FC0B481B3105FB005CF3D7 /* EZOutput.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B321B3105FB005CF3D7 /* EZOutput.m */; };
|
||||
66FC0B491B3105FB005CF3D7 /* EZPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B341B3105FB005CF3D7 /* EZPlot.m */; };
|
||||
66FC0B4A1B3105FB005CF3D7 /* EZRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B361B3105FB005CF3D7 /* EZRecorder.m */; };
|
||||
66FC0B4B1B3105FB005CF3D7 /* TPCircularBuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B371B3105FB005CF3D7 /* TPCircularBuffer.c */; };
|
||||
66FC0B4C1B3105FB005CF3D7 /* CHANGELOG in Resources */ = {isa = PBXBuildFile; fileRef = 66FC0B3A1B3105FB005CF3D7 /* CHANGELOG */; };
|
||||
66FC0B4D1B3105FB005CF3D7 /* VERSION in Resources */ = {isa = PBXBuildFile; fileRef = 66FC0B3B1B3105FB005CF3D7 /* VERSION */; };
|
||||
94056E0D185BB3D800EB94BA /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94056E0C185BB3D800EB94BA /* Cocoa.framework */; };
|
||||
94056E17185BB3D800EB94BA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 94056E15185BB3D800EB94BA /* InfoPlist.strings */; };
|
||||
94056E19185BB3D800EB94BA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 94056E18185BB3D800EB94BA /* main.m */; };
|
||||
@@ -26,19 +44,6 @@
|
||||
94056E70185BB42100EB94BA /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94056E6F185BB42100EB94BA /* QuartzCore.framework */; };
|
||||
94056E74185BB44200EB94BA /* RecordViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 94056E72185BB44200EB94BA /* RecordViewController.m */; };
|
||||
94056E75185BB44200EB94BA /* RecordViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 94056E73185BB44200EB94BA /* RecordViewController.xib */; };
|
||||
9417A7651867DD3F00D9D37B /* AEFloatConverter.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A74D1867DD3F00D9D37B /* AEFloatConverter.m */; };
|
||||
9417A7661867DD3F00D9D37B /* EZAudio.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A74F1867DD3F00D9D37B /* EZAudio.m */; };
|
||||
9417A7671867DD3F00D9D37B /* EZAudioFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7511867DD3F00D9D37B /* EZAudioFile.m */; };
|
||||
9417A7681867DD3F00D9D37B /* EZAudioPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7531867DD3F00D9D37B /* EZAudioPlot.m */; };
|
||||
9417A7691867DD3F00D9D37B /* EZAudioPlotGL.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7551867DD3F00D9D37B /* EZAudioPlotGL.m */; };
|
||||
9417A76A1867DD3F00D9D37B /* EZAudioPlotGLKViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7571867DD3F00D9D37B /* EZAudioPlotGLKViewController.m */; };
|
||||
9417A76B1867DD3F00D9D37B /* EZMicrophone.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7591867DD3F00D9D37B /* EZMicrophone.m */; };
|
||||
9417A76C1867DD3F00D9D37B /* EZOutput.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A75B1867DD3F00D9D37B /* EZOutput.m */; };
|
||||
9417A76D1867DD3F00D9D37B /* EZPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A75D1867DD3F00D9D37B /* EZPlot.m */; };
|
||||
9417A76E1867DD3F00D9D37B /* EZRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A75F1867DD3F00D9D37B /* EZRecorder.m */; };
|
||||
9417A76F1867DD3F00D9D37B /* TPCircularBuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7601867DD3F00D9D37B /* TPCircularBuffer.c */; };
|
||||
9417A7701867DD3F00D9D37B /* CHANGELOG in Resources */ = {isa = PBXBuildFile; fileRef = 9417A7631867DD3F00D9D37B /* CHANGELOG */; };
|
||||
9417A7711867DD3F00D9D37B /* VERSION in Resources */ = {isa = PBXBuildFile; fileRef = 9417A7641867DD3F00D9D37B /* VERSION */; };
|
||||
941D71AA186298AA007D52D8 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 941D71A9186298AA007D52D8 /* AVFoundation.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
@@ -53,6 +58,40 @@
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
66FC0B191B3105FB005CF3D7 /* EZAudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudio.h; sourceTree = "<group>"; };
|
||||
66FC0B1A1B3105FB005CF3D7 /* EZAudio.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudio.m; sourceTree = "<group>"; };
|
||||
66FC0B1B1B3105FB005CF3D7 /* EZAudioDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioDevice.h; sourceTree = "<group>"; };
|
||||
66FC0B1C1B3105FB005CF3D7 /* EZAudioDevice.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioDevice.m; sourceTree = "<group>"; };
|
||||
66FC0B1D1B3105FB005CF3D7 /* EZAudioDisplayLink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioDisplayLink.h; sourceTree = "<group>"; };
|
||||
66FC0B1E1B3105FB005CF3D7 /* EZAudioDisplayLink.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioDisplayLink.m; sourceTree = "<group>"; };
|
||||
66FC0B1F1B3105FB005CF3D7 /* EZAudioFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioFile.h; sourceTree = "<group>"; };
|
||||
66FC0B201B3105FB005CF3D7 /* EZAudioFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioFile.m; sourceTree = "<group>"; };
|
||||
66FC0B211B3105FB005CF3D7 /* EZAudioFloatConverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioFloatConverter.h; sourceTree = "<group>"; };
|
||||
66FC0B221B3105FB005CF3D7 /* EZAudioFloatConverter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioFloatConverter.m; sourceTree = "<group>"; };
|
||||
66FC0B231B3105FB005CF3D7 /* EZAudioFloatData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioFloatData.h; sourceTree = "<group>"; };
|
||||
66FC0B241B3105FB005CF3D7 /* EZAudioFloatData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioFloatData.m; sourceTree = "<group>"; };
|
||||
66FC0B251B3105FB005CF3D7 /* EZAudioPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlayer.h; sourceTree = "<group>"; };
|
||||
66FC0B261B3105FB005CF3D7 /* EZAudioPlayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlayer.m; sourceTree = "<group>"; };
|
||||
66FC0B271B3105FB005CF3D7 /* EZAudioPlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlot.h; sourceTree = "<group>"; };
|
||||
66FC0B281B3105FB005CF3D7 /* EZAudioPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlot.m; sourceTree = "<group>"; };
|
||||
66FC0B291B3105FB005CF3D7 /* EZAudioPlotGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGL.h; sourceTree = "<group>"; };
|
||||
66FC0B2A1B3105FB005CF3D7 /* EZAudioPlotGL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGL.m; sourceTree = "<group>"; };
|
||||
66FC0B2B1B3105FB005CF3D7 /* EZAudioPlotGLKViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGLKViewController.h; sourceTree = "<group>"; };
|
||||
66FC0B2C1B3105FB005CF3D7 /* EZAudioPlotGLKViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGLKViewController.m; sourceTree = "<group>"; };
|
||||
66FC0B2D1B3105FB005CF3D7 /* EZAudioUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioUtilities.h; sourceTree = "<group>"; };
|
||||
66FC0B2E1B3105FB005CF3D7 /* EZAudioUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioUtilities.m; sourceTree = "<group>"; };
|
||||
66FC0B2F1B3105FB005CF3D7 /* EZMicrophone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZMicrophone.h; sourceTree = "<group>"; };
|
||||
66FC0B301B3105FB005CF3D7 /* EZMicrophone.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZMicrophone.m; sourceTree = "<group>"; };
|
||||
66FC0B311B3105FB005CF3D7 /* EZOutput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZOutput.h; sourceTree = "<group>"; };
|
||||
66FC0B321B3105FB005CF3D7 /* EZOutput.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZOutput.m; sourceTree = "<group>"; };
|
||||
66FC0B331B3105FB005CF3D7 /* EZPlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZPlot.h; sourceTree = "<group>"; };
|
||||
66FC0B341B3105FB005CF3D7 /* EZPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZPlot.m; sourceTree = "<group>"; };
|
||||
66FC0B351B3105FB005CF3D7 /* EZRecorder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZRecorder.h; sourceTree = "<group>"; };
|
||||
66FC0B361B3105FB005CF3D7 /* EZRecorder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZRecorder.m; sourceTree = "<group>"; };
|
||||
66FC0B371B3105FB005CF3D7 /* TPCircularBuffer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = TPCircularBuffer.c; sourceTree = "<group>"; };
|
||||
66FC0B381B3105FB005CF3D7 /* TPCircularBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TPCircularBuffer.h; sourceTree = "<group>"; };
|
||||
66FC0B3A1B3105FB005CF3D7 /* CHANGELOG */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CHANGELOG; sourceTree = "<group>"; };
|
||||
66FC0B3B1B3105FB005CF3D7 /* VERSION */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VERSION; sourceTree = "<group>"; };
|
||||
94056E09185BB3D800EB94BA /* EZAudioRecordExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = EZAudioRecordExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
94056E0C185BB3D800EB94BA /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
|
||||
94056E0F185BB3D800EB94BA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
|
||||
@@ -81,30 +120,6 @@
|
||||
94056E71185BB44200EB94BA /* RecordViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RecordViewController.h; sourceTree = "<group>"; };
|
||||
94056E72185BB44200EB94BA /* RecordViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RecordViewController.m; sourceTree = "<group>"; };
|
||||
94056E73185BB44200EB94BA /* RecordViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = RecordViewController.xib; sourceTree = "<group>"; };
|
||||
9417A74C1867DD3F00D9D37B /* AEFloatConverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AEFloatConverter.h; sourceTree = "<group>"; };
|
||||
9417A74D1867DD3F00D9D37B /* AEFloatConverter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AEFloatConverter.m; sourceTree = "<group>"; };
|
||||
9417A74E1867DD3F00D9D37B /* EZAudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudio.h; sourceTree = "<group>"; };
|
||||
9417A74F1867DD3F00D9D37B /* EZAudio.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudio.m; sourceTree = "<group>"; };
|
||||
9417A7501867DD3F00D9D37B /* EZAudioFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioFile.h; sourceTree = "<group>"; };
|
||||
9417A7511867DD3F00D9D37B /* EZAudioFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioFile.m; sourceTree = "<group>"; };
|
||||
9417A7521867DD3F00D9D37B /* EZAudioPlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlot.h; sourceTree = "<group>"; };
|
||||
9417A7531867DD3F00D9D37B /* EZAudioPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlot.m; sourceTree = "<group>"; };
|
||||
9417A7541867DD3F00D9D37B /* EZAudioPlotGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGL.h; sourceTree = "<group>"; };
|
||||
9417A7551867DD3F00D9D37B /* EZAudioPlotGL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGL.m; sourceTree = "<group>"; };
|
||||
9417A7561867DD3F00D9D37B /* EZAudioPlotGLKViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGLKViewController.h; sourceTree = "<group>"; };
|
||||
9417A7571867DD3F00D9D37B /* EZAudioPlotGLKViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGLKViewController.m; sourceTree = "<group>"; };
|
||||
9417A7581867DD3F00D9D37B /* EZMicrophone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZMicrophone.h; sourceTree = "<group>"; };
|
||||
9417A7591867DD3F00D9D37B /* EZMicrophone.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZMicrophone.m; sourceTree = "<group>"; };
|
||||
9417A75A1867DD3F00D9D37B /* EZOutput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZOutput.h; sourceTree = "<group>"; };
|
||||
9417A75B1867DD3F00D9D37B /* EZOutput.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZOutput.m; sourceTree = "<group>"; };
|
||||
9417A75C1867DD3F00D9D37B /* EZPlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZPlot.h; sourceTree = "<group>"; };
|
||||
9417A75D1867DD3F00D9D37B /* EZPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZPlot.m; sourceTree = "<group>"; };
|
||||
9417A75E1867DD3F00D9D37B /* EZRecorder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZRecorder.h; sourceTree = "<group>"; };
|
||||
9417A75F1867DD3F00D9D37B /* EZRecorder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZRecorder.m; sourceTree = "<group>"; };
|
||||
9417A7601867DD3F00D9D37B /* TPCircularBuffer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = TPCircularBuffer.c; sourceTree = "<group>"; };
|
||||
9417A7611867DD3F00D9D37B /* TPCircularBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TPCircularBuffer.h; sourceTree = "<group>"; };
|
||||
9417A7631867DD3F00D9D37B /* CHANGELOG */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CHANGELOG; sourceTree = "<group>"; };
|
||||
9417A7641867DD3F00D9D37B /* VERSION */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VERSION; sourceTree = "<group>"; };
|
||||
941D71A9186298AA007D52D8 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
@@ -136,6 +151,56 @@
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
66FC0B181B3105FB005CF3D7 /* EZAudio */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
66FC0B191B3105FB005CF3D7 /* EZAudio.h */,
|
||||
66FC0B1A1B3105FB005CF3D7 /* EZAudio.m */,
|
||||
66FC0B1B1B3105FB005CF3D7 /* EZAudioDevice.h */,
|
||||
66FC0B1C1B3105FB005CF3D7 /* EZAudioDevice.m */,
|
||||
66FC0B1D1B3105FB005CF3D7 /* EZAudioDisplayLink.h */,
|
||||
66FC0B1E1B3105FB005CF3D7 /* EZAudioDisplayLink.m */,
|
||||
66FC0B1F1B3105FB005CF3D7 /* EZAudioFile.h */,
|
||||
66FC0B201B3105FB005CF3D7 /* EZAudioFile.m */,
|
||||
66FC0B211B3105FB005CF3D7 /* EZAudioFloatConverter.h */,
|
||||
66FC0B221B3105FB005CF3D7 /* EZAudioFloatConverter.m */,
|
||||
66FC0B231B3105FB005CF3D7 /* EZAudioFloatData.h */,
|
||||
66FC0B241B3105FB005CF3D7 /* EZAudioFloatData.m */,
|
||||
66FC0B251B3105FB005CF3D7 /* EZAudioPlayer.h */,
|
||||
66FC0B261B3105FB005CF3D7 /* EZAudioPlayer.m */,
|
||||
66FC0B271B3105FB005CF3D7 /* EZAudioPlot.h */,
|
||||
66FC0B281B3105FB005CF3D7 /* EZAudioPlot.m */,
|
||||
66FC0B291B3105FB005CF3D7 /* EZAudioPlotGL.h */,
|
||||
66FC0B2A1B3105FB005CF3D7 /* EZAudioPlotGL.m */,
|
||||
66FC0B2B1B3105FB005CF3D7 /* EZAudioPlotGLKViewController.h */,
|
||||
66FC0B2C1B3105FB005CF3D7 /* EZAudioPlotGLKViewController.m */,
|
||||
66FC0B2D1B3105FB005CF3D7 /* EZAudioUtilities.h */,
|
||||
66FC0B2E1B3105FB005CF3D7 /* EZAudioUtilities.m */,
|
||||
66FC0B2F1B3105FB005CF3D7 /* EZMicrophone.h */,
|
||||
66FC0B301B3105FB005CF3D7 /* EZMicrophone.m */,
|
||||
66FC0B311B3105FB005CF3D7 /* EZOutput.h */,
|
||||
66FC0B321B3105FB005CF3D7 /* EZOutput.m */,
|
||||
66FC0B331B3105FB005CF3D7 /* EZPlot.h */,
|
||||
66FC0B341B3105FB005CF3D7 /* EZPlot.m */,
|
||||
66FC0B351B3105FB005CF3D7 /* EZRecorder.h */,
|
||||
66FC0B361B3105FB005CF3D7 /* EZRecorder.m */,
|
||||
66FC0B371B3105FB005CF3D7 /* TPCircularBuffer.c */,
|
||||
66FC0B381B3105FB005CF3D7 /* TPCircularBuffer.h */,
|
||||
66FC0B391B3105FB005CF3D7 /* VERSION */,
|
||||
);
|
||||
name = EZAudio;
|
||||
path = ../../../../EZAudio;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
66FC0B391B3105FB005CF3D7 /* VERSION */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
66FC0B3A1B3105FB005CF3D7 /* CHANGELOG */,
|
||||
66FC0B3B1B3105FB005CF3D7 /* VERSION */,
|
||||
);
|
||||
path = VERSION;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
94056E00185BB3D800EB94BA = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -185,7 +250,7 @@
|
||||
94056E12185BB3D800EB94BA /* EZAudioRecordExample */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9417A74B1867DD3F00D9D37B /* EZAudio */,
|
||||
66FC0B181B3105FB005CF3D7 /* EZAudio */,
|
||||
94056E1E185BB3D800EB94BA /* AppDelegate.h */,
|
||||
94056E1F185BB3D800EB94BA /* AppDelegate.m */,
|
||||
94056E21185BB3D800EB94BA /* MainMenu.xib */,
|
||||
@@ -228,46 +293,6 @@
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9417A74B1867DD3F00D9D37B /* EZAudio */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9417A74C1867DD3F00D9D37B /* AEFloatConverter.h */,
|
||||
9417A74D1867DD3F00D9D37B /* AEFloatConverter.m */,
|
||||
9417A74E1867DD3F00D9D37B /* EZAudio.h */,
|
||||
9417A74F1867DD3F00D9D37B /* EZAudio.m */,
|
||||
9417A7501867DD3F00D9D37B /* EZAudioFile.h */,
|
||||
9417A7511867DD3F00D9D37B /* EZAudioFile.m */,
|
||||
9417A7521867DD3F00D9D37B /* EZAudioPlot.h */,
|
||||
9417A7531867DD3F00D9D37B /* EZAudioPlot.m */,
|
||||
9417A7541867DD3F00D9D37B /* EZAudioPlotGL.h */,
|
||||
9417A7551867DD3F00D9D37B /* EZAudioPlotGL.m */,
|
||||
9417A7561867DD3F00D9D37B /* EZAudioPlotGLKViewController.h */,
|
||||
9417A7571867DD3F00D9D37B /* EZAudioPlotGLKViewController.m */,
|
||||
9417A7581867DD3F00D9D37B /* EZMicrophone.h */,
|
||||
9417A7591867DD3F00D9D37B /* EZMicrophone.m */,
|
||||
9417A75A1867DD3F00D9D37B /* EZOutput.h */,
|
||||
9417A75B1867DD3F00D9D37B /* EZOutput.m */,
|
||||
9417A75C1867DD3F00D9D37B /* EZPlot.h */,
|
||||
9417A75D1867DD3F00D9D37B /* EZPlot.m */,
|
||||
9417A75E1867DD3F00D9D37B /* EZRecorder.h */,
|
||||
9417A75F1867DD3F00D9D37B /* EZRecorder.m */,
|
||||
9417A7601867DD3F00D9D37B /* TPCircularBuffer.c */,
|
||||
9417A7611867DD3F00D9D37B /* TPCircularBuffer.h */,
|
||||
9417A7621867DD3F00D9D37B /* VERSION */,
|
||||
);
|
||||
name = EZAudio;
|
||||
path = ../../../../EZAudio;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9417A7621867DD3F00D9D37B /* VERSION */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9417A7631867DD3F00D9D37B /* CHANGELOG */,
|
||||
9417A7641867DD3F00D9D37B /* VERSION */,
|
||||
);
|
||||
path = VERSION;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
@@ -345,12 +370,12 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
94056E17185BB3D800EB94BA /* InfoPlist.strings in Resources */,
|
||||
9417A7711867DD3F00D9D37B /* VERSION in Resources */,
|
||||
66FC0B4D1B3105FB005CF3D7 /* VERSION in Resources */,
|
||||
94056E75185BB44200EB94BA /* RecordViewController.xib in Resources */,
|
||||
94056E25185BB3D800EB94BA /* Images.xcassets in Resources */,
|
||||
94056E1D185BB3D800EB94BA /* Credits.rtf in Resources */,
|
||||
94056E23185BB3D800EB94BA /* MainMenu.xib in Resources */,
|
||||
9417A7701867DD3F00D9D37B /* CHANGELOG in Resources */,
|
||||
66FC0B4C1B3105FB005CF3D7 /* CHANGELOG in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -369,20 +394,25 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
9417A76F1867DD3F00D9D37B /* TPCircularBuffer.c in Sources */,
|
||||
9417A76C1867DD3F00D9D37B /* EZOutput.m in Sources */,
|
||||
9417A76A1867DD3F00D9D37B /* EZAudioPlotGLKViewController.m in Sources */,
|
||||
66FC0B4A1B3105FB005CF3D7 /* EZRecorder.m in Sources */,
|
||||
94056E74185BB44200EB94BA /* RecordViewController.m in Sources */,
|
||||
9417A7651867DD3F00D9D37B /* AEFloatConverter.m in Sources */,
|
||||
66FC0B401B3105FB005CF3D7 /* EZAudioFloatConverter.m in Sources */,
|
||||
66FC0B411B3105FB005CF3D7 /* EZAudioFloatData.m in Sources */,
|
||||
66FC0B3C1B3105FB005CF3D7 /* EZAudio.m in Sources */,
|
||||
66FC0B3F1B3105FB005CF3D7 /* EZAudioFile.m in Sources */,
|
||||
66FC0B481B3105FB005CF3D7 /* EZOutput.m in Sources */,
|
||||
66FC0B441B3105FB005CF3D7 /* EZAudioPlotGL.m in Sources */,
|
||||
66FC0B4B1B3105FB005CF3D7 /* TPCircularBuffer.c in Sources */,
|
||||
66FC0B431B3105FB005CF3D7 /* EZAudioPlot.m in Sources */,
|
||||
94056E20185BB3D800EB94BA /* AppDelegate.m in Sources */,
|
||||
9417A7681867DD3F00D9D37B /* EZAudioPlot.m in Sources */,
|
||||
9417A7671867DD3F00D9D37B /* EZAudioFile.m in Sources */,
|
||||
9417A7691867DD3F00D9D37B /* EZAudioPlotGL.m in Sources */,
|
||||
66FC0B471B3105FB005CF3D7 /* EZMicrophone.m in Sources */,
|
||||
66FC0B421B3105FB005CF3D7 /* EZAudioPlayer.m in Sources */,
|
||||
94056E19185BB3D800EB94BA /* main.m in Sources */,
|
||||
9417A76D1867DD3F00D9D37B /* EZPlot.m in Sources */,
|
||||
9417A76B1867DD3F00D9D37B /* EZMicrophone.m in Sources */,
|
||||
9417A76E1867DD3F00D9D37B /* EZRecorder.m in Sources */,
|
||||
9417A7661867DD3F00D9D37B /* EZAudio.m in Sources */,
|
||||
66FC0B3E1B3105FB005CF3D7 /* EZAudioDisplayLink.m in Sources */,
|
||||
66FC0B491B3105FB005CF3D7 /* EZPlot.m in Sources */,
|
||||
66FC0B3D1B3105FB005CF3D7 /* EZAudioDevice.m in Sources */,
|
||||
66FC0B461B3105FB005CF3D7 /* EZAudioUtilities.m in Sources */,
|
||||
66FC0B451B3105FB005CF3D7 /* EZAudioPlotGLKViewController.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
||||
+14
-6
@@ -32,12 +32,12 @@
|
||||
#import <AVFoundation/AVFoundation.h>
|
||||
|
||||
// By default this will record a file to /Users/YOUR_USERNAME/Documents/test.caf
|
||||
#define kAudioFilePath [NSString stringWithFormat:@"%@%@",NSHomeDirectory(),@"/Documents/test.m4a"]
|
||||
#define kAudioFilePath [NSString stringWithFormat:@"%@%@",NSHomeDirectory(),@"/Documents/test.aiff"]
|
||||
|
||||
/**
|
||||
We will allow this view controller to act as an EZMicrophoneDelegate. This is how we listen for the microphone callback.
|
||||
*/
|
||||
@interface RecordViewController : NSViewController <EZMicrophoneDelegate,AVAudioPlayerDelegate>
|
||||
@interface RecordViewController : NSViewController <EZMicrophoneDelegate, EZAudioFileDelegate, AVAudioPlayerDelegate>
|
||||
|
||||
/**
|
||||
Use a OpenGL based plot to visualize the data coming in
|
||||
@@ -54,12 +54,20 @@
|
||||
*/
|
||||
@property (nonatomic,strong) EZMicrophone *microphone;
|
||||
|
||||
/**
|
||||
The recorder component
|
||||
*/
|
||||
@property (nonatomic,strong) EZRecorder *recorder;
|
||||
///**
|
||||
// The recorder component
|
||||
// */
|
||||
//@property (nonatomic,strong) EZRecorder *recorder;
|
||||
|
||||
/**
|
||||
The file being recorded to
|
||||
*/
|
||||
@property (nonatomic, strong) EZAudioFile *recordedFile;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Actions
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Stops the recorder and starts playing whatever has been recorded.
|
||||
*/
|
||||
|
||||
+69
-51
@@ -40,7 +40,6 @@
|
||||
@synthesize isRecording;
|
||||
@synthesize microphone;
|
||||
@synthesize microphoneToggle;
|
||||
@synthesize recorder;
|
||||
@synthesize recordingToggle;
|
||||
|
||||
#pragma mark - Initialization
|
||||
@@ -102,8 +101,8 @@
|
||||
}
|
||||
|
||||
#pragma mark - Actions
|
||||
-(void)playFile:(id)sender {
|
||||
|
||||
-(void)playFile:(id)sender
|
||||
{
|
||||
// Update microphone state
|
||||
[self.microphone stopFetchingAudio];
|
||||
self.microphoneToggle.state = NSOffState;
|
||||
@@ -121,11 +120,11 @@
|
||||
self.audioPlayer = nil;
|
||||
}
|
||||
|
||||
// Close the audio file
|
||||
if( self.recorder )
|
||||
{
|
||||
[self.recorder closeAudioFile];
|
||||
}
|
||||
// // Close the audio file
|
||||
// if( self.recorder )
|
||||
// {
|
||||
// [self.recorder closeAudioFile];
|
||||
// }
|
||||
|
||||
NSError *err;
|
||||
self.audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:kAudioFilePath]
|
||||
@@ -133,7 +132,6 @@
|
||||
|
||||
[self.audioPlayer play];
|
||||
self.audioPlayer.delegate = self;
|
||||
|
||||
}
|
||||
|
||||
-(void)toggleMicrophone:(id)sender {
|
||||
@@ -152,24 +150,22 @@
|
||||
-(void)toggleRecording:(id)sender
|
||||
{
|
||||
[self.playButton setHidden:NO];
|
||||
switch( [sender state] )
|
||||
{
|
||||
case NSOffState:
|
||||
[self.recorder closeAudioFile];
|
||||
break;
|
||||
|
||||
case NSOnState:
|
||||
/*
|
||||
Create the recorder
|
||||
*/
|
||||
self.recorder = [EZRecorder recorderWithDestinationURL:[NSURL fileURLWithPath:kAudioFilePath]
|
||||
sourceFormat:self.microphone.audioStreamBasicDescription
|
||||
destinationFileType:EZRecorderFileTypeM4A];
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// switch( [sender state] )
|
||||
// {
|
||||
// case NSOffState:
|
||||
//// [self.recorder closeAudioFile];
|
||||
// break;
|
||||
//
|
||||
// case NSOnState:
|
||||
// /*
|
||||
// Create the recorder
|
||||
// */
|
||||
// break;
|
||||
//
|
||||
// default:
|
||||
// break;
|
||||
// }
|
||||
self.isRecording = (BOOL)[sender state];
|
||||
}
|
||||
|
||||
@@ -179,44 +175,66 @@
|
||||
-(void)microphone:(EZMicrophone *)microphone
|
||||
hasAudioReceived:(float **)buffer
|
||||
withBufferSize:(UInt32)bufferSize
|
||||
withNumberOfChannels:(UInt32)numberOfChannels {
|
||||
// Getting audio data as an array of float buffer arrays. What does that mean? Because the audio is coming in as a stereo signal the data is split into a left and right channel. So buffer[0] corresponds to the float* data for the left channel while buffer[1] corresponds to the float* data for the right channel.
|
||||
withNumberOfChannels:(UInt32)numberOfChannels
|
||||
{
|
||||
// Getting audio data as an array of float buffer arrays. What does that mean? Because the audio is coming in as a stereo signal the data is split into a left and right channel. So buffer[0] corresponds to the float* data for the left channel while buffer[1] corresponds to the float* data for the right channel.
|
||||
|
||||
// See the Thread Safety warning above, but in a nutshell these callbacks happen on a separate audio thread. We wrap any UI updating in a GCD block on the main thread to avoid blocking that audio flow.
|
||||
dispatch_async(dispatch_get_main_queue(),^{
|
||||
// See the Thread Safety warning above, but in a nutshell these callbacks happen on a separate audio thread. We wrap any UI updating in a GCD block on the main thread to avoid blocking that audio flow.
|
||||
__weak typeof (self) weakSelf = self;
|
||||
dispatch_async(dispatch_get_main_queue(),^{
|
||||
// All the audio plot needs is the buffer data (float*) and the size. Internally the audio plot will handle all the drawing related code, history management, and freeing its own resources. Hence, one badass line of code gets you a pretty plot :)
|
||||
[self.audioPlot updateBuffer:buffer[0] withBufferSize:bufferSize];
|
||||
});
|
||||
[weakSelf.audioPlot updateBuffer:buffer[0]
|
||||
withBufferSize:bufferSize];
|
||||
});
|
||||
}
|
||||
|
||||
// Append the microphone data coming as a AudioBufferList with the specified buffer size to the recorder
|
||||
-(void)microphone:(EZMicrophone *)microphone
|
||||
hasBufferList:(AudioBufferList *)bufferList
|
||||
withBufferSize:(UInt32)bufferSize
|
||||
withNumberOfChannels:(UInt32)numberOfChannels {
|
||||
|
||||
// Getting audio data as a buffer list that can be directly fed into the EZRecorder. This is happening on the audio thread - any UI updating needs a GCD main queue block.
|
||||
if( self.isRecording ){
|
||||
[self.recorder appendDataFromBufferList:bufferList
|
||||
withBufferSize:bufferSize];
|
||||
}
|
||||
|
||||
withNumberOfChannels:(UInt32)numberOfChannels
|
||||
{
|
||||
// // Getting audio data as a buffer list that can be directly fed into the EZRecorder. This is happening on the audio thread - any UI updating needs a GCD main queue block.
|
||||
if( self.isRecording )
|
||||
{
|
||||
// [self.recorder appendDataFromBufferList:bufferList
|
||||
// withBufferSize:bufferSize];
|
||||
[self.recordedFile writeFrames:bufferSize fromAudioBufferList:bufferList];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)microphone:(EZMicrophone *)microphone hasAudioStreamBasicDescription:(AudioStreamBasicDescription)audioStreamBasicDescription
|
||||
{
|
||||
// AudioStreamBasicDescription clientFormat, fileFormat;
|
||||
// self.recordedFile = [EZAudioFile audioFileWithURL:[NSURL fileURLWithPath:kAudioFilePath] delegate:self permission:EZAudioFilePermissionWrite fileFormat:fileFormat clientFormat:clientFormat];
|
||||
NSLog(@"microphone asbd: %@", [EZAudioUtilities stringForAudioStreamBasicDescription:audioStreamBasicDescription]);
|
||||
// kAudioFileBadPropertySizeError
|
||||
AudioStreamBasicDescription clientFormat = audioStreamBasicDescription;
|
||||
AudioStreamBasicDescription fileFormat = [EZAudioUtilities AIFFFormatWithNumberOfChannels:clientFormat.mChannelsPerFrame
|
||||
sampleRate:clientFormat.mSampleRate];
|
||||
self.recordedFile = [EZAudioFile audioFileWithURL:[NSURL fileURLWithPath:kAudioFilePath]
|
||||
delegate:self
|
||||
permission:EZAudioFilePermissionReadWrite
|
||||
fileFormat:fileFormat
|
||||
clientFormat:clientFormat];
|
||||
}
|
||||
|
||||
#pragma mark - AVAudioPlayerDelegate
|
||||
/*
|
||||
Occurs when the audio player instance completes playback
|
||||
*/
|
||||
-(void)audioPlayerDidFinishPlaying:(AVAudioPlayer *)player successfully:(BOOL)flag {
|
||||
// Update microphone state
|
||||
self.microphoneToggle.state = NSOnState;
|
||||
[self.microphoneToggle setEnabled:YES];
|
||||
[self.microphone startFetchingAudio];
|
||||
|
||||
// Update recording state
|
||||
self.isRecording = NO;
|
||||
self.recordingToggle.state = NSOffState;
|
||||
[self.recordingToggle setEnabled:YES];
|
||||
-(void)audioPlayerDidFinishPlaying:(AVAudioPlayer *)player
|
||||
successfully:(BOOL)flag
|
||||
{
|
||||
// Update microphone state
|
||||
self.microphoneToggle.state = NSOnState;
|
||||
[self.microphoneToggle setEnabled:YES];
|
||||
[self.microphone startFetchingAudio];
|
||||
|
||||
// Update recording state
|
||||
self.isRecording = NO;
|
||||
self.recordingToggle.state = NSOffState;
|
||||
[self.recordingToggle setEnabled:YES];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
+121
-91
@@ -7,6 +7,24 @@
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
66FC0B721B310604005CF3D7 /* EZAudio.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B501B310604005CF3D7 /* EZAudio.m */; };
|
||||
66FC0B731B310604005CF3D7 /* EZAudioDevice.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B521B310604005CF3D7 /* EZAudioDevice.m */; };
|
||||
66FC0B741B310604005CF3D7 /* EZAudioDisplayLink.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B541B310604005CF3D7 /* EZAudioDisplayLink.m */; };
|
||||
66FC0B751B310604005CF3D7 /* EZAudioFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B561B310604005CF3D7 /* EZAudioFile.m */; };
|
||||
66FC0B761B310604005CF3D7 /* EZAudioFloatConverter.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B581B310604005CF3D7 /* EZAudioFloatConverter.m */; };
|
||||
66FC0B771B310604005CF3D7 /* EZAudioFloatData.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B5A1B310604005CF3D7 /* EZAudioFloatData.m */; };
|
||||
66FC0B781B310604005CF3D7 /* EZAudioPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B5C1B310604005CF3D7 /* EZAudioPlayer.m */; };
|
||||
66FC0B791B310604005CF3D7 /* EZAudioPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B5E1B310604005CF3D7 /* EZAudioPlot.m */; };
|
||||
66FC0B7A1B310604005CF3D7 /* EZAudioPlotGL.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B601B310604005CF3D7 /* EZAudioPlotGL.m */; };
|
||||
66FC0B7B1B310604005CF3D7 /* EZAudioPlotGLKViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B621B310604005CF3D7 /* EZAudioPlotGLKViewController.m */; };
|
||||
66FC0B7C1B310604005CF3D7 /* EZAudioUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B641B310604005CF3D7 /* EZAudioUtilities.m */; };
|
||||
66FC0B7D1B310604005CF3D7 /* EZMicrophone.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B661B310604005CF3D7 /* EZMicrophone.m */; };
|
||||
66FC0B7E1B310604005CF3D7 /* EZOutput.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B681B310604005CF3D7 /* EZOutput.m */; };
|
||||
66FC0B7F1B310604005CF3D7 /* EZPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B6A1B310604005CF3D7 /* EZPlot.m */; };
|
||||
66FC0B801B310604005CF3D7 /* EZRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B6C1B310604005CF3D7 /* EZRecorder.m */; };
|
||||
66FC0B811B310604005CF3D7 /* TPCircularBuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 66FC0B6D1B310604005CF3D7 /* TPCircularBuffer.c */; };
|
||||
66FC0B821B310604005CF3D7 /* CHANGELOG in Resources */ = {isa = PBXBuildFile; fileRef = 66FC0B701B310604005CF3D7 /* CHANGELOG */; };
|
||||
66FC0B831B310604005CF3D7 /* VERSION in Resources */ = {isa = PBXBuildFile; fileRef = 66FC0B711B310604005CF3D7 /* VERSION */; };
|
||||
94056E83185BCBC000EB94BA /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94056E82185BCBC000EB94BA /* Cocoa.framework */; };
|
||||
94056E8D185BCBC000EB94BA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 94056E8B185BCBC000EB94BA /* InfoPlist.strings */; };
|
||||
94056E8F185BCBC000EB94BA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 94056E8E185BCBC000EB94BA /* main.m */; };
|
||||
@@ -27,19 +45,6 @@
|
||||
94056EE9185BCDBF00EB94BA /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94056EE6185BCDBF00EB94BA /* CoreAudio.framework */; };
|
||||
94056EEB185BCDC500EB94BA /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94056EEA185BCDC500EB94BA /* QuartzCore.framework */; };
|
||||
9417A6D31865927500D9D37B /* simple-drum-beat.wav in Resources */ = {isa = PBXBuildFile; fileRef = 9417A6D21865927500D9D37B /* simple-drum-beat.wav */; };
|
||||
9417A78C1867DD5400D9D37B /* AEFloatConverter.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7741867DD5400D9D37B /* AEFloatConverter.m */; };
|
||||
9417A78D1867DD5400D9D37B /* EZAudio.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7761867DD5400D9D37B /* EZAudio.m */; };
|
||||
9417A78E1867DD5400D9D37B /* EZAudioFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7781867DD5400D9D37B /* EZAudioFile.m */; };
|
||||
9417A78F1867DD5400D9D37B /* EZAudioPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A77A1867DD5400D9D37B /* EZAudioPlot.m */; };
|
||||
9417A7901867DD5400D9D37B /* EZAudioPlotGL.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A77C1867DD5400D9D37B /* EZAudioPlotGL.m */; };
|
||||
9417A7911867DD5400D9D37B /* EZAudioPlotGLKViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A77E1867DD5400D9D37B /* EZAudioPlotGLKViewController.m */; };
|
||||
9417A7921867DD5400D9D37B /* EZMicrophone.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7801867DD5400D9D37B /* EZMicrophone.m */; };
|
||||
9417A7931867DD5400D9D37B /* EZOutput.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7821867DD5400D9D37B /* EZOutput.m */; };
|
||||
9417A7941867DD5400D9D37B /* EZPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7841867DD5400D9D37B /* EZPlot.m */; };
|
||||
9417A7951867DD5400D9D37B /* EZRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7861867DD5400D9D37B /* EZRecorder.m */; };
|
||||
9417A7961867DD5400D9D37B /* TPCircularBuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7871867DD5400D9D37B /* TPCircularBuffer.c */; };
|
||||
9417A7971867DD5400D9D37B /* CHANGELOG in Resources */ = {isa = PBXBuildFile; fileRef = 9417A78A1867DD5400D9D37B /* CHANGELOG */; };
|
||||
9417A7981867DD5400D9D37B /* VERSION in Resources */ = {isa = PBXBuildFile; fileRef = 9417A78B1867DD5400D9D37B /* VERSION */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
@@ -53,6 +58,40 @@
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
66FC0B4F1B310604005CF3D7 /* EZAudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudio.h; sourceTree = "<group>"; };
|
||||
66FC0B501B310604005CF3D7 /* EZAudio.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudio.m; sourceTree = "<group>"; };
|
||||
66FC0B511B310604005CF3D7 /* EZAudioDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioDevice.h; sourceTree = "<group>"; };
|
||||
66FC0B521B310604005CF3D7 /* EZAudioDevice.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioDevice.m; sourceTree = "<group>"; };
|
||||
66FC0B531B310604005CF3D7 /* EZAudioDisplayLink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioDisplayLink.h; sourceTree = "<group>"; };
|
||||
66FC0B541B310604005CF3D7 /* EZAudioDisplayLink.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioDisplayLink.m; sourceTree = "<group>"; };
|
||||
66FC0B551B310604005CF3D7 /* EZAudioFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioFile.h; sourceTree = "<group>"; };
|
||||
66FC0B561B310604005CF3D7 /* EZAudioFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioFile.m; sourceTree = "<group>"; };
|
||||
66FC0B571B310604005CF3D7 /* EZAudioFloatConverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioFloatConverter.h; sourceTree = "<group>"; };
|
||||
66FC0B581B310604005CF3D7 /* EZAudioFloatConverter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioFloatConverter.m; sourceTree = "<group>"; };
|
||||
66FC0B591B310604005CF3D7 /* EZAudioFloatData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioFloatData.h; sourceTree = "<group>"; };
|
||||
66FC0B5A1B310604005CF3D7 /* EZAudioFloatData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioFloatData.m; sourceTree = "<group>"; };
|
||||
66FC0B5B1B310604005CF3D7 /* EZAudioPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlayer.h; sourceTree = "<group>"; };
|
||||
66FC0B5C1B310604005CF3D7 /* EZAudioPlayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlayer.m; sourceTree = "<group>"; };
|
||||
66FC0B5D1B310604005CF3D7 /* EZAudioPlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlot.h; sourceTree = "<group>"; };
|
||||
66FC0B5E1B310604005CF3D7 /* EZAudioPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlot.m; sourceTree = "<group>"; };
|
||||
66FC0B5F1B310604005CF3D7 /* EZAudioPlotGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGL.h; sourceTree = "<group>"; };
|
||||
66FC0B601B310604005CF3D7 /* EZAudioPlotGL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGL.m; sourceTree = "<group>"; };
|
||||
66FC0B611B310604005CF3D7 /* EZAudioPlotGLKViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGLKViewController.h; sourceTree = "<group>"; };
|
||||
66FC0B621B310604005CF3D7 /* EZAudioPlotGLKViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGLKViewController.m; sourceTree = "<group>"; };
|
||||
66FC0B631B310604005CF3D7 /* EZAudioUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioUtilities.h; sourceTree = "<group>"; };
|
||||
66FC0B641B310604005CF3D7 /* EZAudioUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioUtilities.m; sourceTree = "<group>"; };
|
||||
66FC0B651B310604005CF3D7 /* EZMicrophone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZMicrophone.h; sourceTree = "<group>"; };
|
||||
66FC0B661B310604005CF3D7 /* EZMicrophone.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZMicrophone.m; sourceTree = "<group>"; };
|
||||
66FC0B671B310604005CF3D7 /* EZOutput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZOutput.h; sourceTree = "<group>"; };
|
||||
66FC0B681B310604005CF3D7 /* EZOutput.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZOutput.m; sourceTree = "<group>"; };
|
||||
66FC0B691B310604005CF3D7 /* EZPlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZPlot.h; sourceTree = "<group>"; };
|
||||
66FC0B6A1B310604005CF3D7 /* EZPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZPlot.m; sourceTree = "<group>"; };
|
||||
66FC0B6B1B310604005CF3D7 /* EZRecorder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZRecorder.h; sourceTree = "<group>"; };
|
||||
66FC0B6C1B310604005CF3D7 /* EZRecorder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZRecorder.m; sourceTree = "<group>"; };
|
||||
66FC0B6D1B310604005CF3D7 /* TPCircularBuffer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = TPCircularBuffer.c; sourceTree = "<group>"; };
|
||||
66FC0B6E1B310604005CF3D7 /* TPCircularBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TPCircularBuffer.h; sourceTree = "<group>"; };
|
||||
66FC0B701B310604005CF3D7 /* CHANGELOG */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CHANGELOG; sourceTree = "<group>"; };
|
||||
66FC0B711B310604005CF3D7 /* VERSION */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VERSION; sourceTree = "<group>"; };
|
||||
94056E7F185BCBC000EB94BA /* EZAudioWaveformFromFileExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = EZAudioWaveformFromFileExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
94056E82185BCBC000EB94BA /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
|
||||
94056E85185BCBC000EB94BA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
|
||||
@@ -82,30 +121,6 @@
|
||||
94056EE6185BCDBF00EB94BA /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
|
||||
94056EEA185BCDC500EB94BA /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
|
||||
9417A6D21865927500D9D37B /* simple-drum-beat.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = "simple-drum-beat.wav"; path = "../../../simple-drum-beat.wav"; sourceTree = "<group>"; };
|
||||
9417A7731867DD5400D9D37B /* AEFloatConverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AEFloatConverter.h; sourceTree = "<group>"; };
|
||||
9417A7741867DD5400D9D37B /* AEFloatConverter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AEFloatConverter.m; sourceTree = "<group>"; };
|
||||
9417A7751867DD5400D9D37B /* EZAudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudio.h; sourceTree = "<group>"; };
|
||||
9417A7761867DD5400D9D37B /* EZAudio.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudio.m; sourceTree = "<group>"; };
|
||||
9417A7771867DD5400D9D37B /* EZAudioFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioFile.h; sourceTree = "<group>"; };
|
||||
9417A7781867DD5400D9D37B /* EZAudioFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioFile.m; sourceTree = "<group>"; };
|
||||
9417A7791867DD5400D9D37B /* EZAudioPlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlot.h; sourceTree = "<group>"; };
|
||||
9417A77A1867DD5400D9D37B /* EZAudioPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlot.m; sourceTree = "<group>"; };
|
||||
9417A77B1867DD5400D9D37B /* EZAudioPlotGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGL.h; sourceTree = "<group>"; };
|
||||
9417A77C1867DD5400D9D37B /* EZAudioPlotGL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGL.m; sourceTree = "<group>"; };
|
||||
9417A77D1867DD5400D9D37B /* EZAudioPlotGLKViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGLKViewController.h; sourceTree = "<group>"; };
|
||||
9417A77E1867DD5400D9D37B /* EZAudioPlotGLKViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGLKViewController.m; sourceTree = "<group>"; };
|
||||
9417A77F1867DD5400D9D37B /* EZMicrophone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZMicrophone.h; sourceTree = "<group>"; };
|
||||
9417A7801867DD5400D9D37B /* EZMicrophone.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZMicrophone.m; sourceTree = "<group>"; };
|
||||
9417A7811867DD5400D9D37B /* EZOutput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZOutput.h; sourceTree = "<group>"; };
|
||||
9417A7821867DD5400D9D37B /* EZOutput.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZOutput.m; sourceTree = "<group>"; };
|
||||
9417A7831867DD5400D9D37B /* EZPlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZPlot.h; sourceTree = "<group>"; };
|
||||
9417A7841867DD5400D9D37B /* EZPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZPlot.m; sourceTree = "<group>"; };
|
||||
9417A7851867DD5400D9D37B /* EZRecorder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZRecorder.h; sourceTree = "<group>"; };
|
||||
9417A7861867DD5400D9D37B /* EZRecorder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZRecorder.m; sourceTree = "<group>"; };
|
||||
9417A7871867DD5400D9D37B /* TPCircularBuffer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = TPCircularBuffer.c; sourceTree = "<group>"; };
|
||||
9417A7881867DD5400D9D37B /* TPCircularBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TPCircularBuffer.h; sourceTree = "<group>"; };
|
||||
9417A78A1867DD5400D9D37B /* CHANGELOG */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CHANGELOG; sourceTree = "<group>"; };
|
||||
9417A78B1867DD5400D9D37B /* VERSION */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VERSION; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@@ -135,6 +150,56 @@
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
66FC0B4E1B310604005CF3D7 /* EZAudio */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
66FC0B4F1B310604005CF3D7 /* EZAudio.h */,
|
||||
66FC0B501B310604005CF3D7 /* EZAudio.m */,
|
||||
66FC0B511B310604005CF3D7 /* EZAudioDevice.h */,
|
||||
66FC0B521B310604005CF3D7 /* EZAudioDevice.m */,
|
||||
66FC0B531B310604005CF3D7 /* EZAudioDisplayLink.h */,
|
||||
66FC0B541B310604005CF3D7 /* EZAudioDisplayLink.m */,
|
||||
66FC0B551B310604005CF3D7 /* EZAudioFile.h */,
|
||||
66FC0B561B310604005CF3D7 /* EZAudioFile.m */,
|
||||
66FC0B571B310604005CF3D7 /* EZAudioFloatConverter.h */,
|
||||
66FC0B581B310604005CF3D7 /* EZAudioFloatConverter.m */,
|
||||
66FC0B591B310604005CF3D7 /* EZAudioFloatData.h */,
|
||||
66FC0B5A1B310604005CF3D7 /* EZAudioFloatData.m */,
|
||||
66FC0B5B1B310604005CF3D7 /* EZAudioPlayer.h */,
|
||||
66FC0B5C1B310604005CF3D7 /* EZAudioPlayer.m */,
|
||||
66FC0B5D1B310604005CF3D7 /* EZAudioPlot.h */,
|
||||
66FC0B5E1B310604005CF3D7 /* EZAudioPlot.m */,
|
||||
66FC0B5F1B310604005CF3D7 /* EZAudioPlotGL.h */,
|
||||
66FC0B601B310604005CF3D7 /* EZAudioPlotGL.m */,
|
||||
66FC0B611B310604005CF3D7 /* EZAudioPlotGLKViewController.h */,
|
||||
66FC0B621B310604005CF3D7 /* EZAudioPlotGLKViewController.m */,
|
||||
66FC0B631B310604005CF3D7 /* EZAudioUtilities.h */,
|
||||
66FC0B641B310604005CF3D7 /* EZAudioUtilities.m */,
|
||||
66FC0B651B310604005CF3D7 /* EZMicrophone.h */,
|
||||
66FC0B661B310604005CF3D7 /* EZMicrophone.m */,
|
||||
66FC0B671B310604005CF3D7 /* EZOutput.h */,
|
||||
66FC0B681B310604005CF3D7 /* EZOutput.m */,
|
||||
66FC0B691B310604005CF3D7 /* EZPlot.h */,
|
||||
66FC0B6A1B310604005CF3D7 /* EZPlot.m */,
|
||||
66FC0B6B1B310604005CF3D7 /* EZRecorder.h */,
|
||||
66FC0B6C1B310604005CF3D7 /* EZRecorder.m */,
|
||||
66FC0B6D1B310604005CF3D7 /* TPCircularBuffer.c */,
|
||||
66FC0B6E1B310604005CF3D7 /* TPCircularBuffer.h */,
|
||||
66FC0B6F1B310604005CF3D7 /* VERSION */,
|
||||
);
|
||||
name = EZAudio;
|
||||
path = ../../../../EZAudio;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
66FC0B6F1B310604005CF3D7 /* VERSION */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
66FC0B701B310604005CF3D7 /* CHANGELOG */,
|
||||
66FC0B711B310604005CF3D7 /* VERSION */,
|
||||
);
|
||||
path = VERSION;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
94056E76185BCBC000EB94BA = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -183,7 +248,7 @@
|
||||
94056E88185BCBC000EB94BA /* EZAudioWaveformFromFileExample */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9417A7721867DD5400D9D37B /* EZAudio */,
|
||||
66FC0B4E1B310604005CF3D7 /* EZAudio */,
|
||||
94056E94185BCBC000EB94BA /* AppDelegate.h */,
|
||||
94056E95185BCBC000EB94BA /* AppDelegate.m */,
|
||||
9417A6D21865927500D9D37B /* simple-drum-beat.wav */,
|
||||
@@ -227,46 +292,6 @@
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9417A7721867DD5400D9D37B /* EZAudio */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9417A7731867DD5400D9D37B /* AEFloatConverter.h */,
|
||||
9417A7741867DD5400D9D37B /* AEFloatConverter.m */,
|
||||
9417A7751867DD5400D9D37B /* EZAudio.h */,
|
||||
9417A7761867DD5400D9D37B /* EZAudio.m */,
|
||||
9417A7771867DD5400D9D37B /* EZAudioFile.h */,
|
||||
9417A7781867DD5400D9D37B /* EZAudioFile.m */,
|
||||
9417A7791867DD5400D9D37B /* EZAudioPlot.h */,
|
||||
9417A77A1867DD5400D9D37B /* EZAudioPlot.m */,
|
||||
9417A77B1867DD5400D9D37B /* EZAudioPlotGL.h */,
|
||||
9417A77C1867DD5400D9D37B /* EZAudioPlotGL.m */,
|
||||
9417A77D1867DD5400D9D37B /* EZAudioPlotGLKViewController.h */,
|
||||
9417A77E1867DD5400D9D37B /* EZAudioPlotGLKViewController.m */,
|
||||
9417A77F1867DD5400D9D37B /* EZMicrophone.h */,
|
||||
9417A7801867DD5400D9D37B /* EZMicrophone.m */,
|
||||
9417A7811867DD5400D9D37B /* EZOutput.h */,
|
||||
9417A7821867DD5400D9D37B /* EZOutput.m */,
|
||||
9417A7831867DD5400D9D37B /* EZPlot.h */,
|
||||
9417A7841867DD5400D9D37B /* EZPlot.m */,
|
||||
9417A7851867DD5400D9D37B /* EZRecorder.h */,
|
||||
9417A7861867DD5400D9D37B /* EZRecorder.m */,
|
||||
9417A7871867DD5400D9D37B /* TPCircularBuffer.c */,
|
||||
9417A7881867DD5400D9D37B /* TPCircularBuffer.h */,
|
||||
9417A7891867DD5400D9D37B /* VERSION */,
|
||||
);
|
||||
name = EZAudio;
|
||||
path = ../../../../EZAudio;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9417A7891867DD5400D9D37B /* VERSION */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9417A78A1867DD5400D9D37B /* CHANGELOG */,
|
||||
9417A78B1867DD5400D9D37B /* VERSION */,
|
||||
);
|
||||
path = VERSION;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
@@ -345,10 +370,10 @@
|
||||
files = (
|
||||
94056E8D185BCBC000EB94BA /* InfoPlist.strings in Resources */,
|
||||
94056E9B185BCBC000EB94BA /* Images.xcassets in Resources */,
|
||||
9417A7971867DD5400D9D37B /* CHANGELOG in Resources */,
|
||||
66FC0B821B310604005CF3D7 /* CHANGELOG in Resources */,
|
||||
9417A6D31865927500D9D37B /* simple-drum-beat.wav in Resources */,
|
||||
94056EDF185BCC0200EB94BA /* WaveformFromFileViewController.xib in Resources */,
|
||||
9417A7981867DD5400D9D37B /* VERSION in Resources */,
|
||||
66FC0B831B310604005CF3D7 /* VERSION in Resources */,
|
||||
94056E93185BCBC000EB94BA /* Credits.rtf in Resources */,
|
||||
94056E99185BCBC000EB94BA /* MainMenu.xib in Resources */,
|
||||
);
|
||||
@@ -369,20 +394,25 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
9417A7961867DD5400D9D37B /* TPCircularBuffer.c in Sources */,
|
||||
9417A7931867DD5400D9D37B /* EZOutput.m in Sources */,
|
||||
9417A7911867DD5400D9D37B /* EZAudioPlotGLKViewController.m in Sources */,
|
||||
66FC0B801B310604005CF3D7 /* EZRecorder.m in Sources */,
|
||||
94056E96185BCBC000EB94BA /* AppDelegate.m in Sources */,
|
||||
9417A78C1867DD5400D9D37B /* AEFloatConverter.m in Sources */,
|
||||
66FC0B761B310604005CF3D7 /* EZAudioFloatConverter.m in Sources */,
|
||||
66FC0B771B310604005CF3D7 /* EZAudioFloatData.m in Sources */,
|
||||
66FC0B721B310604005CF3D7 /* EZAudio.m in Sources */,
|
||||
66FC0B751B310604005CF3D7 /* EZAudioFile.m in Sources */,
|
||||
66FC0B7E1B310604005CF3D7 /* EZOutput.m in Sources */,
|
||||
66FC0B7A1B310604005CF3D7 /* EZAudioPlotGL.m in Sources */,
|
||||
66FC0B811B310604005CF3D7 /* TPCircularBuffer.c in Sources */,
|
||||
66FC0B791B310604005CF3D7 /* EZAudioPlot.m in Sources */,
|
||||
94056EDE185BCC0200EB94BA /* WaveformFromFileViewController.m in Sources */,
|
||||
9417A78F1867DD5400D9D37B /* EZAudioPlot.m in Sources */,
|
||||
9417A78E1867DD5400D9D37B /* EZAudioFile.m in Sources */,
|
||||
9417A7901867DD5400D9D37B /* EZAudioPlotGL.m in Sources */,
|
||||
66FC0B7D1B310604005CF3D7 /* EZMicrophone.m in Sources */,
|
||||
66FC0B781B310604005CF3D7 /* EZAudioPlayer.m in Sources */,
|
||||
94056E8F185BCBC000EB94BA /* main.m in Sources */,
|
||||
9417A7941867DD5400D9D37B /* EZPlot.m in Sources */,
|
||||
9417A7921867DD5400D9D37B /* EZMicrophone.m in Sources */,
|
||||
9417A7951867DD5400D9D37B /* EZRecorder.m in Sources */,
|
||||
9417A78D1867DD5400D9D37B /* EZAudio.m in Sources */,
|
||||
66FC0B741B310604005CF3D7 /* EZAudioDisplayLink.m in Sources */,
|
||||
66FC0B7F1B310604005CF3D7 /* EZPlot.m in Sources */,
|
||||
66FC0B731B310604005CF3D7 /* EZAudioDevice.m in Sources */,
|
||||
66FC0B7C1B310604005CF3D7 /* EZAudioUtilities.m in Sources */,
|
||||
66FC0B7B1B310604005CF3D7 /* EZAudioPlotGLKViewController.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
||||
+16
-6
@@ -33,9 +33,19 @@
|
||||
*/
|
||||
#define kAudioFileDefault [[NSBundle mainBundle] pathForResource:@"simple-drum-beat" ofType:@"wav"]
|
||||
|
||||
// By default this will write the audio plot's snapshot into the document's directory to a waveform.png file
|
||||
#define kSnapshotFileDefault [NSString stringWithFormat:@"%@%@",NSHomeDirectory(),@"/Documents/waveform.png"]
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - WaveformFromFileViewController
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@interface WaveformFromFileViewController : NSViewController <NSOpenSavePanelDelegate>
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Components
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
The EZAudioFile representing of the currently selected audio file
|
||||
*/
|
||||
@@ -46,23 +56,23 @@
|
||||
*/
|
||||
@property (nonatomic,weak) IBOutlet EZAudioPlot *audioPlot;
|
||||
|
||||
/**
|
||||
A BOOL indicating whether or not we've reached the end of the file
|
||||
*/
|
||||
@property (nonatomic,assign) BOOL eof;
|
||||
|
||||
#pragma mark - UI Extras
|
||||
/**
|
||||
A label to display the current file path with the waveform shown
|
||||
*/
|
||||
@property (nonatomic,weak) IBOutlet NSTextField *filePathLabel;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Actions
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Prompts the file manager and loads in a new audio file into the EZAudioFile representation.
|
||||
*/
|
||||
-(IBAction)openFile:(id)sender;
|
||||
|
||||
/**
|
||||
Takes a snapshot of the current waveform.
|
||||
*/
|
||||
-(IBAction)snapshot:(id)sender;
|
||||
|
||||
@end
|
||||
|
||||
+40
-84
@@ -25,70 +25,31 @@
|
||||
|
||||
#import "WaveformFromFileViewController.h"
|
||||
|
||||
@interface WaveformFromFileViewController (){
|
||||
AudioBufferList *readBuffer;
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation WaveformFromFileViewController
|
||||
@synthesize audioFile;
|
||||
@synthesize audioPlot;
|
||||
@synthesize eof = _eof;
|
||||
|
||||
#pragma mark - Initialization
|
||||
-(id)init {
|
||||
self = [super initWithNibName:NSStringFromClass(self.class) bundle:nil];
|
||||
if(self){
|
||||
[self initializeViewController];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(id)initWithCoder:(NSCoder *)aDecoder {
|
||||
self = [super initWithNibName:NSStringFromClass(self.class) bundle:nil];
|
||||
if(self){
|
||||
[self initializeViewController];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
|
||||
self = [super initWithNibName:NSStringFromClass(self.class) bundle:nil];
|
||||
if(self){
|
||||
[self initializeViewController];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Initialize View Controller
|
||||
-(void)initializeViewController {
|
||||
}
|
||||
|
||||
#pragma mark - Customize the Audio Plot
|
||||
-(void)awakeFromNib {
|
||||
self.audioPlot.wantsLayer = YES;
|
||||
-(void)awakeFromNib
|
||||
{
|
||||
self.audioPlot.backgroundColor = [NSColor clearColor];
|
||||
self.audioPlot.plotType = EZPlotTypeBuffer;
|
||||
self.audioPlot.shouldFill = YES;
|
||||
self.audioPlot.shouldMirror = YES;
|
||||
self.audioPlot.color = [NSColor colorWithCalibratedRed:0
|
||||
green:0.676
|
||||
blue:0.575
|
||||
alpha:1];
|
||||
self.audioPlot.color = [NSColor whiteColor];
|
||||
[self openFileWithFilePathURL:[NSURL fileURLWithPath:kAudioFileDefault]];
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - Actions
|
||||
-(void)openFile:(id)sender {
|
||||
NSOpenPanel* openDlg = [NSOpenPanel openPanel];
|
||||
openDlg.canChooseFiles = YES;
|
||||
openDlg.canChooseDirectories = NO;
|
||||
openDlg.delegate = self;
|
||||
if( [openDlg runModal] == NSOKButton ){
|
||||
NSArray *selectedFiles = [openDlg URLs];
|
||||
[self openFileWithFilePathURL:selectedFiles.firstObject];
|
||||
}
|
||||
-(void)openFile:(id)sender
|
||||
{
|
||||
NSOpenPanel* openDlg = [NSOpenPanel openPanel];
|
||||
openDlg.canChooseFiles = YES;
|
||||
openDlg.canChooseDirectories = NO;
|
||||
openDlg.delegate = self;
|
||||
if( [openDlg runModal] == NSOKButton )
|
||||
{
|
||||
NSArray *selectedFiles = [openDlg URLs];
|
||||
[self openFileWithFilePathURL:selectedFiles.firstObject];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)snapshot:(id)sender
|
||||
@@ -96,46 +57,41 @@
|
||||
NSBitmapImageRep* imageRep = [self.audioPlot bitmapImageRepForCachingDisplayInRect:self.audioPlot.bounds];
|
||||
[self.audioPlot cacheDisplayInRect:self.audioPlot.bounds toBitmapImageRep:imageRep];
|
||||
NSData* data = [imageRep representationUsingType:NSPNGFileType properties:nil];
|
||||
[data writeToFile:@"/Users/haris/Documents/waveform.png" atomically:NO];
|
||||
[data writeToFile:kSnapshotFileDefault atomically:NO];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Action Extensions
|
||||
-(void)openFileWithFilePathURL:(NSURL*)filePathURL {
|
||||
|
||||
self.audioFile = [EZAudioFile audioFileWithURL:filePathURL];
|
||||
self.eof = NO;
|
||||
self.filePathLabel.stringValue = filePathURL.lastPathComponent;
|
||||
|
||||
// Plot the whole waveform
|
||||
self.audioPlot.plotType = EZPlotTypeBuffer;
|
||||
self.audioPlot.shouldFill = YES;
|
||||
self.audioPlot.shouldMirror = YES;
|
||||
[self.audioFile getWaveformDataWithCompletionBlock:^(float *waveformData, UInt32 length) {
|
||||
[self.audioPlot updateBuffer:waveformData withBufferSize:length];
|
||||
}];
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
-(void)openFileWithFilePathURL:(NSURL*)filePathURL
|
||||
{
|
||||
self.audioFile = [EZAudioFile audioFileWithURL:filePathURL];
|
||||
self.filePathLabel.stringValue = filePathURL.lastPathComponent;
|
||||
|
||||
__weak typeof(self) weakSelf = self;
|
||||
[self.audioFile getWaveformDataWithNumberOfPoints:512
|
||||
completion:^(EZAudioFloatData *waveformData)
|
||||
{
|
||||
[weakSelf.audioPlot updateBuffer:waveformData.buffers[0]
|
||||
withBufferSize:waveformData.bufferSize];
|
||||
}];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - NSOpenSavePanelDelegate
|
||||
//------------------------------------------------------------------------------
|
||||
/**
|
||||
Here's an example how to filter the open panel to only show the supported file types by the EZAudioFile (which are just the audio file types supported by Core Audio).
|
||||
*/
|
||||
-(BOOL)panel:(id)sender shouldShowFilename:(NSString *)filename {
|
||||
NSString* ext = [filename pathExtension];
|
||||
if ([ext isEqualToString:@""] || [ext isEqualToString:@"/"] || ext == nil || ext == NULL || [ext length] < 1) {
|
||||
return YES;
|
||||
}
|
||||
NSArray *fileTypes = [EZAudioFile supportedAudioFileTypes];
|
||||
NSEnumerator* tagEnumerator = [fileTypes objectEnumerator];
|
||||
NSString* allowedExt;
|
||||
while ((allowedExt = [tagEnumerator nextObject]))
|
||||
{
|
||||
if ([ext caseInsensitiveCompare:allowedExt] == NSOrderedSame)
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
}
|
||||
return NO;
|
||||
- (BOOL)panel:(id)sender shouldShowFilename:(NSString *)filename
|
||||
{
|
||||
NSString *ext = [filename pathExtension];
|
||||
NSArray *fileTypes = [EZAudioFile supportedAudioFileTypes];
|
||||
BOOL isDirectory = [ext isEqualToString:@""];
|
||||
return [fileTypes containsObject:ext] || isDirectory;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@end
|
||||
|
||||
Vendored
BIN
Binary file not shown.
+127
-115
@@ -7,14 +7,31 @@
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
66B5CEAA1B002C750046BE9D /* EZAudioDevice.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B5CE8B1B002C740046BE9D /* EZAudioDevice.m */; };
|
||||
66B5CEAB1B002C750046BE9D /* EZAudioFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B5CE8D1B002C740046BE9D /* EZAudioFile.m */; };
|
||||
66B5CEAC1B002C750046BE9D /* EZAudioFloatConverter.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B5CE8F1B002C740046BE9D /* EZAudioFloatConverter.m */; };
|
||||
66B5CEAD1B002C750046BE9D /* EZAudioFloatData.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B5CE911B002C740046BE9D /* EZAudioFloatData.m */; };
|
||||
66B5CEAE1B002C750046BE9D /* EZAudioPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B5CE931B002C740046BE9D /* EZAudioPlayer.m */; };
|
||||
66B5CEAF1B002C750046BE9D /* EZAudioPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B5CE951B002C740046BE9D /* EZAudioPlot.m */; };
|
||||
66B5CEB01B002C750046BE9D /* EZAudioPlotGL.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B5CE971B002C740046BE9D /* EZAudioPlotGL.m */; };
|
||||
66B5CEB11B002C750046BE9D /* EZAudioPlotGLKViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B5CE991B002C740046BE9D /* EZAudioPlotGLKViewController.m */; };
|
||||
66B5CEB21B002C750046BE9D /* EZAudioUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B5CE9B1B002C740046BE9D /* EZAudioUtilities.m */; };
|
||||
66B5CEB31B002C750046BE9D /* EZMicrophone.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B5CE9D1B002C740046BE9D /* EZMicrophone.m */; };
|
||||
66B5CEB41B002C750046BE9D /* EZOutput.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B5CE9F1B002C740046BE9D /* EZOutput.m */; };
|
||||
66B5CEB51B002C750046BE9D /* EZPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B5CEA11B002C740046BE9D /* EZPlot.m */; };
|
||||
66B5CEB61B002C750046BE9D /* EZRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B5CEA31B002C740046BE9D /* EZRecorder.m */; };
|
||||
66B5CEB71B002C750046BE9D /* TPCircularBuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 66B5CEA41B002C740046BE9D /* TPCircularBuffer.c */; };
|
||||
66B5CEB81B002C750046BE9D /* CHANGELOG in Resources */ = {isa = PBXBuildFile; fileRef = 66B5CEA71B002C750046BE9D /* CHANGELOG */; };
|
||||
66B5CEB91B002C750046BE9D /* VERSION in Resources */ = {isa = PBXBuildFile; fileRef = 66B5CEA81B002C750046BE9D /* VERSION */; };
|
||||
66C82E221B22AA4700B71897 /* EZAudioDisplayLink.m in Sources */ = {isa = PBXBuildFile; fileRef = 66C82E211B22AA4700B71897 /* EZAudioDisplayLink.m */; };
|
||||
66DB85531B0425CB0018EFC5 /* EZAudio.m in Sources */ = {isa = PBXBuildFile; fileRef = 66DB85521B0425CB0018EFC5 /* EZAudio.m */; };
|
||||
66DB85831B0430E70018EFC5 /* MainStoryboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 66DB85821B0430E70018EFC5 /* MainStoryboard.storyboard */; };
|
||||
94056F7E185E593500EB94BA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94056F7D185E593500EB94BA /* Foundation.framework */; };
|
||||
94056F80185E593500EB94BA /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94056F7F185E593500EB94BA /* CoreGraphics.framework */; };
|
||||
94056F82185E593500EB94BA /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94056F81185E593500EB94BA /* UIKit.framework */; };
|
||||
94056F88185E593500EB94BA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 94056F86185E593500EB94BA /* InfoPlist.strings */; };
|
||||
94056F8A185E593500EB94BA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 94056F89185E593500EB94BA /* main.m */; };
|
||||
94056F8E185E593500EB94BA /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 94056F8D185E593500EB94BA /* AppDelegate.m */; };
|
||||
94056F91185E593500EB94BA /* Main_iPhone.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 94056F8F185E593500EB94BA /* Main_iPhone.storyboard */; };
|
||||
94056F94185E593500EB94BA /* Main_iPad.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 94056F92185E593500EB94BA /* Main_iPad.storyboard */; };
|
||||
94056F99185E593500EB94BA /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 94056F98185E593500EB94BA /* Images.xcassets */; };
|
||||
94056FA0185E593500EB94BA /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94056F9F185E593500EB94BA /* XCTest.framework */; };
|
||||
94056FA1185E593500EB94BA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94056F7D185E593500EB94BA /* Foundation.framework */; };
|
||||
@@ -24,19 +41,6 @@
|
||||
94056FDE185E59D900EB94BA /* CoreGraphicsWaveformViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 94056FDD185E59D900EB94BA /* CoreGraphicsWaveformViewController.m */; };
|
||||
94057024185E612100EB94BA /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94057023185E612000EB94BA /* AudioToolbox.framework */; };
|
||||
94057026185E612A00EB94BA /* GLKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94057025185E612A00EB94BA /* GLKit.framework */; };
|
||||
9417A7DA1867DDD600D9D37B /* AEFloatConverter.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7C21867DDD600D9D37B /* AEFloatConverter.m */; };
|
||||
9417A7DB1867DDD600D9D37B /* EZAudio.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7C41867DDD600D9D37B /* EZAudio.m */; };
|
||||
9417A7DC1867DDD600D9D37B /* EZAudioFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7C61867DDD600D9D37B /* EZAudioFile.m */; };
|
||||
9417A7DD1867DDD600D9D37B /* EZAudioPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7C81867DDD600D9D37B /* EZAudioPlot.m */; };
|
||||
9417A7DE1867DDD600D9D37B /* EZAudioPlotGL.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7CA1867DDD600D9D37B /* EZAudioPlotGL.m */; };
|
||||
9417A7DF1867DDD600D9D37B /* EZAudioPlotGLKViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7CC1867DDD600D9D37B /* EZAudioPlotGLKViewController.m */; };
|
||||
9417A7E01867DDD600D9D37B /* EZMicrophone.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7CE1867DDD600D9D37B /* EZMicrophone.m */; };
|
||||
9417A7E11867DDD600D9D37B /* EZOutput.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7D01867DDD600D9D37B /* EZOutput.m */; };
|
||||
9417A7E21867DDD600D9D37B /* EZPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7D21867DDD600D9D37B /* EZPlot.m */; };
|
||||
9417A7E31867DDD600D9D37B /* EZRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7D41867DDD600D9D37B /* EZRecorder.m */; };
|
||||
9417A7E41867DDD600D9D37B /* TPCircularBuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7D51867DDD600D9D37B /* TPCircularBuffer.c */; };
|
||||
9417A7E51867DDD600D9D37B /* CHANGELOG in Resources */ = {isa = PBXBuildFile; fileRef = 9417A7D81867DDD600D9D37B /* CHANGELOG */; };
|
||||
9417A7E61867DDD600D9D37B /* VERSION in Resources */ = {isa = PBXBuildFile; fileRef = 9417A7D91867DDD600D9D37B /* VERSION */; };
|
||||
94FBB77318B15690007CAE45 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94FBB77218B15690007CAE45 /* AVFoundation.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
@@ -51,6 +55,41 @@
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
66B5CE891B002C740046BE9D /* EZAudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudio.h; sourceTree = "<group>"; };
|
||||
66B5CE8A1B002C740046BE9D /* EZAudioDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioDevice.h; sourceTree = "<group>"; };
|
||||
66B5CE8B1B002C740046BE9D /* EZAudioDevice.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioDevice.m; sourceTree = "<group>"; };
|
||||
66B5CE8C1B002C740046BE9D /* EZAudioFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioFile.h; sourceTree = "<group>"; };
|
||||
66B5CE8D1B002C740046BE9D /* EZAudioFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioFile.m; sourceTree = "<group>"; };
|
||||
66B5CE8E1B002C740046BE9D /* EZAudioFloatConverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioFloatConverter.h; sourceTree = "<group>"; };
|
||||
66B5CE8F1B002C740046BE9D /* EZAudioFloatConverter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioFloatConverter.m; sourceTree = "<group>"; };
|
||||
66B5CE901B002C740046BE9D /* EZAudioFloatData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioFloatData.h; sourceTree = "<group>"; };
|
||||
66B5CE911B002C740046BE9D /* EZAudioFloatData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioFloatData.m; sourceTree = "<group>"; };
|
||||
66B5CE921B002C740046BE9D /* EZAudioPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlayer.h; sourceTree = "<group>"; };
|
||||
66B5CE931B002C740046BE9D /* EZAudioPlayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlayer.m; sourceTree = "<group>"; };
|
||||
66B5CE941B002C740046BE9D /* EZAudioPlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlot.h; sourceTree = "<group>"; };
|
||||
66B5CE951B002C740046BE9D /* EZAudioPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlot.m; sourceTree = "<group>"; };
|
||||
66B5CE961B002C740046BE9D /* EZAudioPlotGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGL.h; sourceTree = "<group>"; };
|
||||
66B5CE971B002C740046BE9D /* EZAudioPlotGL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGL.m; sourceTree = "<group>"; };
|
||||
66B5CE981B002C740046BE9D /* EZAudioPlotGLKViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGLKViewController.h; sourceTree = "<group>"; };
|
||||
66B5CE991B002C740046BE9D /* EZAudioPlotGLKViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGLKViewController.m; sourceTree = "<group>"; };
|
||||
66B5CE9A1B002C740046BE9D /* EZAudioUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioUtilities.h; sourceTree = "<group>"; };
|
||||
66B5CE9B1B002C740046BE9D /* EZAudioUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioUtilities.m; sourceTree = "<group>"; };
|
||||
66B5CE9C1B002C740046BE9D /* EZMicrophone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZMicrophone.h; sourceTree = "<group>"; };
|
||||
66B5CE9D1B002C740046BE9D /* EZMicrophone.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZMicrophone.m; sourceTree = "<group>"; };
|
||||
66B5CE9E1B002C740046BE9D /* EZOutput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZOutput.h; sourceTree = "<group>"; };
|
||||
66B5CE9F1B002C740046BE9D /* EZOutput.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZOutput.m; sourceTree = "<group>"; };
|
||||
66B5CEA01B002C740046BE9D /* EZPlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZPlot.h; sourceTree = "<group>"; };
|
||||
66B5CEA11B002C740046BE9D /* EZPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZPlot.m; sourceTree = "<group>"; };
|
||||
66B5CEA21B002C740046BE9D /* EZRecorder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZRecorder.h; sourceTree = "<group>"; };
|
||||
66B5CEA31B002C740046BE9D /* EZRecorder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZRecorder.m; sourceTree = "<group>"; };
|
||||
66B5CEA41B002C740046BE9D /* TPCircularBuffer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = TPCircularBuffer.c; sourceTree = "<group>"; };
|
||||
66B5CEA51B002C740046BE9D /* TPCircularBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TPCircularBuffer.h; sourceTree = "<group>"; };
|
||||
66B5CEA71B002C750046BE9D /* CHANGELOG */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CHANGELOG; sourceTree = "<group>"; };
|
||||
66B5CEA81B002C750046BE9D /* VERSION */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VERSION; sourceTree = "<group>"; };
|
||||
66C82E201B22AA4700B71897 /* EZAudioDisplayLink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioDisplayLink.h; sourceTree = "<group>"; };
|
||||
66C82E211B22AA4700B71897 /* EZAudioDisplayLink.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioDisplayLink.m; sourceTree = "<group>"; };
|
||||
66DB85521B0425CB0018EFC5 /* EZAudio.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudio.m; sourceTree = "<group>"; };
|
||||
66DB85821B0430E70018EFC5 /* MainStoryboard.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = MainStoryboard.storyboard; sourceTree = "<group>"; };
|
||||
94056F7A185E593500EB94BA /* EZAudioCoreGraphicsWaveformExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = EZAudioCoreGraphicsWaveformExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
94056F7D185E593500EB94BA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
94056F7F185E593500EB94BA /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
|
||||
@@ -61,8 +100,6 @@
|
||||
94056F8B185E593500EB94BA /* EZAudioCoreGraphicsWaveformExample-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "EZAudioCoreGraphicsWaveformExample-Prefix.pch"; sourceTree = "<group>"; };
|
||||
94056F8C185E593500EB94BA /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
|
||||
94056F8D185E593500EB94BA /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
|
||||
94056F90185E593500EB94BA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main_iPhone.storyboard; sourceTree = "<group>"; };
|
||||
94056F93185E593500EB94BA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main_iPad.storyboard; sourceTree = "<group>"; };
|
||||
94056F98185E593500EB94BA /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
|
||||
94056F9E185E593500EB94BA /* EZAudioCoreGraphicsWaveformExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = EZAudioCoreGraphicsWaveformExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
94056F9F185E593500EB94BA /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
|
||||
@@ -73,30 +110,6 @@
|
||||
94056FDD185E59D900EB94BA /* CoreGraphicsWaveformViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CoreGraphicsWaveformViewController.m; sourceTree = "<group>"; };
|
||||
94057023185E612000EB94BA /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
|
||||
94057025185E612A00EB94BA /* GLKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLKit.framework; path = System/Library/Frameworks/GLKit.framework; sourceTree = SDKROOT; };
|
||||
9417A7C11867DDD600D9D37B /* AEFloatConverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AEFloatConverter.h; sourceTree = "<group>"; };
|
||||
9417A7C21867DDD600D9D37B /* AEFloatConverter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AEFloatConverter.m; sourceTree = "<group>"; };
|
||||
9417A7C31867DDD600D9D37B /* EZAudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudio.h; sourceTree = "<group>"; };
|
||||
9417A7C41867DDD600D9D37B /* EZAudio.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudio.m; sourceTree = "<group>"; };
|
||||
9417A7C51867DDD600D9D37B /* EZAudioFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioFile.h; sourceTree = "<group>"; };
|
||||
9417A7C61867DDD600D9D37B /* EZAudioFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioFile.m; sourceTree = "<group>"; };
|
||||
9417A7C71867DDD600D9D37B /* EZAudioPlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlot.h; sourceTree = "<group>"; };
|
||||
9417A7C81867DDD600D9D37B /* EZAudioPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlot.m; sourceTree = "<group>"; };
|
||||
9417A7C91867DDD600D9D37B /* EZAudioPlotGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGL.h; sourceTree = "<group>"; };
|
||||
9417A7CA1867DDD600D9D37B /* EZAudioPlotGL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGL.m; sourceTree = "<group>"; };
|
||||
9417A7CB1867DDD600D9D37B /* EZAudioPlotGLKViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGLKViewController.h; sourceTree = "<group>"; };
|
||||
9417A7CC1867DDD600D9D37B /* EZAudioPlotGLKViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGLKViewController.m; sourceTree = "<group>"; };
|
||||
9417A7CD1867DDD600D9D37B /* EZMicrophone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZMicrophone.h; sourceTree = "<group>"; };
|
||||
9417A7CE1867DDD600D9D37B /* EZMicrophone.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZMicrophone.m; sourceTree = "<group>"; };
|
||||
9417A7CF1867DDD600D9D37B /* EZOutput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZOutput.h; sourceTree = "<group>"; };
|
||||
9417A7D01867DDD600D9D37B /* EZOutput.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZOutput.m; sourceTree = "<group>"; };
|
||||
9417A7D11867DDD600D9D37B /* EZPlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZPlot.h; sourceTree = "<group>"; };
|
||||
9417A7D21867DDD600D9D37B /* EZPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZPlot.m; sourceTree = "<group>"; };
|
||||
9417A7D31867DDD600D9D37B /* EZRecorder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZRecorder.h; sourceTree = "<group>"; };
|
||||
9417A7D41867DDD600D9D37B /* EZRecorder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZRecorder.m; sourceTree = "<group>"; };
|
||||
9417A7D51867DDD600D9D37B /* TPCircularBuffer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = TPCircularBuffer.c; sourceTree = "<group>"; };
|
||||
9417A7D61867DDD600D9D37B /* TPCircularBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TPCircularBuffer.h; sourceTree = "<group>"; };
|
||||
9417A7D81867DDD600D9D37B /* CHANGELOG */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CHANGELOG; sourceTree = "<group>"; };
|
||||
9417A7D91867DDD600D9D37B /* VERSION */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VERSION; sourceTree = "<group>"; };
|
||||
94FBB77218B15690007CAE45 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
@@ -127,6 +140,56 @@
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
66B5CE861B002C740046BE9D /* EZAudio */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
66B5CE891B002C740046BE9D /* EZAudio.h */,
|
||||
66DB85521B0425CB0018EFC5 /* EZAudio.m */,
|
||||
66B5CE8A1B002C740046BE9D /* EZAudioDevice.h */,
|
||||
66B5CE8B1B002C740046BE9D /* EZAudioDevice.m */,
|
||||
66C82E201B22AA4700B71897 /* EZAudioDisplayLink.h */,
|
||||
66C82E211B22AA4700B71897 /* EZAudioDisplayLink.m */,
|
||||
66B5CE8C1B002C740046BE9D /* EZAudioFile.h */,
|
||||
66B5CE8D1B002C740046BE9D /* EZAudioFile.m */,
|
||||
66B5CE8E1B002C740046BE9D /* EZAudioFloatConverter.h */,
|
||||
66B5CE8F1B002C740046BE9D /* EZAudioFloatConverter.m */,
|
||||
66B5CE901B002C740046BE9D /* EZAudioFloatData.h */,
|
||||
66B5CE911B002C740046BE9D /* EZAudioFloatData.m */,
|
||||
66B5CE921B002C740046BE9D /* EZAudioPlayer.h */,
|
||||
66B5CE931B002C740046BE9D /* EZAudioPlayer.m */,
|
||||
66B5CE941B002C740046BE9D /* EZAudioPlot.h */,
|
||||
66B5CE951B002C740046BE9D /* EZAudioPlot.m */,
|
||||
66B5CE961B002C740046BE9D /* EZAudioPlotGL.h */,
|
||||
66B5CE971B002C740046BE9D /* EZAudioPlotGL.m */,
|
||||
66B5CE981B002C740046BE9D /* EZAudioPlotGLKViewController.h */,
|
||||
66B5CE991B002C740046BE9D /* EZAudioPlotGLKViewController.m */,
|
||||
66B5CE9A1B002C740046BE9D /* EZAudioUtilities.h */,
|
||||
66B5CE9B1B002C740046BE9D /* EZAudioUtilities.m */,
|
||||
66B5CE9C1B002C740046BE9D /* EZMicrophone.h */,
|
||||
66B5CE9D1B002C740046BE9D /* EZMicrophone.m */,
|
||||
66B5CE9E1B002C740046BE9D /* EZOutput.h */,
|
||||
66B5CE9F1B002C740046BE9D /* EZOutput.m */,
|
||||
66B5CEA01B002C740046BE9D /* EZPlot.h */,
|
||||
66B5CEA11B002C740046BE9D /* EZPlot.m */,
|
||||
66B5CEA21B002C740046BE9D /* EZRecorder.h */,
|
||||
66B5CEA31B002C740046BE9D /* EZRecorder.m */,
|
||||
66B5CEA41B002C740046BE9D /* TPCircularBuffer.c */,
|
||||
66B5CEA51B002C740046BE9D /* TPCircularBuffer.h */,
|
||||
66B5CEA61B002C740046BE9D /* VERSION */,
|
||||
);
|
||||
name = EZAudio;
|
||||
path = ../../../../EZAudio;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
66B5CEA61B002C740046BE9D /* VERSION */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
66B5CEA71B002C750046BE9D /* CHANGELOG */,
|
||||
66B5CEA81B002C750046BE9D /* VERSION */,
|
||||
);
|
||||
path = VERSION;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
94056F71185E593500EB94BA = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -163,11 +226,10 @@
|
||||
94056F83185E593500EB94BA /* EZAudioCoreGraphicsWaveformExample */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9417A7C01867DDD600D9D37B /* EZAudio */,
|
||||
66B5CE861B002C740046BE9D /* EZAudio */,
|
||||
94056F8C185E593500EB94BA /* AppDelegate.h */,
|
||||
94056F8D185E593500EB94BA /* AppDelegate.m */,
|
||||
94056F8F185E593500EB94BA /* Main_iPhone.storyboard */,
|
||||
94056F92185E593500EB94BA /* Main_iPad.storyboard */,
|
||||
66DB85821B0430E70018EFC5 /* MainStoryboard.storyboard */,
|
||||
94056FDC185E59D900EB94BA /* CoreGraphicsWaveformViewController.h */,
|
||||
94056FDD185E59D900EB94BA /* CoreGraphicsWaveformViewController.m */,
|
||||
94056F98185E593500EB94BA /* Images.xcassets */,
|
||||
@@ -205,46 +267,6 @@
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9417A7C01867DDD600D9D37B /* EZAudio */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9417A7C11867DDD600D9D37B /* AEFloatConverter.h */,
|
||||
9417A7C21867DDD600D9D37B /* AEFloatConverter.m */,
|
||||
9417A7C31867DDD600D9D37B /* EZAudio.h */,
|
||||
9417A7C41867DDD600D9D37B /* EZAudio.m */,
|
||||
9417A7C51867DDD600D9D37B /* EZAudioFile.h */,
|
||||
9417A7C61867DDD600D9D37B /* EZAudioFile.m */,
|
||||
9417A7C71867DDD600D9D37B /* EZAudioPlot.h */,
|
||||
9417A7C81867DDD600D9D37B /* EZAudioPlot.m */,
|
||||
9417A7C91867DDD600D9D37B /* EZAudioPlotGL.h */,
|
||||
9417A7CA1867DDD600D9D37B /* EZAudioPlotGL.m */,
|
||||
9417A7CB1867DDD600D9D37B /* EZAudioPlotGLKViewController.h */,
|
||||
9417A7CC1867DDD600D9D37B /* EZAudioPlotGLKViewController.m */,
|
||||
9417A7CD1867DDD600D9D37B /* EZMicrophone.h */,
|
||||
9417A7CE1867DDD600D9D37B /* EZMicrophone.m */,
|
||||
9417A7CF1867DDD600D9D37B /* EZOutput.h */,
|
||||
9417A7D01867DDD600D9D37B /* EZOutput.m */,
|
||||
9417A7D11867DDD600D9D37B /* EZPlot.h */,
|
||||
9417A7D21867DDD600D9D37B /* EZPlot.m */,
|
||||
9417A7D31867DDD600D9D37B /* EZRecorder.h */,
|
||||
9417A7D41867DDD600D9D37B /* EZRecorder.m */,
|
||||
9417A7D51867DDD600D9D37B /* TPCircularBuffer.c */,
|
||||
9417A7D61867DDD600D9D37B /* TPCircularBuffer.h */,
|
||||
9417A7D71867DDD600D9D37B /* VERSION */,
|
||||
);
|
||||
name = EZAudio;
|
||||
path = ../../../../EZAudio;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9417A7D71867DDD600D9D37B /* VERSION */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9417A7D81867DDD600D9D37B /* CHANGELOG */,
|
||||
9417A7D91867DDD600D9D37B /* VERSION */,
|
||||
);
|
||||
path = VERSION;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
@@ -321,12 +343,11 @@
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
94056F94185E593500EB94BA /* Main_iPad.storyboard in Resources */,
|
||||
94056F99185E593500EB94BA /* Images.xcassets in Resources */,
|
||||
94056F91185E593500EB94BA /* Main_iPhone.storyboard in Resources */,
|
||||
9417A7E61867DDD600D9D37B /* VERSION in Resources */,
|
||||
66DB85831B0430E70018EFC5 /* MainStoryboard.storyboard in Resources */,
|
||||
66B5CEB91B002C750046BE9D /* VERSION in Resources */,
|
||||
94056F88185E593500EB94BA /* InfoPlist.strings in Resources */,
|
||||
9417A7E51867DDD600D9D37B /* CHANGELOG in Resources */,
|
||||
66B5CEB81B002C750046BE9D /* CHANGELOG in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -345,20 +366,25 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
9417A7E41867DDD600D9D37B /* TPCircularBuffer.c in Sources */,
|
||||
9417A7E11867DDD600D9D37B /* EZOutput.m in Sources */,
|
||||
9417A7DF1867DDD600D9D37B /* EZAudioPlotGLKViewController.m in Sources */,
|
||||
66B5CEB01B002C750046BE9D /* EZAudioPlotGL.m in Sources */,
|
||||
66B5CEB51B002C750046BE9D /* EZPlot.m in Sources */,
|
||||
94056FDE185E59D900EB94BA /* CoreGraphicsWaveformViewController.m in Sources */,
|
||||
9417A7DA1867DDD600D9D37B /* AEFloatConverter.m in Sources */,
|
||||
66DB85531B0425CB0018EFC5 /* EZAudio.m in Sources */,
|
||||
94056F8E185E593500EB94BA /* AppDelegate.m in Sources */,
|
||||
9417A7DD1867DDD600D9D37B /* EZAudioPlot.m in Sources */,
|
||||
9417A7DC1867DDD600D9D37B /* EZAudioFile.m in Sources */,
|
||||
9417A7DE1867DDD600D9D37B /* EZAudioPlotGL.m in Sources */,
|
||||
66B5CEB31B002C750046BE9D /* EZMicrophone.m in Sources */,
|
||||
66B5CEB71B002C750046BE9D /* TPCircularBuffer.c in Sources */,
|
||||
66B5CEAB1B002C750046BE9D /* EZAudioFile.m in Sources */,
|
||||
66B5CEB21B002C750046BE9D /* EZAudioUtilities.m in Sources */,
|
||||
94056F8A185E593500EB94BA /* main.m in Sources */,
|
||||
9417A7E21867DDD600D9D37B /* EZPlot.m in Sources */,
|
||||
9417A7E01867DDD600D9D37B /* EZMicrophone.m in Sources */,
|
||||
9417A7E31867DDD600D9D37B /* EZRecorder.m in Sources */,
|
||||
9417A7DB1867DDD600D9D37B /* EZAudio.m in Sources */,
|
||||
66B5CEB11B002C750046BE9D /* EZAudioPlotGLKViewController.m in Sources */,
|
||||
66B5CEAE1B002C750046BE9D /* EZAudioPlayer.m in Sources */,
|
||||
66B5CEB61B002C750046BE9D /* EZRecorder.m in Sources */,
|
||||
66B5CEAA1B002C750046BE9D /* EZAudioDevice.m in Sources */,
|
||||
66B5CEAD1B002C750046BE9D /* EZAudioFloatData.m in Sources */,
|
||||
66B5CEAF1B002C750046BE9D /* EZAudioPlot.m in Sources */,
|
||||
66B5CEB41B002C750046BE9D /* EZOutput.m in Sources */,
|
||||
66C82E221B22AA4700B71897 /* EZAudioDisplayLink.m in Sources */,
|
||||
66B5CEAC1B002C750046BE9D /* EZAudioFloatConverter.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -389,22 +415,6 @@
|
||||
name = InfoPlist.strings;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
94056F8F185E593500EB94BA /* Main_iPhone.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
94056F90185E593500EB94BA /* Base */,
|
||||
);
|
||||
name = Main_iPhone.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
94056F92185E593500EB94BA /* Main_iPad.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
94056F93185E593500EB94BA /* Base */,
|
||||
);
|
||||
name = Main_iPad.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
94056FA8185E593500EB94BA /* InfoPlist.strings */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
@@ -495,6 +505,7 @@
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "EZAudioCoreGraphicsWaveformExample/EZAudioCoreGraphicsWaveformExample-Prefix.pch";
|
||||
INFOPLIST_FILE = "EZAudioCoreGraphicsWaveformExample/EZAudioCoreGraphicsWaveformExample-Info.plist";
|
||||
@@ -509,6 +520,7 @@
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "EZAudioCoreGraphicsWaveformExample/EZAudioCoreGraphicsWaveformExample-Prefix.pch";
|
||||
INFOPLIST_FILE = "EZAudioCoreGraphicsWaveformExample/EZAudioCoreGraphicsWaveformExample-Info.plist";
|
||||
|
||||
-84
@@ -1,84 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4514" systemVersion="13A603" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES" initialViewController="BYZ-38-t0r">
|
||||
<dependencies>
|
||||
<deployment defaultVersion="1536" identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3747"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Core Graphics Waveform View Controller-->
|
||||
<scene sceneID="tne-QT-ifu">
|
||||
<objects>
|
||||
<viewController id="BYZ-38-t0r" customClass="CoreGraphicsWaveformViewController" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="Rz3-HH-m41"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="Edn-LO-SgE"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
||||
<rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="KVj-SX-30V" customClass="EZAudioPlot">
|
||||
<rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="HOo-wT-4Gl">
|
||||
<rect key="frame" x="635" y="975" width="113" height="29"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<segments>
|
||||
<segment title="Buffer"/>
|
||||
<segment title="Rolling"/>
|
||||
</segments>
|
||||
<connections>
|
||||
<action selector="changePlotType:" destination="BYZ-38-t0r" eventType="valueChanged" id="u5I-m7-Eca"/>
|
||||
</connections>
|
||||
</segmentedControl>
|
||||
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="IdG-24-t3E">
|
||||
<rect key="frame" x="20" y="973" width="51" height="31"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<connections>
|
||||
<action selector="toggleMicrophone:" destination="BYZ-38-t0r" eventType="valueChanged" id="z0i-Io-nWB"/>
|
||||
</connections>
|
||||
</switch>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Microphone " lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dBJ-Ob-1px">
|
||||
<rect key="frame" x="20" y="944" width="728" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="HOo-wT-4Gl" secondAttribute="trailing" constant="20" id="1bj-GM-5u9"/>
|
||||
<constraint firstItem="dBJ-Ob-1px" firstAttribute="leading" secondItem="KVj-SX-30V" secondAttribute="leading" constant="20" id="FGd-WH-dE1"/>
|
||||
<constraint firstAttribute="trailing" secondItem="dBJ-Ob-1px" secondAttribute="trailing" constant="20" id="LPb-Al-dww"/>
|
||||
<constraint firstItem="IdG-24-t3E" firstAttribute="leading" secondItem="KVj-SX-30V" secondAttribute="leading" constant="20" id="g5e-84-did"/>
|
||||
<constraint firstAttribute="bottom" secondItem="HOo-wT-4Gl" secondAttribute="bottom" constant="21" id="iaS-pz-dXC"/>
|
||||
<constraint firstAttribute="bottom" secondItem="IdG-24-t3E" secondAttribute="bottom" constant="20" id="mks-lI-4PW"/>
|
||||
<constraint firstItem="IdG-24-t3E" firstAttribute="top" secondItem="dBJ-Ob-1px" secondAttribute="bottom" constant="8" id="uLY-bf-9Qc"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="KVj-SX-30V" secondAttribute="bottom" id="Egg-Wh-pwI"/>
|
||||
<constraint firstItem="KVj-SX-30V" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leading" id="LI6-AN-HB1"/>
|
||||
<constraint firstAttribute="trailing" secondItem="KVj-SX-30V" secondAttribute="trailing" id="PDo-8E-1OC"/>
|
||||
<constraint firstItem="KVj-SX-30V" firstAttribute="top" secondItem="8bC-Xf-vdC" secondAttribute="top" id="Z3Y-9k-ddm"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="audioPlot" destination="KVj-SX-30V" id="eVz-n9-mDV"/>
|
||||
<outlet property="microphoneTextLabel" destination="dBJ-Ob-1px" id="IoH-VO-TDK"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="12" y="-240"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<simulatedMetricsContainer key="defaultSimulatedMetrics">
|
||||
<simulatedStatusBarMetrics key="statusBar" statusBarStyle="blackOpaque"/>
|
||||
<simulatedOrientationMetrics key="orientation"/>
|
||||
<simulatedScreenMetrics key="destination"/>
|
||||
</simulatedMetricsContainer>
|
||||
</document>
|
||||
-83
@@ -1,83 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4514" systemVersion="13B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="vXZ-lx-hvc">
|
||||
<dependencies>
|
||||
<deployment defaultVersion="1536" identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3747"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Core Graphics Waveform View Controller-->
|
||||
<scene sceneID="ufC-wZ-h7g">
|
||||
<objects>
|
||||
<viewController id="vXZ-lx-hvc" customClass="CoreGraphicsWaveformViewController" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="Nwm-1t-jcl"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="CCw-11-X3I"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="kh9-bI-dsS">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Lov-Wi-Vvt" customClass="EZAudioPlot">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="1wx-ee-ueV">
|
||||
<rect key="frame" x="187" y="520" width="113" height="29"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<segments>
|
||||
<segment title="Buffer"/>
|
||||
<segment title="Rolling"/>
|
||||
</segments>
|
||||
<connections>
|
||||
<action selector="changePlotType:" destination="vXZ-lx-hvc" eventType="valueChanged" id="qXy-P2-qRD"/>
|
||||
</connections>
|
||||
</segmentedControl>
|
||||
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="VE3-BA-g0H">
|
||||
<rect key="frame" x="20" y="518" width="51" height="31"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<connections>
|
||||
<action selector="toggleMicrophone:" destination="vXZ-lx-hvc" eventType="valueChanged" id="g7h-Lo-Tgb"/>
|
||||
</connections>
|
||||
</switch>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Microphone " lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kxf-bG-JhL">
|
||||
<rect key="frame" x="20" y="489" width="280" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="1wx-ee-ueV" secondAttribute="bottom" constant="20" id="9pP-2T-cLA"/>
|
||||
<constraint firstAttribute="bottom" secondItem="VE3-BA-g0H" secondAttribute="bottom" constant="19" id="CVg-bB-cdA"/>
|
||||
<constraint firstAttribute="trailing" secondItem="1wx-ee-ueV" secondAttribute="trailing" constant="20" id="DRf-ak-ETh"/>
|
||||
<constraint firstItem="kxf-bG-JhL" firstAttribute="leading" secondItem="Lov-Wi-Vvt" secondAttribute="leading" constant="20" id="Yzv-Os-lMH"/>
|
||||
<constraint firstItem="VE3-BA-g0H" firstAttribute="top" secondItem="kxf-bG-JhL" secondAttribute="bottom" constant="8" id="cvW-wO-CN2"/>
|
||||
<constraint firstItem="VE3-BA-g0H" firstAttribute="leading" secondItem="Lov-Wi-Vvt" secondAttribute="leading" constant="20" id="jkK-gD-wjZ"/>
|
||||
<constraint firstAttribute="trailing" secondItem="kxf-bG-JhL" secondAttribute="trailing" constant="20" id="sJW-wY-kEG"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="Lov-Wi-Vvt" secondAttribute="bottom" id="3Yc-cq-XvW"/>
|
||||
<constraint firstItem="Lov-Wi-Vvt" firstAttribute="top" secondItem="kh9-bI-dsS" secondAttribute="top" id="Rgw-Gl-Z34"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Lov-Wi-Vvt" secondAttribute="trailing" id="U0V-RG-CC7"/>
|
||||
<constraint firstItem="Lov-Wi-Vvt" firstAttribute="leading" secondItem="kh9-bI-dsS" secondAttribute="leading" id="qxO-x5-Knu"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="audioPlot" destination="Lov-Wi-Vvt" id="Jbc-y7-FfI"/>
|
||||
<outlet property="microphoneTextLabel" destination="kxf-bG-JhL" id="ZwY-xe-xeV"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
</scene>
|
||||
</scenes>
|
||||
<simulatedMetricsContainer key="defaultSimulatedMetrics">
|
||||
<simulatedStatusBarMetrics key="statusBar"/>
|
||||
<simulatedOrientationMetrics key="orientation"/>
|
||||
<simulatedScreenMetrics key="destination" type="retina4"/>
|
||||
</simulatedMetricsContainer>
|
||||
</document>
|
||||
+39
-5
@@ -14,28 +14,62 @@
|
||||
/**
|
||||
We will allow this view controller to act as an EZMicrophoneDelegate. This is how we listen for the microphone callback.
|
||||
*/
|
||||
@interface CoreGraphicsWaveformViewController : UIViewController <EZMicrophoneDelegate>
|
||||
@interface CoreGraphicsWaveformViewController : UIViewController <EZMicrophoneDelegate,
|
||||
UIPickerViewDataSource,
|
||||
UIPickerViewDelegate>
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Components
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
The CoreGraphics based audio plot
|
||||
*/
|
||||
@property (nonatomic,weak) IBOutlet EZAudioPlot *audioPlot;
|
||||
@property (nonatomic, weak) IBOutlet EZAudioPlot *audioPlot;
|
||||
|
||||
/**
|
||||
The microphone component
|
||||
*/
|
||||
@property (nonatomic,strong) EZMicrophone *microphone;
|
||||
@property (nonatomic, strong) EZMicrophone *microphone;
|
||||
|
||||
/**
|
||||
The button at the bottom displaying the currently selected microphone input
|
||||
*/
|
||||
@property (nonatomic, weak) IBOutlet UIButton *microphoneInputToggleButton;
|
||||
|
||||
/**
|
||||
The microphone input picker view to display the different microphone input sources
|
||||
*/
|
||||
@property (nonatomic, weak) IBOutlet UIPickerView *microphoneInputPickerView;
|
||||
|
||||
/**
|
||||
The microphone input picker view's top layout constraint (we use this to hide the control)
|
||||
*/
|
||||
@property (nonatomic, weak) IBOutlet NSLayoutConstraint *microphoneInputPickerViewTopConstraint;
|
||||
|
||||
/**
|
||||
The text label displaying "Microphone On" or "Microphone Off"
|
||||
*/
|
||||
@property (nonatomic, weak) IBOutlet UILabel *microphoneTextLabel;
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Actions
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Switches the plot drawing type between a buffer plot (visualizes the current stream of audio data from the update function) or a rolling plot (visualizes the audio data over time, this is the classic waveform look)
|
||||
*/
|
||||
-(IBAction)changePlotType:(id)sender;
|
||||
- (IBAction)changePlotType:(id)sender;
|
||||
|
||||
/**
|
||||
Toggles the microphone on and off. When the microphone is on it will send its delegate (aka this view controller) the audio data in various ways (check out the EZMicrophoneDelegate documentation for more details);
|
||||
*/
|
||||
-(IBAction)toggleMicrophone:(id)sender;
|
||||
- (IBAction)toggleMicrophonePickerView:(id)sender;
|
||||
|
||||
/**
|
||||
Toggles the microphone on and off. When the microphone is on it will send its delegate (aka this view controller) the audio data in various ways (check out the EZMicrophoneDelegate documentation for more details);
|
||||
*/
|
||||
- (IBAction)toggleMicrophone:(id)sender;
|
||||
|
||||
@end
|
||||
|
||||
+257
-108
@@ -8,142 +8,291 @@
|
||||
|
||||
#import "CoreGraphicsWaveformViewController.h"
|
||||
|
||||
@interface CoreGraphicsWaveformViewController (){
|
||||
float scale;
|
||||
}
|
||||
#pragma mark - UI Extras
|
||||
@property (nonatomic,weak) IBOutlet UILabel *microphoneTextLabel;
|
||||
@interface CoreGraphicsWaveformViewController ()
|
||||
@property (nonatomic, strong) NSArray *inputs;
|
||||
@end
|
||||
|
||||
@implementation CoreGraphicsWaveformViewController
|
||||
@synthesize audioPlot;
|
||||
@synthesize microphone;
|
||||
|
||||
#pragma mark - Initialization
|
||||
-(id)init {
|
||||
self = [super init];
|
||||
if(self){
|
||||
[self initializeViewController];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(id)initWithCoder:(NSCoder *)aDecoder {
|
||||
self = [super initWithCoder:aDecoder];
|
||||
if(self){
|
||||
[self initializeViewController];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Initialize View Controller Here
|
||||
-(void)initializeViewController {
|
||||
// Create an instance of the microphone and tell it to use this view controller instance as the delegate
|
||||
self.microphone = [EZMicrophone microphoneWithDelegate:self];
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - View Style
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (UIStatusBarStyle)preferredStatusBarStyle
|
||||
{
|
||||
return UIStatusBarStyleLightContent;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Customize the Audio Plot
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
|
||||
/*
|
||||
Customizing the audio plot's look
|
||||
*/
|
||||
// Background color
|
||||
self.audioPlot.backgroundColor = [UIColor colorWithRed:0.984 green:0.471 blue:0.525 alpha:1.0];
|
||||
// Waveform color
|
||||
self.audioPlot.color = [UIColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:1.0];
|
||||
// Plot type
|
||||
self.audioPlot.plotType = EZPlotTypeBuffer;
|
||||
|
||||
/*
|
||||
Start the microphone
|
||||
*/
|
||||
[self.microphone startFetchingAudio];
|
||||
self.microphoneTextLabel.text = @"Microphone On";
|
||||
|
||||
}
|
||||
|
||||
-(void)pinch:(UIPinchGestureRecognizer*)pinch {
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - Actions
|
||||
-(void)changePlotType:(id)sender {
|
||||
NSInteger selectedSegment = [sender selectedSegmentIndex];
|
||||
switch(selectedSegment){
|
||||
case 0:
|
||||
[self drawBufferPlot];
|
||||
break;
|
||||
case 1:
|
||||
[self drawRollingPlot];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
-(void)toggleMicrophone:(id)sender {
|
||||
if( ![(UISwitch*)sender isOn] ){
|
||||
[self.microphone stopFetchingAudio];
|
||||
self.microphoneTextLabel.text = @"Microphone Off";
|
||||
}
|
||||
else {
|
||||
[super viewDidLoad];
|
||||
|
||||
//
|
||||
// Setup the AVAudioSession. EZMicrophone will not work properly on iOS
|
||||
// if you don't do this!
|
||||
//
|
||||
AVAudioSession *session = [AVAudioSession sharedInstance];
|
||||
NSError *error;
|
||||
[session setCategory:AVAudioSessionCategoryPlayAndRecord error:&error];
|
||||
if (error)
|
||||
{
|
||||
NSLog(@"Error setting up audio session category: %@", error.localizedDescription);
|
||||
}
|
||||
[session setActive:YES error:&error];
|
||||
if (error)
|
||||
{
|
||||
NSLog(@"Error setting up audio session active: %@", error.localizedDescription);
|
||||
}
|
||||
|
||||
//
|
||||
// Customizing the audio plot's look
|
||||
//
|
||||
// Background color
|
||||
self.audioPlot.backgroundColor = [UIColor colorWithRed:0.984 green:0.471 blue:0.525 alpha:1.0];
|
||||
|
||||
// Waveform color
|
||||
self.audioPlot.color = [UIColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:1.0];
|
||||
|
||||
// Plot type
|
||||
self.audioPlot.plotType = EZPlotTypeBuffer;
|
||||
|
||||
//
|
||||
// Create the microphone
|
||||
//
|
||||
self.microphone = [EZMicrophone microphoneWithDelegate:self];
|
||||
|
||||
//
|
||||
// Set up the microphone input UIPickerView items to select
|
||||
// between different microphone inputs. Here what we're doing behind the hood
|
||||
// is enumerating the available inputs provided by the AVAudioSession.
|
||||
//
|
||||
self.inputs = [EZAudioDevice inputDevices];
|
||||
self.microphoneInputPickerView.dataSource = self;
|
||||
self.microphoneInputPickerView.delegate = self;
|
||||
|
||||
//
|
||||
// Start the microphone
|
||||
//
|
||||
[self.microphone startFetchingAudio];
|
||||
self.microphoneTextLabel.text = @"Microphone On";
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Action Extensions
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - UIPickerViewDataSource
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (NSString *)pickerView:(UIPickerView *)pickerView
|
||||
titleForRow:(NSInteger)row
|
||||
forComponent:(NSInteger)component
|
||||
{
|
||||
EZAudioDevice *device = self.inputs[row];
|
||||
return device.name;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (NSAttributedString *)pickerView:(UIPickerView *)pickerView
|
||||
attributedTitleForRow:(NSInteger)row
|
||||
forComponent:(NSInteger)component
|
||||
{
|
||||
EZAudioDevice *device = self.inputs[row];
|
||||
UIColor *textColor = [device isEqual:self.microphone.device] ? self.audioPlot.backgroundColor : [UIColor blackColor];
|
||||
return [[NSAttributedString alloc] initWithString:device.name
|
||||
attributes:@{ NSForegroundColorAttributeName : textColor }];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component
|
||||
{
|
||||
return self.inputs.count;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component
|
||||
{
|
||||
EZAudioDevice *device = self.inputs[row];
|
||||
[self.microphone setDevice:device];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Actions
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)changePlotType:(id)sender
|
||||
{
|
||||
NSInteger selectedSegment = [sender selectedSegmentIndex];
|
||||
switch (selectedSegment)
|
||||
{
|
||||
case 0:
|
||||
[self drawBufferPlot];
|
||||
break;
|
||||
case 1:
|
||||
[self drawRollingPlot];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)toggleMicrophone:(id)sender
|
||||
{
|
||||
BOOL isOn = [sender isOn];
|
||||
if (!isOn)
|
||||
{
|
||||
[self.microphone stopFetchingAudio];
|
||||
self.microphoneTextLabel.text = @"Microphone Off";
|
||||
}
|
||||
else
|
||||
{
|
||||
[self.microphone startFetchingAudio];
|
||||
self.microphoneTextLabel.text = @"Microphone On";
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)toggleMicrophonePickerView:(id)sender
|
||||
{
|
||||
BOOL isHidden = self.microphoneInputPickerViewTopConstraint.constant != 0.0;
|
||||
[self setMicrophonePickerViewHidden:!isHidden];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)setMicrophonePickerViewHidden:(BOOL)hidden
|
||||
{
|
||||
CGFloat pickerHeight = CGRectGetHeight(self.microphoneInputPickerView.bounds);
|
||||
__weak typeof(self) weakSelf = self;
|
||||
[UIView animateWithDuration:0.55
|
||||
delay:0.0
|
||||
usingSpringWithDamping:0.6
|
||||
initialSpringVelocity:0.5
|
||||
options:(UIViewAnimationOptionBeginFromCurrentState|
|
||||
UIViewAnimationOptionCurveEaseInOut|
|
||||
UIViewAnimationOptionLayoutSubviews)
|
||||
animations:^{
|
||||
weakSelf.microphoneInputPickerViewTopConstraint.constant = hidden ? -pickerHeight : 0.0f;
|
||||
[weakSelf.view layoutSubviews];
|
||||
} completion:nil];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Utility
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
Give the visualization of the current buffer (this is almost exactly the openFrameworks audio input eample)
|
||||
*/
|
||||
-(void)drawBufferPlot {
|
||||
// Change the plot type to the buffer plot
|
||||
self.audioPlot.plotType = EZPlotTypeBuffer;
|
||||
// Don't mirror over the x-axis
|
||||
self.audioPlot.shouldMirror = NO;
|
||||
// Don't fill
|
||||
self.audioPlot.shouldFill = NO;
|
||||
- (void)drawBufferPlot
|
||||
{
|
||||
self.audioPlot.plotType = EZPlotTypeBuffer;
|
||||
self.audioPlot.shouldMirror = NO;
|
||||
self.audioPlot.shouldFill = NO;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
Give the classic mirrored, rolling waveform look
|
||||
*/
|
||||
-(void)drawRollingPlot {
|
||||
self.audioPlot.plotType = EZPlotTypeRolling;
|
||||
self.audioPlot.shouldFill = YES;
|
||||
self.audioPlot.shouldMirror = YES;
|
||||
-(void)drawRollingPlot
|
||||
{
|
||||
self.audioPlot.plotType = EZPlotTypeRolling;
|
||||
self.audioPlot.shouldFill = YES;
|
||||
self.audioPlot.shouldMirror = YES;
|
||||
}
|
||||
|
||||
#pragma mark - EZMicrophoneDelegate
|
||||
#warning Thread Safety
|
||||
// Note that any callback that provides streamed audio data (like streaming microphone input) happens on a separate audio thread that should not be blocked. When we feed audio data into any of the UI components we need to explicity create a GCD block on the main thread to properly get the UI to work.
|
||||
-(void)microphone:(EZMicrophone *)microphone
|
||||
hasAudioReceived:(float **)buffer
|
||||
withBufferSize:(UInt32)bufferSize
|
||||
withNumberOfChannels:(UInt32)numberOfChannels {
|
||||
// Getting audio data as an array of float buffer arrays. What does that mean? Because the audio is coming in as a stereo signal the data is split into a left and right channel. So buffer[0] corresponds to the float* data for the left channel while buffer[1] corresponds to the float* data for the right channel.
|
||||
|
||||
// See the Thread Safety warning above, but in a nutshell these callbacks happen on a separate audio thread. We wrap any UI updating in a GCD block on the main thread to avoid blocking that audio flow.
|
||||
dispatch_async(dispatch_get_main_queue(),^{
|
||||
// All the audio plot needs is the buffer data (float*) and the size. Internally the audio plot will handle all the drawing related code, history management, and freeing its own resources. Hence, one badass line of code gets you a pretty plot :)
|
||||
[self.audioPlot updateBuffer:buffer[0] withBufferSize:bufferSize];
|
||||
});
|
||||
// Note that any callback that provides streamed audio data (like streaming
|
||||
// microphone input) happens on a separate audio thread that should not be
|
||||
// blocked. When we feed audio data into any of the UI components we need to
|
||||
// explicity create a GCD block on the main thread to properly get the UI
|
||||
// to work.
|
||||
- (void)microphone:(EZMicrophone *)microphone
|
||||
hasAudioReceived:(float **)buffer
|
||||
withBufferSize:(UInt32)bufferSize
|
||||
withNumberOfChannels:(UInt32)numberOfChannels
|
||||
{
|
||||
// Getting audio data as an array of float buffer arrays. What does that mean?
|
||||
// Because the audio is coming in as a stereo signal the data is split into
|
||||
// a left and right channel. So buffer[0] corresponds to the float* data
|
||||
// for the left channel while buffer[1] corresponds to the float* data
|
||||
// for the right channel.
|
||||
|
||||
// See the Thread Safety warning above, but in a nutshell these callbacks
|
||||
// happen on a separate audio thread. We wrap any UI updating in a GCD block
|
||||
// on the main thread to avoid blocking that audio flow.
|
||||
__weak typeof (self) weakSelf = self;
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
// All the audio plot needs is the buffer data (float*) and the size.
|
||||
// Internally the audio plot will handle all the drawing related code,
|
||||
// history management, and freeing its own resources.
|
||||
// Hence, one badass line of code gets you a pretty plot :)
|
||||
[weakSelf.audioPlot updateBuffer:buffer[0] withBufferSize:bufferSize];
|
||||
});
|
||||
}
|
||||
|
||||
-(void)microphone:(EZMicrophone *)microphone hasAudioStreamBasicDescription:(AudioStreamBasicDescription)audioStreamBasicDescription {
|
||||
// The AudioStreamBasicDescription of the microphone stream. This is useful when configuring the EZRecorder or telling another component what audio format type to expect.
|
||||
// Here's a print function to allow you to inspect it a little easier
|
||||
[EZAudio printASBD:audioStreamBasicDescription];
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)microphone:(EZMicrophone *)microphone hasAudioStreamBasicDescription:(AudioStreamBasicDescription)audioStreamBasicDescription
|
||||
{
|
||||
// The AudioStreamBasicDescription of the microphone stream. This is useful
|
||||
// when configuring the EZRecorder or telling another component what
|
||||
// audio format type to expect.
|
||||
[EZAudioUtilities printASBD:audioStreamBasicDescription];
|
||||
}
|
||||
|
||||
-(void)microphone:(EZMicrophone *)microphone
|
||||
hasBufferList:(AudioBufferList *)bufferList
|
||||
withBufferSize:(UInt32)bufferSize
|
||||
withNumberOfChannels:(UInt32)numberOfChannels {
|
||||
// Getting audio data as a buffer list that can be directly fed into the EZRecorder or EZOutput. Say whattt...
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)microphone:(EZMicrophone *)microphone
|
||||
hasBufferList:(AudioBufferList *)bufferList
|
||||
withBufferSize:(UInt32)bufferSize
|
||||
withNumberOfChannels:(UInt32)numberOfChannels
|
||||
{
|
||||
// Getting audio data as a buffer list that can be directly fed into the
|
||||
// EZRecorder or EZOutput. Say whattt...
|
||||
}
|
||||
|
||||
@end
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)microphone:(EZMicrophone *)microphone changedDevice:(EZAudioDevice *)device
|
||||
{
|
||||
NSLog(@"Microphone changed device: %@", device.name);
|
||||
|
||||
// Called anytime the microphone's device changes
|
||||
__weak typeof(self) weakSelf = self;
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
NSString *name = device.name;
|
||||
NSString *tapText = @" (Tap To Change)";
|
||||
NSString *microphoneInputToggleButtonText = [NSString stringWithFormat:@"%@%@", device.name, tapText];
|
||||
NSRange rangeOfName = [microphoneInputToggleButtonText rangeOfString:name];
|
||||
NSMutableAttributedString *microphoneInputToggleButtonAttributedText = [[NSMutableAttributedString alloc] initWithString:microphoneInputToggleButtonText];
|
||||
[microphoneInputToggleButtonAttributedText addAttribute:NSFontAttributeName value:[UIFont boldSystemFontOfSize:13.0f] range:rangeOfName];
|
||||
[weakSelf.microphoneInputToggleButton setAttributedTitle:microphoneInputToggleButtonAttributedText forState:UIControlStateNormal];
|
||||
|
||||
// reset the device list (a device may have been plugged in/out)
|
||||
weakSelf.inputs = [EZAudioDevice inputDevices];
|
||||
[weakSelf.microphoneInputPickerView reloadAllComponents];
|
||||
[weakSelf setMicrophonePickerViewHidden:YES];
|
||||
});
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@end
|
||||
+2
-2
@@ -25,9 +25,9 @@
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main_iPhone</string>
|
||||
<string>MainStoryboard</string>
|
||||
<key>UIMainStoryboardFile~ipad</key>
|
||||
<string>Main_iPad</string>
|
||||
<string>MainStoryboard</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
|
||||
+5
@@ -15,6 +15,11 @@
|
||||
"size" : "60x60",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "60x60",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "29x29",
|
||||
|
||||
+102
@@ -0,0 +1,102 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7702" systemVersion="14C109" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="uAJ-Uz-eFq">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7701"/>
|
||||
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Core Graphics Waveform View Controller-->
|
||||
<scene sceneID="d5F-Cu-PN5">
|
||||
<objects>
|
||||
<viewController id="uAJ-Uz-eFq" customClass="CoreGraphicsWaveformViewController" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="Z2u-WA-u3Y"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="eTB-c6-hqM"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="LZk-FQ-Roy">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="PTM-3g-RZx" customClass="EZAudioPlot">
|
||||
<rect key="frame" x="0.0" y="-54" width="600" height="654"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="82V-bR-cRo">
|
||||
<rect key="frame" x="16" y="520" width="157" height="29"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="157" id="6BL-nE-ONH"/>
|
||||
</constraints>
|
||||
<segments>
|
||||
<segment title="Buffer"/>
|
||||
<segment title="Rolling"/>
|
||||
</segments>
|
||||
<color key="tintColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<connections>
|
||||
<action selector="changePlotType:" destination="uAJ-Uz-eFq" eventType="valueChanged" id="loR-vI-Hcz"/>
|
||||
</connections>
|
||||
</segmentedControl>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="roundedRect" showsTouchWhenHighlighted="YES" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="iZQ-my-xGs">
|
||||
<rect key="frame" x="16" y="556" width="568" height="28"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="13"/>
|
||||
<color key="tintColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<state key="normal" title="Change Microphone Input">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="toggleMicrophonePickerView:" destination="uAJ-Uz-eFq" eventType="touchUpInside" id="uwB-mw-2Ac"/>
|
||||
</connections>
|
||||
</button>
|
||||
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="YOL-mD-qlh">
|
||||
<rect key="frame" x="16" y="479" width="51" height="31"/>
|
||||
<color key="onTintColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<connections>
|
||||
<action selector="toggleMicrophone:" destination="uAJ-Uz-eFq" eventType="touchUpInside" id="5TS-5b-eln"/>
|
||||
</connections>
|
||||
</switch>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qEV-qa-XcB">
|
||||
<rect key="frame" x="73" y="487" width="33" height="16"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="13"/>
|
||||
<color key="textColor" red="1" green="1" blue="1" alpha="0.90000000000000002" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<pickerView contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="5do-cK-DtK">
|
||||
<rect key="frame" x="0.0" y="-216" width="600" height="162"/>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</pickerView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="82V-bR-cRo" firstAttribute="leading" secondItem="LZk-FQ-Roy" secondAttribute="leading" constant="16" id="6Yn-aJ-OO7"/>
|
||||
<constraint firstItem="PTM-3g-RZx" firstAttribute="leading" secondItem="LZk-FQ-Roy" secondAttribute="leading" id="D1v-FC-xCQ"/>
|
||||
<constraint firstItem="82V-bR-cRo" firstAttribute="top" secondItem="YOL-mD-qlh" secondAttribute="bottom" constant="10" id="Q6t-KE-QM6"/>
|
||||
<constraint firstItem="eTB-c6-hqM" firstAttribute="top" secondItem="PTM-3g-RZx" secondAttribute="bottom" id="Qdf-yH-08h"/>
|
||||
<constraint firstAttribute="trailing" secondItem="5do-cK-DtK" secondAttribute="trailing" id="TFf-n7-Lar"/>
|
||||
<constraint firstItem="qEV-qa-XcB" firstAttribute="leading" secondItem="YOL-mD-qlh" secondAttribute="trailing" constant="8" symbolic="YES" id="TTM-IM-GgG"/>
|
||||
<constraint firstItem="eTB-c6-hqM" firstAttribute="top" secondItem="iZQ-my-xGs" secondAttribute="bottom" constant="16" id="VDh-aa-K3c"/>
|
||||
<constraint firstItem="YOL-mD-qlh" firstAttribute="leading" secondItem="82V-bR-cRo" secondAttribute="leading" id="Ybz-Ri-nBr"/>
|
||||
<constraint firstItem="iZQ-my-xGs" firstAttribute="leading" secondItem="LZk-FQ-Roy" secondAttribute="leading" constant="16" id="aFq-vx-F9B"/>
|
||||
<constraint firstItem="5do-cK-DtK" firstAttribute="leading" secondItem="LZk-FQ-Roy" secondAttribute="leading" id="aos-wc-RIm"/>
|
||||
<constraint firstAttribute="trailing" secondItem="PTM-3g-RZx" secondAttribute="trailing" id="duY-lt-nwK"/>
|
||||
<constraint firstItem="PTM-3g-RZx" firstAttribute="top" secondItem="5do-cK-DtK" secondAttribute="bottom" id="glD-k0-v7v"/>
|
||||
<constraint firstItem="82V-bR-cRo" firstAttribute="top" secondItem="qEV-qa-XcB" secondAttribute="bottom" constant="17" id="hN9-AW-5mr"/>
|
||||
<constraint firstItem="5do-cK-DtK" firstAttribute="top" secondItem="LZk-FQ-Roy" secondAttribute="topMargin" constant="-216" id="j80-5N-His"/>
|
||||
<constraint firstItem="iZQ-my-xGs" firstAttribute="top" secondItem="82V-bR-cRo" secondAttribute="bottom" constant="8" id="jPu-90-foy"/>
|
||||
<constraint firstAttribute="trailing" secondItem="iZQ-my-xGs" secondAttribute="trailing" constant="16" id="rc6-RC-Rjr"/>
|
||||
<constraint firstItem="YOL-mD-qlh" firstAttribute="leading" secondItem="LZk-FQ-Roy" secondAttribute="leading" constant="16" id="vIP-WC-7w4"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="audioPlot" destination="PTM-3g-RZx" id="XT9-Ss-mS5"/>
|
||||
<outlet property="microphoneInputPickerView" destination="5do-cK-DtK" id="nuC-9V-HG0"/>
|
||||
<outlet property="microphoneInputPickerViewTopConstraint" destination="j80-5N-His" id="Uk4-Us-ADc"/>
|
||||
<outlet property="microphoneInputToggleButton" destination="iZQ-my-xGs" id="rkU-w0-Xqo"/>
|
||||
<outlet property="microphoneTextLabel" destination="qEV-qa-XcB" id="5id-wg-zWA"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="Vws-3v-CE5" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="574" y="89"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
||||
+5
-5
@@ -10,29 +10,29 @@
|
||||
<string>EZAudioExamplesiOS</string>
|
||||
<key>IDESourceControlProjectOriginsDictionary</key>
|
||||
<dict>
|
||||
<key>F77EC8D9-F815-4829-9274-5DA08EA98D6B</key>
|
||||
<key>9D6FF97A89F512CD81EAE1A971A1D2EB03E03F7C</key>
|
||||
<string>https://github.com/syedhali/EZAudio.git</string>
|
||||
</dict>
|
||||
<key>IDESourceControlProjectPath</key>
|
||||
<string>EZAudioExamples/iOS/EZAudioExamplesiOS.xcworkspace</string>
|
||||
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
|
||||
<dict>
|
||||
<key>F77EC8D9-F815-4829-9274-5DA08EA98D6B</key>
|
||||
<key>9D6FF97A89F512CD81EAE1A971A1D2EB03E03F7C</key>
|
||||
<string>../../..</string>
|
||||
</dict>
|
||||
<key>IDESourceControlProjectURL</key>
|
||||
<string>https://github.com/syedhali/EZAudio.git</string>
|
||||
<key>IDESourceControlProjectVersion</key>
|
||||
<integer>110</integer>
|
||||
<integer>111</integer>
|
||||
<key>IDESourceControlProjectWCCIdentifier</key>
|
||||
<string>F77EC8D9-F815-4829-9274-5DA08EA98D6B</string>
|
||||
<string>9D6FF97A89F512CD81EAE1A971A1D2EB03E03F7C</string>
|
||||
<key>IDESourceControlProjectWCConfigurations</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
|
||||
<string>public.vcs.git</string>
|
||||
<key>IDESourceControlWCCIdentifierKey</key>
|
||||
<string>F77EC8D9-F815-4829-9274-5DA08EA98D6B</string>
|
||||
<string>9D6FF97A89F512CD81EAE1A971A1D2EB03E03F7C</string>
|
||||
<key>IDESourceControlWCCName</key>
|
||||
<string>EZAudio</string>
|
||||
</dict>
|
||||
|
||||
BIN
Binary file not shown.
+125
-115
@@ -7,14 +7,31 @@
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
66C82E861B23D26400B71897 /* EZAudio.m in Sources */ = {isa = PBXBuildFile; fileRef = 66C82E641B23D26400B71897 /* EZAudio.m */; };
|
||||
66C82E871B23D26400B71897 /* EZAudioDevice.m in Sources */ = {isa = PBXBuildFile; fileRef = 66C82E661B23D26400B71897 /* EZAudioDevice.m */; };
|
||||
66C82E881B23D26400B71897 /* EZAudioDisplayLink.m in Sources */ = {isa = PBXBuildFile; fileRef = 66C82E681B23D26400B71897 /* EZAudioDisplayLink.m */; };
|
||||
66C82E891B23D26400B71897 /* EZAudioFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 66C82E6A1B23D26400B71897 /* EZAudioFile.m */; };
|
||||
66C82E8A1B23D26400B71897 /* EZAudioFloatConverter.m in Sources */ = {isa = PBXBuildFile; fileRef = 66C82E6C1B23D26400B71897 /* EZAudioFloatConverter.m */; };
|
||||
66C82E8B1B23D26400B71897 /* EZAudioFloatData.m in Sources */ = {isa = PBXBuildFile; fileRef = 66C82E6E1B23D26400B71897 /* EZAudioFloatData.m */; };
|
||||
66C82E8C1B23D26400B71897 /* EZAudioPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 66C82E701B23D26400B71897 /* EZAudioPlayer.m */; };
|
||||
66C82E8D1B23D26400B71897 /* EZAudioPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 66C82E721B23D26400B71897 /* EZAudioPlot.m */; };
|
||||
66C82E8E1B23D26400B71897 /* EZAudioPlotGL.m in Sources */ = {isa = PBXBuildFile; fileRef = 66C82E741B23D26400B71897 /* EZAudioPlotGL.m */; };
|
||||
66C82E8F1B23D26400B71897 /* EZAudioPlotGLKViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 66C82E761B23D26400B71897 /* EZAudioPlotGLKViewController.m */; };
|
||||
66C82E901B23D26400B71897 /* EZAudioUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 66C82E781B23D26400B71897 /* EZAudioUtilities.m */; };
|
||||
66C82E911B23D26400B71897 /* EZMicrophone.m in Sources */ = {isa = PBXBuildFile; fileRef = 66C82E7A1B23D26400B71897 /* EZMicrophone.m */; };
|
||||
66C82E921B23D26400B71897 /* EZOutput.m in Sources */ = {isa = PBXBuildFile; fileRef = 66C82E7C1B23D26400B71897 /* EZOutput.m */; };
|
||||
66C82E931B23D26400B71897 /* EZPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 66C82E7E1B23D26400B71897 /* EZPlot.m */; };
|
||||
66C82E941B23D26400B71897 /* EZRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 66C82E801B23D26400B71897 /* EZRecorder.m */; };
|
||||
66C82E951B23D26400B71897 /* TPCircularBuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 66C82E811B23D26400B71897 /* TPCircularBuffer.c */; };
|
||||
66C82E961B23D26400B71897 /* CHANGELOG in Resources */ = {isa = PBXBuildFile; fileRef = 66C82E841B23D26400B71897 /* CHANGELOG */; };
|
||||
66C82E971B23D26400B71897 /* VERSION in Resources */ = {isa = PBXBuildFile; fileRef = 66C82E851B23D26400B71897 /* VERSION */; };
|
||||
66DB85B81B05714F0018EFC5 /* MainStoryboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 66DB85B71B05714F0018EFC5 /* MainStoryboard.storyboard */; };
|
||||
94056FEC185E5EAF00EB94BA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94056FEB185E5EAF00EB94BA /* Foundation.framework */; };
|
||||
94056FEE185E5EAF00EB94BA /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94056FED185E5EAF00EB94BA /* CoreGraphics.framework */; };
|
||||
94056FF0185E5EAF00EB94BA /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94056FEF185E5EAF00EB94BA /* UIKit.framework */; };
|
||||
94056FF6185E5EAF00EB94BA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 94056FF4185E5EAF00EB94BA /* InfoPlist.strings */; };
|
||||
94056FF8185E5EAF00EB94BA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 94056FF7185E5EAF00EB94BA /* main.m */; };
|
||||
94056FFC185E5EAF00EB94BA /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 94056FFB185E5EAF00EB94BA /* AppDelegate.m */; };
|
||||
94056FFF185E5EAF00EB94BA /* Main_iPhone.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 94056FFD185E5EAF00EB94BA /* Main_iPhone.storyboard */; };
|
||||
94057002185E5EAF00EB94BA /* Main_iPad.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 94057000185E5EAF00EB94BA /* Main_iPad.storyboard */; };
|
||||
94057007185E5EAF00EB94BA /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 94057006185E5EAF00EB94BA /* Images.xcassets */; };
|
||||
9405700E185E5EAF00EB94BA /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9405700D185E5EAF00EB94BA /* XCTest.framework */; };
|
||||
9405700F185E5EAF00EB94BA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94056FEB185E5EAF00EB94BA /* Foundation.framework */; };
|
||||
@@ -24,19 +41,6 @@
|
||||
94057050185E636100EB94BA /* OpenGLWaveformViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9405704F185E636100EB94BA /* OpenGLWaveformViewController.m */; };
|
||||
9417A6CB18658FC900D9D37B /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9417A6CA18658FC900D9D37B /* AudioToolbox.framework */; };
|
||||
9417A6CD18658FCD00D9D37B /* GLKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9417A6CC18658FCD00D9D37B /* GLKit.framework */; };
|
||||
9417A8011867DDE300D9D37B /* AEFloatConverter.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7E91867DDE300D9D37B /* AEFloatConverter.m */; };
|
||||
9417A8021867DDE300D9D37B /* EZAudio.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7EB1867DDE300D9D37B /* EZAudio.m */; };
|
||||
9417A8031867DDE300D9D37B /* EZAudioFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7ED1867DDE300D9D37B /* EZAudioFile.m */; };
|
||||
9417A8041867DDE300D9D37B /* EZAudioPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7EF1867DDE300D9D37B /* EZAudioPlot.m */; };
|
||||
9417A8051867DDE300D9D37B /* EZAudioPlotGL.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7F11867DDE300D9D37B /* EZAudioPlotGL.m */; };
|
||||
9417A8061867DDE300D9D37B /* EZAudioPlotGLKViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7F31867DDE300D9D37B /* EZAudioPlotGLKViewController.m */; };
|
||||
9417A8071867DDE300D9D37B /* EZMicrophone.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7F51867DDE300D9D37B /* EZMicrophone.m */; };
|
||||
9417A8081867DDE300D9D37B /* EZOutput.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7F71867DDE300D9D37B /* EZOutput.m */; };
|
||||
9417A8091867DDE300D9D37B /* EZPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7F91867DDE300D9D37B /* EZPlot.m */; };
|
||||
9417A80A1867DDE300D9D37B /* EZRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7FB1867DDE300D9D37B /* EZRecorder.m */; };
|
||||
9417A80B1867DDE300D9D37B /* TPCircularBuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 9417A7FC1867DDE300D9D37B /* TPCircularBuffer.c */; };
|
||||
9417A80C1867DDE300D9D37B /* CHANGELOG in Resources */ = {isa = PBXBuildFile; fileRef = 9417A7FF1867DDE300D9D37B /* CHANGELOG */; };
|
||||
9417A80D1867DDE300D9D37B /* VERSION in Resources */ = {isa = PBXBuildFile; fileRef = 9417A8001867DDE300D9D37B /* VERSION */; };
|
||||
94FBB77518B15698007CAE45 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94FBB77418B15698007CAE45 /* AVFoundation.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
@@ -51,6 +55,41 @@
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
66C82E631B23D26400B71897 /* EZAudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudio.h; sourceTree = "<group>"; };
|
||||
66C82E641B23D26400B71897 /* EZAudio.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudio.m; sourceTree = "<group>"; };
|
||||
66C82E651B23D26400B71897 /* EZAudioDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioDevice.h; sourceTree = "<group>"; };
|
||||
66C82E661B23D26400B71897 /* EZAudioDevice.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioDevice.m; sourceTree = "<group>"; };
|
||||
66C82E671B23D26400B71897 /* EZAudioDisplayLink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioDisplayLink.h; sourceTree = "<group>"; };
|
||||
66C82E681B23D26400B71897 /* EZAudioDisplayLink.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioDisplayLink.m; sourceTree = "<group>"; };
|
||||
66C82E691B23D26400B71897 /* EZAudioFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioFile.h; sourceTree = "<group>"; };
|
||||
66C82E6A1B23D26400B71897 /* EZAudioFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioFile.m; sourceTree = "<group>"; };
|
||||
66C82E6B1B23D26400B71897 /* EZAudioFloatConverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioFloatConverter.h; sourceTree = "<group>"; };
|
||||
66C82E6C1B23D26400B71897 /* EZAudioFloatConverter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioFloatConverter.m; sourceTree = "<group>"; };
|
||||
66C82E6D1B23D26400B71897 /* EZAudioFloatData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioFloatData.h; sourceTree = "<group>"; };
|
||||
66C82E6E1B23D26400B71897 /* EZAudioFloatData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioFloatData.m; sourceTree = "<group>"; };
|
||||
66C82E6F1B23D26400B71897 /* EZAudioPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlayer.h; sourceTree = "<group>"; };
|
||||
66C82E701B23D26400B71897 /* EZAudioPlayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlayer.m; sourceTree = "<group>"; };
|
||||
66C82E711B23D26400B71897 /* EZAudioPlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlot.h; sourceTree = "<group>"; };
|
||||
66C82E721B23D26400B71897 /* EZAudioPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlot.m; sourceTree = "<group>"; };
|
||||
66C82E731B23D26400B71897 /* EZAudioPlotGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGL.h; sourceTree = "<group>"; };
|
||||
66C82E741B23D26400B71897 /* EZAudioPlotGL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGL.m; sourceTree = "<group>"; };
|
||||
66C82E751B23D26400B71897 /* EZAudioPlotGLKViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGLKViewController.h; sourceTree = "<group>"; };
|
||||
66C82E761B23D26400B71897 /* EZAudioPlotGLKViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGLKViewController.m; sourceTree = "<group>"; };
|
||||
66C82E771B23D26400B71897 /* EZAudioUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioUtilities.h; sourceTree = "<group>"; };
|
||||
66C82E781B23D26400B71897 /* EZAudioUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioUtilities.m; sourceTree = "<group>"; };
|
||||
66C82E791B23D26400B71897 /* EZMicrophone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZMicrophone.h; sourceTree = "<group>"; };
|
||||
66C82E7A1B23D26400B71897 /* EZMicrophone.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZMicrophone.m; sourceTree = "<group>"; };
|
||||
66C82E7B1B23D26400B71897 /* EZOutput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZOutput.h; sourceTree = "<group>"; };
|
||||
66C82E7C1B23D26400B71897 /* EZOutput.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZOutput.m; sourceTree = "<group>"; };
|
||||
66C82E7D1B23D26400B71897 /* EZPlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZPlot.h; sourceTree = "<group>"; };
|
||||
66C82E7E1B23D26400B71897 /* EZPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZPlot.m; sourceTree = "<group>"; };
|
||||
66C82E7F1B23D26400B71897 /* EZRecorder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZRecorder.h; sourceTree = "<group>"; };
|
||||
66C82E801B23D26400B71897 /* EZRecorder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZRecorder.m; sourceTree = "<group>"; };
|
||||
66C82E811B23D26400B71897 /* TPCircularBuffer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = TPCircularBuffer.c; sourceTree = "<group>"; };
|
||||
66C82E821B23D26400B71897 /* TPCircularBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TPCircularBuffer.h; sourceTree = "<group>"; };
|
||||
66C82E841B23D26400B71897 /* CHANGELOG */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CHANGELOG; sourceTree = "<group>"; };
|
||||
66C82E851B23D26400B71897 /* VERSION */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VERSION; sourceTree = "<group>"; };
|
||||
66DB85B71B05714F0018EFC5 /* MainStoryboard.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = MainStoryboard.storyboard; sourceTree = "<group>"; };
|
||||
94056FE8185E5EAF00EB94BA /* EZAudioOpenGLWaveformExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = EZAudioOpenGLWaveformExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
94056FEB185E5EAF00EB94BA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
94056FED185E5EAF00EB94BA /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
|
||||
@@ -61,8 +100,6 @@
|
||||
94056FF9185E5EAF00EB94BA /* EZAudioOpenGLWaveformExample-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "EZAudioOpenGLWaveformExample-Prefix.pch"; sourceTree = "<group>"; };
|
||||
94056FFA185E5EAF00EB94BA /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
|
||||
94056FFB185E5EAF00EB94BA /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
|
||||
94056FFE185E5EAF00EB94BA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main_iPhone.storyboard; sourceTree = "<group>"; };
|
||||
94057001185E5EAF00EB94BA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main_iPad.storyboard; sourceTree = "<group>"; };
|
||||
94057006185E5EAF00EB94BA /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
|
||||
9405700C185E5EAF00EB94BA /* EZAudioOpenGLWaveformExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = EZAudioOpenGLWaveformExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
9405700D185E5EAF00EB94BA /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
|
||||
@@ -73,30 +110,6 @@
|
||||
9405704F185E636100EB94BA /* OpenGLWaveformViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OpenGLWaveformViewController.m; sourceTree = "<group>"; };
|
||||
9417A6CA18658FC900D9D37B /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
|
||||
9417A6CC18658FCD00D9D37B /* GLKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLKit.framework; path = System/Library/Frameworks/GLKit.framework; sourceTree = SDKROOT; };
|
||||
9417A7E81867DDE300D9D37B /* AEFloatConverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AEFloatConverter.h; sourceTree = "<group>"; };
|
||||
9417A7E91867DDE300D9D37B /* AEFloatConverter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AEFloatConverter.m; sourceTree = "<group>"; };
|
||||
9417A7EA1867DDE300D9D37B /* EZAudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudio.h; sourceTree = "<group>"; };
|
||||
9417A7EB1867DDE300D9D37B /* EZAudio.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudio.m; sourceTree = "<group>"; };
|
||||
9417A7EC1867DDE300D9D37B /* EZAudioFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioFile.h; sourceTree = "<group>"; };
|
||||
9417A7ED1867DDE300D9D37B /* EZAudioFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioFile.m; sourceTree = "<group>"; };
|
||||
9417A7EE1867DDE300D9D37B /* EZAudioPlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlot.h; sourceTree = "<group>"; };
|
||||
9417A7EF1867DDE300D9D37B /* EZAudioPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlot.m; sourceTree = "<group>"; };
|
||||
9417A7F01867DDE300D9D37B /* EZAudioPlotGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGL.h; sourceTree = "<group>"; };
|
||||
9417A7F11867DDE300D9D37B /* EZAudioPlotGL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGL.m; sourceTree = "<group>"; };
|
||||
9417A7F21867DDE300D9D37B /* EZAudioPlotGLKViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGLKViewController.h; sourceTree = "<group>"; };
|
||||
9417A7F31867DDE300D9D37B /* EZAudioPlotGLKViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGLKViewController.m; sourceTree = "<group>"; };
|
||||
9417A7F41867DDE300D9D37B /* EZMicrophone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZMicrophone.h; sourceTree = "<group>"; };
|
||||
9417A7F51867DDE300D9D37B /* EZMicrophone.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZMicrophone.m; sourceTree = "<group>"; };
|
||||
9417A7F61867DDE300D9D37B /* EZOutput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZOutput.h; sourceTree = "<group>"; };
|
||||
9417A7F71867DDE300D9D37B /* EZOutput.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZOutput.m; sourceTree = "<group>"; };
|
||||
9417A7F81867DDE300D9D37B /* EZPlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZPlot.h; sourceTree = "<group>"; };
|
||||
9417A7F91867DDE300D9D37B /* EZPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZPlot.m; sourceTree = "<group>"; };
|
||||
9417A7FA1867DDE300D9D37B /* EZRecorder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZRecorder.h; sourceTree = "<group>"; };
|
||||
9417A7FB1867DDE300D9D37B /* EZRecorder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZRecorder.m; sourceTree = "<group>"; };
|
||||
9417A7FC1867DDE300D9D37B /* TPCircularBuffer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = TPCircularBuffer.c; sourceTree = "<group>"; };
|
||||
9417A7FD1867DDE300D9D37B /* TPCircularBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TPCircularBuffer.h; sourceTree = "<group>"; };
|
||||
9417A7FF1867DDE300D9D37B /* CHANGELOG */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CHANGELOG; sourceTree = "<group>"; };
|
||||
9417A8001867DDE300D9D37B /* VERSION */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VERSION; sourceTree = "<group>"; };
|
||||
94FBB77418B15698007CAE45 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
@@ -127,6 +140,56 @@
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
66C82E621B23D26400B71897 /* EZAudio */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
66C82E631B23D26400B71897 /* EZAudio.h */,
|
||||
66C82E641B23D26400B71897 /* EZAudio.m */,
|
||||
66C82E651B23D26400B71897 /* EZAudioDevice.h */,
|
||||
66C82E661B23D26400B71897 /* EZAudioDevice.m */,
|
||||
66C82E671B23D26400B71897 /* EZAudioDisplayLink.h */,
|
||||
66C82E681B23D26400B71897 /* EZAudioDisplayLink.m */,
|
||||
66C82E691B23D26400B71897 /* EZAudioFile.h */,
|
||||
66C82E6A1B23D26400B71897 /* EZAudioFile.m */,
|
||||
66C82E6B1B23D26400B71897 /* EZAudioFloatConverter.h */,
|
||||
66C82E6C1B23D26400B71897 /* EZAudioFloatConverter.m */,
|
||||
66C82E6D1B23D26400B71897 /* EZAudioFloatData.h */,
|
||||
66C82E6E1B23D26400B71897 /* EZAudioFloatData.m */,
|
||||
66C82E6F1B23D26400B71897 /* EZAudioPlayer.h */,
|
||||
66C82E701B23D26400B71897 /* EZAudioPlayer.m */,
|
||||
66C82E711B23D26400B71897 /* EZAudioPlot.h */,
|
||||
66C82E721B23D26400B71897 /* EZAudioPlot.m */,
|
||||
66C82E731B23D26400B71897 /* EZAudioPlotGL.h */,
|
||||
66C82E741B23D26400B71897 /* EZAudioPlotGL.m */,
|
||||
66C82E751B23D26400B71897 /* EZAudioPlotGLKViewController.h */,
|
||||
66C82E761B23D26400B71897 /* EZAudioPlotGLKViewController.m */,
|
||||
66C82E771B23D26400B71897 /* EZAudioUtilities.h */,
|
||||
66C82E781B23D26400B71897 /* EZAudioUtilities.m */,
|
||||
66C82E791B23D26400B71897 /* EZMicrophone.h */,
|
||||
66C82E7A1B23D26400B71897 /* EZMicrophone.m */,
|
||||
66C82E7B1B23D26400B71897 /* EZOutput.h */,
|
||||
66C82E7C1B23D26400B71897 /* EZOutput.m */,
|
||||
66C82E7D1B23D26400B71897 /* EZPlot.h */,
|
||||
66C82E7E1B23D26400B71897 /* EZPlot.m */,
|
||||
66C82E7F1B23D26400B71897 /* EZRecorder.h */,
|
||||
66C82E801B23D26400B71897 /* EZRecorder.m */,
|
||||
66C82E811B23D26400B71897 /* TPCircularBuffer.c */,
|
||||
66C82E821B23D26400B71897 /* TPCircularBuffer.h */,
|
||||
66C82E831B23D26400B71897 /* VERSION */,
|
||||
);
|
||||
name = EZAudio;
|
||||
path = ../../../../EZAudio;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
66C82E831B23D26400B71897 /* VERSION */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
66C82E841B23D26400B71897 /* CHANGELOG */,
|
||||
66C82E851B23D26400B71897 /* VERSION */,
|
||||
);
|
||||
path = VERSION;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
94056FDF185E5EAF00EB94BA = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -163,11 +226,10 @@
|
||||
94056FF1185E5EAF00EB94BA /* EZAudioOpenGLWaveformExample */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9417A7E71867DDE300D9D37B /* EZAudio */,
|
||||
66C82E621B23D26400B71897 /* EZAudio */,
|
||||
94056FFA185E5EAF00EB94BA /* AppDelegate.h */,
|
||||
94056FFB185E5EAF00EB94BA /* AppDelegate.m */,
|
||||
94056FFD185E5EAF00EB94BA /* Main_iPhone.storyboard */,
|
||||
94057000185E5EAF00EB94BA /* Main_iPad.storyboard */,
|
||||
66DB85B71B05714F0018EFC5 /* MainStoryboard.storyboard */,
|
||||
9405704E185E636100EB94BA /* OpenGLWaveformViewController.h */,
|
||||
9405704F185E636100EB94BA /* OpenGLWaveformViewController.m */,
|
||||
94057006185E5EAF00EB94BA /* Images.xcassets */,
|
||||
@@ -205,46 +267,6 @@
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9417A7E71867DDE300D9D37B /* EZAudio */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9417A7E81867DDE300D9D37B /* AEFloatConverter.h */,
|
||||
9417A7E91867DDE300D9D37B /* AEFloatConverter.m */,
|
||||
9417A7EA1867DDE300D9D37B /* EZAudio.h */,
|
||||
9417A7EB1867DDE300D9D37B /* EZAudio.m */,
|
||||
9417A7EC1867DDE300D9D37B /* EZAudioFile.h */,
|
||||
9417A7ED1867DDE300D9D37B /* EZAudioFile.m */,
|
||||
9417A7EE1867DDE300D9D37B /* EZAudioPlot.h */,
|
||||
9417A7EF1867DDE300D9D37B /* EZAudioPlot.m */,
|
||||
9417A7F01867DDE300D9D37B /* EZAudioPlotGL.h */,
|
||||
9417A7F11867DDE300D9D37B /* EZAudioPlotGL.m */,
|
||||
9417A7F21867DDE300D9D37B /* EZAudioPlotGLKViewController.h */,
|
||||
9417A7F31867DDE300D9D37B /* EZAudioPlotGLKViewController.m */,
|
||||
9417A7F41867DDE300D9D37B /* EZMicrophone.h */,
|
||||
9417A7F51867DDE300D9D37B /* EZMicrophone.m */,
|
||||
9417A7F61867DDE300D9D37B /* EZOutput.h */,
|
||||
9417A7F71867DDE300D9D37B /* EZOutput.m */,
|
||||
9417A7F81867DDE300D9D37B /* EZPlot.h */,
|
||||
9417A7F91867DDE300D9D37B /* EZPlot.m */,
|
||||
9417A7FA1867DDE300D9D37B /* EZRecorder.h */,
|
||||
9417A7FB1867DDE300D9D37B /* EZRecorder.m */,
|
||||
9417A7FC1867DDE300D9D37B /* TPCircularBuffer.c */,
|
||||
9417A7FD1867DDE300D9D37B /* TPCircularBuffer.h */,
|
||||
9417A7FE1867DDE300D9D37B /* VERSION */,
|
||||
);
|
||||
name = EZAudio;
|
||||
path = ../../../../EZAudio;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9417A7FE1867DDE300D9D37B /* VERSION */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9417A7FF1867DDE300D9D37B /* CHANGELOG */,
|
||||
9417A8001867DDE300D9D37B /* VERSION */,
|
||||
);
|
||||
path = VERSION;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
@@ -321,12 +343,11 @@
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
94057002185E5EAF00EB94BA /* Main_iPad.storyboard in Resources */,
|
||||
94057007185E5EAF00EB94BA /* Images.xcassets in Resources */,
|
||||
94056FFF185E5EAF00EB94BA /* Main_iPhone.storyboard in Resources */,
|
||||
9417A80D1867DDE300D9D37B /* VERSION in Resources */,
|
||||
66C82E961B23D26400B71897 /* CHANGELOG in Resources */,
|
||||
66DB85B81B05714F0018EFC5 /* MainStoryboard.storyboard in Resources */,
|
||||
94056FF6185E5EAF00EB94BA /* InfoPlist.strings in Resources */,
|
||||
9417A80C1867DDE300D9D37B /* CHANGELOG in Resources */,
|
||||
66C82E971B23D26400B71897 /* VERSION in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -345,20 +366,25 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
9417A80B1867DDE300D9D37B /* TPCircularBuffer.c in Sources */,
|
||||
9417A8081867DDE300D9D37B /* EZOutput.m in Sources */,
|
||||
9417A8061867DDE300D9D37B /* EZAudioPlotGLKViewController.m in Sources */,
|
||||
66C82E941B23D26400B71897 /* EZRecorder.m in Sources */,
|
||||
94057050185E636100EB94BA /* OpenGLWaveformViewController.m in Sources */,
|
||||
9417A8011867DDE300D9D37B /* AEFloatConverter.m in Sources */,
|
||||
66C82E8A1B23D26400B71897 /* EZAudioFloatConverter.m in Sources */,
|
||||
66C82E8B1B23D26400B71897 /* EZAudioFloatData.m in Sources */,
|
||||
66C82E861B23D26400B71897 /* EZAudio.m in Sources */,
|
||||
66C82E891B23D26400B71897 /* EZAudioFile.m in Sources */,
|
||||
66C82E921B23D26400B71897 /* EZOutput.m in Sources */,
|
||||
66C82E8E1B23D26400B71897 /* EZAudioPlotGL.m in Sources */,
|
||||
66C82E951B23D26400B71897 /* TPCircularBuffer.c in Sources */,
|
||||
66C82E8D1B23D26400B71897 /* EZAudioPlot.m in Sources */,
|
||||
94056FFC185E5EAF00EB94BA /* AppDelegate.m in Sources */,
|
||||
9417A8041867DDE300D9D37B /* EZAudioPlot.m in Sources */,
|
||||
9417A8031867DDE300D9D37B /* EZAudioFile.m in Sources */,
|
||||
9417A8051867DDE300D9D37B /* EZAudioPlotGL.m in Sources */,
|
||||
66C82E911B23D26400B71897 /* EZMicrophone.m in Sources */,
|
||||
66C82E8C1B23D26400B71897 /* EZAudioPlayer.m in Sources */,
|
||||
94056FF8185E5EAF00EB94BA /* main.m in Sources */,
|
||||
9417A8091867DDE300D9D37B /* EZPlot.m in Sources */,
|
||||
9417A8071867DDE300D9D37B /* EZMicrophone.m in Sources */,
|
||||
9417A80A1867DDE300D9D37B /* EZRecorder.m in Sources */,
|
||||
9417A8021867DDE300D9D37B /* EZAudio.m in Sources */,
|
||||
66C82E881B23D26400B71897 /* EZAudioDisplayLink.m in Sources */,
|
||||
66C82E931B23D26400B71897 /* EZPlot.m in Sources */,
|
||||
66C82E871B23D26400B71897 /* EZAudioDevice.m in Sources */,
|
||||
66C82E901B23D26400B71897 /* EZAudioUtilities.m in Sources */,
|
||||
66C82E8F1B23D26400B71897 /* EZAudioPlotGLKViewController.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -389,22 +415,6 @@
|
||||
name = InfoPlist.strings;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
94056FFD185E5EAF00EB94BA /* Main_iPhone.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
94056FFE185E5EAF00EB94BA /* Base */,
|
||||
);
|
||||
name = Main_iPhone.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
94057000185E5EAF00EB94BA /* Main_iPad.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
94057001185E5EAF00EB94BA /* Base */,
|
||||
);
|
||||
name = Main_iPad.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
94057016185E5EAF00EB94BA /* InfoPlist.strings */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
|
||||
-83
@@ -1,83 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4514" systemVersion="13A603" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES" initialViewController="BYZ-38-t0r">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3747"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--OpenGL Waveform View Controller-->
|
||||
<scene sceneID="tne-QT-ifu">
|
||||
<objects>
|
||||
<viewController id="BYZ-38-t0r" customClass="OpenGLWaveformViewController" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="J6F-Mt-G9c"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="Fyj-aA-S5n"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
||||
<rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="2k0-a8-gua" customClass="EZAudioPlotGL">
|
||||
<rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="PPK-Fx-VmZ">
|
||||
<rect key="frame" x="20" y="973" width="51" height="31"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<connections>
|
||||
<action selector="toggleMicrophone:" destination="BYZ-38-t0r" eventType="valueChanged" id="zW0-o9-U9h"/>
|
||||
</connections>
|
||||
</switch>
|
||||
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="9Q2-Q9-pND">
|
||||
<rect key="frame" x="635" y="975" width="113" height="29"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<segments>
|
||||
<segment title="Buffer"/>
|
||||
<segment title="Rolling"/>
|
||||
</segments>
|
||||
<connections>
|
||||
<action selector="changePlotType:" destination="BYZ-38-t0r" eventType="valueChanged" id="T2z-a2-dOz"/>
|
||||
</connections>
|
||||
</segmentedControl>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Lhg-Cv-9eP">
|
||||
<rect key="frame" x="20" y="944" width="728" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="Lhg-Cv-9eP" secondAttribute="trailing" constant="20" id="26a-iS-hv5"/>
|
||||
<constraint firstAttribute="bottom" secondItem="PPK-Fx-VmZ" secondAttribute="bottom" constant="20" id="2rf-dR-kty"/>
|
||||
<constraint firstItem="PPK-Fx-VmZ" firstAttribute="top" secondItem="Lhg-Cv-9eP" secondAttribute="bottom" constant="8" id="6VF-Vg-93u"/>
|
||||
<constraint firstItem="Lhg-Cv-9eP" firstAttribute="leading" secondItem="2k0-a8-gua" secondAttribute="leading" constant="20" id="6tG-rD-88B"/>
|
||||
<constraint firstAttribute="bottom" secondItem="9Q2-Q9-pND" secondAttribute="bottom" constant="21" id="Qen-VZ-dRf"/>
|
||||
<constraint firstItem="PPK-Fx-VmZ" firstAttribute="leading" secondItem="2k0-a8-gua" secondAttribute="leading" constant="20" id="j1j-Uy-YDg"/>
|
||||
<constraint firstAttribute="trailing" secondItem="9Q2-Q9-pND" secondAttribute="trailing" constant="20" id="jQB-83-QJN"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="2k0-a8-gua" secondAttribute="bottom" id="H8j-R8-LQA"/>
|
||||
<constraint firstItem="2k0-a8-gua" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leading" id="NTd-hb-HPh"/>
|
||||
<constraint firstItem="2k0-a8-gua" firstAttribute="top" secondItem="8bC-Xf-vdC" secondAttribute="top" id="UwQ-lL-3yx"/>
|
||||
<constraint firstAttribute="trailing" secondItem="2k0-a8-gua" secondAttribute="trailing" id="nPK-sh-21h"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="audioPlot" destination="2k0-a8-gua" id="3Jb-7T-kwh"/>
|
||||
<outlet property="microphoneTextLabel" destination="Lhg-Cv-9eP" id="C0v-xz-54v"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
</scene>
|
||||
</scenes>
|
||||
<simulatedMetricsContainer key="defaultSimulatedMetrics">
|
||||
<simulatedStatusBarMetrics key="statusBar" statusBarStyle="blackOpaque"/>
|
||||
<simulatedOrientationMetrics key="orientation"/>
|
||||
<simulatedScreenMetrics key="destination"/>
|
||||
</simulatedMetricsContainer>
|
||||
</document>
|
||||
-83
@@ -1,83 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4514" systemVersion="13A603" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="vXZ-lx-hvc">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3747"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--OpenGL Waveform View Controller-->
|
||||
<scene sceneID="ufC-wZ-h7g">
|
||||
<objects>
|
||||
<viewController id="vXZ-lx-hvc" customClass="OpenGLWaveformViewController" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="4rH-3h-KEa"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="a4w-9J-qhE"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="kh9-bI-dsS">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="7Fr-JE-F7l" customClass="EZAudioPlotGL">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="fZE-l6-E8f">
|
||||
<rect key="frame" x="20" y="517" width="51" height="31"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<connections>
|
||||
<action selector="toggleMicrophone:" destination="vXZ-lx-hvc" eventType="valueChanged" id="Ujy-dW-IRf"/>
|
||||
</connections>
|
||||
</switch>
|
||||
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="WKs-bx-GsP">
|
||||
<rect key="frame" x="187" y="519" width="113" height="29"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<segments>
|
||||
<segment title="Buffer"/>
|
||||
<segment title="Rolling"/>
|
||||
</segments>
|
||||
<connections>
|
||||
<action selector="changePlotType:" destination="vXZ-lx-hvc" eventType="valueChanged" id="HDU-5u-S8m"/>
|
||||
</connections>
|
||||
</segmentedControl>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MAP-vX-MFE">
|
||||
<rect key="frame" x="20" y="488" width="280" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="fZE-l6-E8f" firstAttribute="leading" secondItem="7Fr-JE-F7l" secondAttribute="leading" constant="20" id="9HK-Uj-81E"/>
|
||||
<constraint firstItem="fZE-l6-E8f" firstAttribute="top" secondItem="MAP-vX-MFE" secondAttribute="bottom" constant="8" id="Cbj-Gs-3br"/>
|
||||
<constraint firstAttribute="bottom" secondItem="WKs-bx-GsP" secondAttribute="bottom" constant="21" id="F5y-zx-YLE"/>
|
||||
<constraint firstAttribute="trailing" secondItem="WKs-bx-GsP" secondAttribute="trailing" constant="20" id="fsI-hv-tvr"/>
|
||||
<constraint firstItem="MAP-vX-MFE" firstAttribute="leading" secondItem="7Fr-JE-F7l" secondAttribute="leading" constant="20" id="n4R-Go-oBp"/>
|
||||
<constraint firstAttribute="trailing" secondItem="MAP-vX-MFE" secondAttribute="trailing" constant="20" id="s95-gj-Z9p"/>
|
||||
<constraint firstAttribute="bottom" secondItem="fZE-l6-E8f" secondAttribute="bottom" constant="20" id="wbE-5i-q1B"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="7Fr-JE-F7l" firstAttribute="leading" secondItem="kh9-bI-dsS" secondAttribute="leading" id="4Re-N4-wev"/>
|
||||
<constraint firstAttribute="bottom" secondItem="7Fr-JE-F7l" secondAttribute="bottom" id="6kO-ch-SyH"/>
|
||||
<constraint firstItem="7Fr-JE-F7l" firstAttribute="top" secondItem="kh9-bI-dsS" secondAttribute="top" id="LJb-Se-k6h"/>
|
||||
<constraint firstAttribute="trailing" secondItem="7Fr-JE-F7l" secondAttribute="trailing" id="icT-tB-X3G"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="audioPlot" destination="7Fr-JE-F7l" id="tgu-2e-9Xn"/>
|
||||
<outlet property="microphoneTextLabel" destination="MAP-vX-MFE" id="fgA-DC-lL6"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
</scene>
|
||||
</scenes>
|
||||
<simulatedMetricsContainer key="defaultSimulatedMetrics">
|
||||
<simulatedStatusBarMetrics key="statusBar"/>
|
||||
<simulatedOrientationMetrics key="orientation"/>
|
||||
<simulatedScreenMetrics key="destination" type="retina4"/>
|
||||
</simulatedMetricsContainer>
|
||||
</document>
|
||||
+2
-2
@@ -25,9 +25,9 @@
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main_iPhone</string>
|
||||
<string>MainStoryboard</string>
|
||||
<key>UIMainStoryboardFile~ipad</key>
|
||||
<string>Main_iPad</string>
|
||||
<string>MainStoryboard</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
|
||||
+102
@@ -0,0 +1,102 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7702" systemVersion="14C109" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="1v1-63-VYU">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7701"/>
|
||||
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--OpenGL Waveform View Controller-->
|
||||
<scene sceneID="Dby-fz-vJ6">
|
||||
<objects>
|
||||
<viewController id="1v1-63-VYU" customClass="OpenGLWaveformViewController" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="FeB-FW-m5f"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="2Vk-A0-ofK"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="XwN-5T-qg2">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="6UW-GB-04u" customClass="EZAudioPlotGL">
|
||||
<rect key="frame" x="0.0" y="-54" width="600" height="654"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="XVj-h5-jTC">
|
||||
<rect key="frame" x="16" y="520" width="157" height="29"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="157" id="RcI-eU-AzL"/>
|
||||
</constraints>
|
||||
<segments>
|
||||
<segment title="Buffer"/>
|
||||
<segment title="Rolling"/>
|
||||
</segments>
|
||||
<color key="tintColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<connections>
|
||||
<action selector="changePlotType:" destination="1v1-63-VYU" eventType="valueChanged" id="waP-n9-8PZ"/>
|
||||
</connections>
|
||||
</segmentedControl>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" buttonType="roundedRect" showsTouchWhenHighlighted="YES" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ctj-9N-cJA">
|
||||
<rect key="frame" x="16" y="556" width="568" height="28"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="13"/>
|
||||
<color key="tintColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<state key="normal" title="Change Microphone Input">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="toggleMicrophonePickerView:" destination="1v1-63-VYU" eventType="touchUpInside" id="9Cc-I7-eam"/>
|
||||
</connections>
|
||||
</button>
|
||||
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="wWh-lf-1kw">
|
||||
<rect key="frame" x="16" y="479" width="51" height="31"/>
|
||||
<color key="onTintColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<connections>
|
||||
<action selector="toggleMicrophone:" destination="1v1-63-VYU" eventType="touchUpInside" id="ffA-YR-9jD"/>
|
||||
</connections>
|
||||
</switch>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ycQ-JZ-KGC">
|
||||
<rect key="frame" x="73" y="487" width="33" height="16"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="13"/>
|
||||
<color key="textColor" red="1" green="1" blue="1" alpha="0.90000000000000002" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<pickerView contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="wcz-Wm-zAv">
|
||||
<rect key="frame" x="0.0" y="-216" width="600" height="162"/>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</pickerView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="XVj-h5-jTC" firstAttribute="top" secondItem="wWh-lf-1kw" secondAttribute="bottom" constant="10" id="Awg-0Q-ZDb"/>
|
||||
<constraint firstItem="2Vk-A0-ofK" firstAttribute="top" secondItem="6UW-GB-04u" secondAttribute="bottom" id="Hr1-dv-Z4E"/>
|
||||
<constraint firstItem="wWh-lf-1kw" firstAttribute="leading" secondItem="XwN-5T-qg2" secondAttribute="leading" constant="16" id="JYf-cq-hEJ"/>
|
||||
<constraint firstItem="ctj-9N-cJA" firstAttribute="leading" secondItem="XwN-5T-qg2" secondAttribute="leading" constant="16" id="LEG-b0-ZXV"/>
|
||||
<constraint firstItem="XVj-h5-jTC" firstAttribute="leading" secondItem="XwN-5T-qg2" secondAttribute="leading" constant="16" id="N1u-yG-Hdv"/>
|
||||
<constraint firstItem="6UW-GB-04u" firstAttribute="leading" secondItem="XwN-5T-qg2" secondAttribute="leading" id="QuF-Yw-5g8"/>
|
||||
<constraint firstAttribute="trailing" secondItem="ctj-9N-cJA" secondAttribute="trailing" constant="16" id="R8I-8R-8fR"/>
|
||||
<constraint firstItem="wWh-lf-1kw" firstAttribute="leading" secondItem="XVj-h5-jTC" secondAttribute="leading" id="S7T-EA-RwB"/>
|
||||
<constraint firstItem="ycQ-JZ-KGC" firstAttribute="leading" secondItem="wWh-lf-1kw" secondAttribute="trailing" constant="8" symbolic="YES" id="Xb8-5L-lKe"/>
|
||||
<constraint firstItem="2Vk-A0-ofK" firstAttribute="top" secondItem="ctj-9N-cJA" secondAttribute="bottom" constant="16" id="ZMl-bh-DOY"/>
|
||||
<constraint firstItem="ctj-9N-cJA" firstAttribute="top" secondItem="XVj-h5-jTC" secondAttribute="bottom" constant="8" id="aKS-tU-6gs"/>
|
||||
<constraint firstAttribute="trailing" secondItem="6UW-GB-04u" secondAttribute="trailing" id="dGn-el-QRB"/>
|
||||
<constraint firstAttribute="trailing" secondItem="wcz-Wm-zAv" secondAttribute="trailing" id="hXo-el-N6L"/>
|
||||
<constraint firstItem="6UW-GB-04u" firstAttribute="top" secondItem="wcz-Wm-zAv" secondAttribute="bottom" id="jTa-E6-bge"/>
|
||||
<constraint firstItem="wcz-Wm-zAv" firstAttribute="leading" secondItem="XwN-5T-qg2" secondAttribute="leading" id="ljn-by-pCm"/>
|
||||
<constraint firstItem="wcz-Wm-zAv" firstAttribute="top" secondItem="XwN-5T-qg2" secondAttribute="topMargin" constant="-216" id="vmP-px-0rM"/>
|
||||
<constraint firstItem="XVj-h5-jTC" firstAttribute="top" secondItem="ycQ-JZ-KGC" secondAttribute="bottom" constant="17" id="whI-Gr-IoC"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="audioPlot" destination="6UW-GB-04u" id="fFy-SO-WX1"/>
|
||||
<outlet property="microphoneInputPickerView" destination="wcz-Wm-zAv" id="qHe-UF-SZ9"/>
|
||||
<outlet property="microphoneInputPickerViewTopConstraint" destination="vmP-px-0rM" id="DU0-3z-sts"/>
|
||||
<outlet property="microphoneInputToggleButton" destination="ctj-9N-cJA" id="XPV-nW-Wa9"/>
|
||||
<outlet property="microphoneTextLabel" destination="ycQ-JZ-KGC" id="BG8-nQ-K1r"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="2Ua-6O-X9Y" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="574" y="89"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
||||
+39
-5
@@ -11,28 +11,62 @@
|
||||
// Import EZAudio header
|
||||
#import "EZAudio.h"
|
||||
|
||||
@interface OpenGLWaveformViewController : UIViewController <EZMicrophoneDelegate>
|
||||
@interface OpenGLWaveformViewController : UIViewController <EZMicrophoneDelegate,
|
||||
UIPickerViewDataSource,
|
||||
UIPickerViewDelegate>
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Components
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
The OpenGL based audio plot
|
||||
*/
|
||||
@property (nonatomic,weak) IBOutlet EZAudioPlotGL *audioPlot;
|
||||
@property (nonatomic, weak) IBOutlet EZAudioPlot *audioPlot;
|
||||
|
||||
/**
|
||||
The microphone component
|
||||
*/
|
||||
@property (nonatomic,strong) EZMicrophone *microphone;
|
||||
@property (nonatomic, strong) EZMicrophone *microphone;
|
||||
|
||||
/**
|
||||
The button at the bottom displaying the currently selected microphone input
|
||||
*/
|
||||
@property (nonatomic, weak) IBOutlet UIButton *microphoneInputToggleButton;
|
||||
|
||||
/**
|
||||
The microphone input picker view to display the different microphone input sources
|
||||
*/
|
||||
@property (nonatomic, weak) IBOutlet UIPickerView *microphoneInputPickerView;
|
||||
|
||||
/**
|
||||
The microphone input picker view's top layout constraint (we use this to hide the control)
|
||||
*/
|
||||
@property (nonatomic, weak) IBOutlet NSLayoutConstraint *microphoneInputPickerViewTopConstraint;
|
||||
|
||||
/**
|
||||
The text label displaying "Microphone On" or "Microphone Off"
|
||||
*/
|
||||
@property (nonatomic, weak) IBOutlet UILabel *microphoneTextLabel;
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Actions
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Switches the plot drawing type between a buffer plot (visualizes the current stream of audio data from the update function) or a rolling plot (visualizes the audio data over time, this is the classic waveform look)
|
||||
*/
|
||||
-(IBAction)changePlotType:(id)sender;
|
||||
- (IBAction)changePlotType:(id)sender;
|
||||
|
||||
/**
|
||||
Toggles the microphone on and off. When the microphone is on it will send its delegate (aka this view controller) the audio data in various ways (check out the EZMicrophoneDelegate documentation for more details);
|
||||
*/
|
||||
-(IBAction)toggleMicrophone:(id)sender;
|
||||
- (IBAction)toggleMicrophonePickerView:(id)sender;
|
||||
|
||||
/**
|
||||
Toggles the microphone on and off. When the microphone is on it will send its delegate (aka this view controller) the audio data in various ways (check out the EZMicrophoneDelegate documentation for more details);
|
||||
*/
|
||||
- (IBAction)toggleMicrophone:(id)sender;
|
||||
|
||||
@end
|
||||
|
||||
+254
-99
@@ -8,136 +8,291 @@
|
||||
|
||||
#import "OpenGLWaveformViewController.h"
|
||||
|
||||
@interface OpenGLWaveformViewController ()
|
||||
#pragma mark - UI Extras
|
||||
@property (nonatomic,weak) IBOutlet UILabel *microphoneTextLabel;
|
||||
@interface OpenGLWaveformViewController()
|
||||
@property (nonatomic, strong) NSArray *inputs;
|
||||
@end
|
||||
|
||||
@implementation OpenGLWaveformViewController
|
||||
@synthesize audioPlot;
|
||||
@synthesize microphone;
|
||||
|
||||
#pragma mark - Initialization
|
||||
-(id)init {
|
||||
self = [super init];
|
||||
if(self){
|
||||
[self initializeViewController];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(id)initWithCoder:(NSCoder *)aDecoder {
|
||||
self = [super initWithCoder:aDecoder];
|
||||
if(self){
|
||||
[self initializeViewController];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Initialize View Controller Here
|
||||
-(void)initializeViewController {
|
||||
// Create an instance of the microphone and tell it to use this view controller instance as the delegate
|
||||
self.microphone = [EZMicrophone microphoneWithDelegate:self];
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - View Style
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (UIStatusBarStyle)preferredStatusBarStyle
|
||||
{
|
||||
return UIStatusBarStyleLightContent;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Customize the Audio Plot
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
|
||||
/*
|
||||
Customizing the audio plot's look
|
||||
*/
|
||||
// Background color
|
||||
self.audioPlot.backgroundColor = [UIColor colorWithRed: 0.569 green: 0.82 blue: 0.478 alpha: 1];
|
||||
// Waveform color
|
||||
self.audioPlot.color = [UIColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:1.0];
|
||||
// Plot type
|
||||
self.audioPlot.plotType = EZPlotTypeBuffer;
|
||||
|
||||
/*
|
||||
Start the microphone
|
||||
*/
|
||||
[self.microphone startFetchingAudio];
|
||||
self.microphoneTextLabel.text = @"Microphone On";
|
||||
|
||||
}
|
||||
[super viewDidLoad];
|
||||
|
||||
#pragma mark - Actions
|
||||
-(void)changePlotType:(id)sender {
|
||||
NSInteger selectedSegment = [sender selectedSegmentIndex];
|
||||
switch(selectedSegment){
|
||||
case 0:
|
||||
[self drawBufferPlot];
|
||||
break;
|
||||
case 1:
|
||||
[self drawRollingPlot];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
//
|
||||
// Setup the AVAudioSession. EZMicrophone will not work properly on iOS
|
||||
// if you don't do this!
|
||||
//
|
||||
AVAudioSession *session = [AVAudioSession sharedInstance];
|
||||
NSError *error;
|
||||
[session setCategory:AVAudioSessionCategoryPlayAndRecord error:&error];
|
||||
if (error)
|
||||
{
|
||||
NSLog(@"Error setting up audio session category: %@", error.localizedDescription);
|
||||
}
|
||||
[session setActive:YES error:&error];
|
||||
if (error)
|
||||
{
|
||||
NSLog(@"Error setting up audio session active: %@", error.localizedDescription);
|
||||
}
|
||||
|
||||
-(void)toggleMicrophone:(id)sender {
|
||||
if( ![(UISwitch*)sender isOn] ){
|
||||
[self.microphone stopFetchingAudio];
|
||||
self.microphoneTextLabel.text = @"Microphone Off";
|
||||
}
|
||||
else {
|
||||
//
|
||||
// Customizing the audio plot's look
|
||||
//
|
||||
// Background color
|
||||
self.audioPlot.backgroundColor = [UIColor colorWithRed:0.569 green:0.82 blue:0.478 alpha:1.0];
|
||||
|
||||
// Waveform color
|
||||
self.audioPlot.color = [UIColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:1.0];
|
||||
|
||||
// Plot type
|
||||
self.audioPlot.plotType = EZPlotTypeBuffer;
|
||||
|
||||
//
|
||||
// Create the microphone
|
||||
//
|
||||
self.microphone = [EZMicrophone microphoneWithDelegate:self];
|
||||
|
||||
//
|
||||
// Set up the microphone input UIPickerView items to select
|
||||
// between different microphone inputs. Here what we're doing behind the hood
|
||||
// is enumerating the available inputs provided by the AVAudioSession.
|
||||
//
|
||||
self.inputs = [EZAudioDevice inputDevices];
|
||||
self.microphoneInputPickerView.dataSource = self;
|
||||
self.microphoneInputPickerView.delegate = self;
|
||||
|
||||
//
|
||||
// Start the microphone
|
||||
//
|
||||
[self.microphone startFetchingAudio];
|
||||
self.microphoneTextLabel.text = @"Microphone On";
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Action Extensions
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - UIPickerViewDataSource
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (NSString *)pickerView:(UIPickerView *)pickerView
|
||||
titleForRow:(NSInteger)row
|
||||
forComponent:(NSInteger)component
|
||||
{
|
||||
EZAudioDevice *device = self.inputs[row];
|
||||
return device.name;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (NSAttributedString *)pickerView:(UIPickerView *)pickerView
|
||||
attributedTitleForRow:(NSInteger)row
|
||||
forComponent:(NSInteger)component
|
||||
{
|
||||
EZAudioDevice *device = self.inputs[row];
|
||||
UIColor *textColor = [device isEqual:self.microphone.device] ? self.audioPlot.backgroundColor : [UIColor blackColor];
|
||||
return [[NSAttributedString alloc] initWithString:device.name
|
||||
attributes:@{ NSForegroundColorAttributeName : textColor }];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component
|
||||
{
|
||||
return self.inputs.count;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component
|
||||
{
|
||||
EZAudioDevice *device = self.inputs[row];
|
||||
[self.microphone setDevice:device];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Actions
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)changePlotType:(id)sender
|
||||
{
|
||||
NSInteger selectedSegment = [sender selectedSegmentIndex];
|
||||
switch (selectedSegment)
|
||||
{
|
||||
case 0:
|
||||
[self drawBufferPlot];
|
||||
break;
|
||||
case 1:
|
||||
[self drawRollingPlot];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)toggleMicrophone:(id)sender
|
||||
{
|
||||
BOOL isOn = [sender isOn];
|
||||
if (!isOn)
|
||||
{
|
||||
[self.microphone stopFetchingAudio];
|
||||
self.microphoneTextLabel.text = @"Microphone Off";
|
||||
}
|
||||
else
|
||||
{
|
||||
[self.microphone startFetchingAudio];
|
||||
self.microphoneTextLabel.text = @"Microphone On";
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)toggleMicrophonePickerView:(id)sender
|
||||
{
|
||||
BOOL isHidden = self.microphoneInputPickerViewTopConstraint.constant != 0.0;
|
||||
[self setMicrophonePickerViewHidden:!isHidden];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)setMicrophonePickerViewHidden:(BOOL)hidden
|
||||
{
|
||||
CGFloat pickerHeight = CGRectGetHeight(self.microphoneInputPickerView.bounds);
|
||||
__weak typeof(self) weakSelf = self;
|
||||
[UIView animateWithDuration:0.55
|
||||
delay:0.0
|
||||
usingSpringWithDamping:0.6
|
||||
initialSpringVelocity:0.5
|
||||
options:(UIViewAnimationOptionBeginFromCurrentState|
|
||||
UIViewAnimationOptionCurveEaseInOut|
|
||||
UIViewAnimationOptionLayoutSubviews)
|
||||
animations:^{
|
||||
weakSelf.microphoneInputPickerViewTopConstraint.constant = hidden ? -pickerHeight : 0.0f;
|
||||
[weakSelf.view layoutSubviews];
|
||||
} completion:nil];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Utility
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
Give the visualization of the current buffer (this is almost exactly the openFrameworks audio input eample)
|
||||
*/
|
||||
-(void)drawBufferPlot {
|
||||
// Change the plot type to the buffer plot
|
||||
self.audioPlot.plotType = EZPlotTypeBuffer;
|
||||
// Don't mirror over the x-axis
|
||||
self.audioPlot.shouldMirror = NO;
|
||||
// Don't fill
|
||||
self.audioPlot.shouldFill = NO;
|
||||
- (void)drawBufferPlot
|
||||
{
|
||||
self.audioPlot.plotType = EZPlotTypeBuffer;
|
||||
self.audioPlot.shouldMirror = NO;
|
||||
self.audioPlot.shouldFill = NO;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
Give the classic mirrored, rolling waveform look
|
||||
*/
|
||||
-(void)drawRollingPlot {
|
||||
self.audioPlot.plotType = EZPlotTypeRolling;
|
||||
self.audioPlot.shouldFill = YES;
|
||||
self.audioPlot.shouldMirror = YES;
|
||||
-(void)drawRollingPlot
|
||||
{
|
||||
self.audioPlot.plotType = EZPlotTypeRolling;
|
||||
self.audioPlot.shouldFill = YES;
|
||||
self.audioPlot.shouldMirror = YES;
|
||||
}
|
||||
|
||||
#pragma mark - EZMicrophoneDelegate
|
||||
#warning Thread Safety
|
||||
// Note that any callback that provides streamed audio data (like streaming microphone input) happens on a separate audio thread that should not be blocked. When we feed audio data into any of the UI components we need to explicity create a GCD block on the main thread to properly get the UI to work.
|
||||
-(void)microphone:(EZMicrophone *)microphone
|
||||
hasAudioReceived:(float **)buffer
|
||||
withBufferSize:(UInt32)bufferSize
|
||||
withNumberOfChannels:(UInt32)numberOfChannels {
|
||||
// Getting audio data as an array of float buffer arrays. What does that mean? Because the audio is coming in as a stereo signal the data is split into a left and right channel. So buffer[0] corresponds to the float* data for the left channel while buffer[1] corresponds to the float* data for the right channel.
|
||||
|
||||
// See the Thread Safety warning above, but in a nutshell these callbacks happen on a separate audio thread. We wrap any UI updating in a GCD block on the main thread to avoid blocking that audio flow.
|
||||
dispatch_async(dispatch_get_main_queue(),^{
|
||||
// All the audio plot needs is the buffer data (float*) and the size. Internally the audio plot will handle all the drawing related code, history management, and freeing its own resources. Hence, one badass line of code gets you a pretty plot :)
|
||||
[self.audioPlot updateBuffer:buffer[0] withBufferSize:bufferSize];
|
||||
});
|
||||
// Note that any callback that provides streamed audio data (like streaming
|
||||
// microphone input) happens on a separate audio thread that should not be
|
||||
// blocked. When we feed audio data into any of the UI components we need to
|
||||
// explicity create a GCD block on the main thread to properly get the UI
|
||||
// to work.
|
||||
- (void)microphone:(EZMicrophone *)microphone
|
||||
hasAudioReceived:(float **)buffer
|
||||
withBufferSize:(UInt32)bufferSize
|
||||
withNumberOfChannels:(UInt32)numberOfChannels
|
||||
{
|
||||
// Getting audio data as an array of float buffer arrays. What does that mean?
|
||||
// Because the audio is coming in as a stereo signal the data is split into
|
||||
// a left and right channel. So buffer[0] corresponds to the float* data
|
||||
// for the left channel while buffer[1] corresponds to the float* data
|
||||
// for the right channel.
|
||||
|
||||
// See the Thread Safety warning above, but in a nutshell these callbacks
|
||||
// happen on a separate audio thread. We wrap any UI updating in a GCD block
|
||||
// on the main thread to avoid blocking that audio flow.
|
||||
__weak typeof (self) weakSelf = self;
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
// All the audio plot needs is the buffer data (float*) and the size.
|
||||
// Internally the audio plot will handle all the drawing related code,
|
||||
// history management, and freeing its own resources.
|
||||
// Hence, one badass line of code gets you a pretty plot :)
|
||||
[weakSelf.audioPlot updateBuffer:buffer[0] withBufferSize:bufferSize];
|
||||
});
|
||||
}
|
||||
|
||||
-(void)microphone:(EZMicrophone *)microphone hasAudioStreamBasicDescription:(AudioStreamBasicDescription)audioStreamBasicDescription {
|
||||
// The AudioStreamBasicDescription of the microphone stream. This is useful when configuring the EZRecorder or telling another component what audio format type to expect.
|
||||
// Here's a print function to allow you to inspect it a little easier
|
||||
[EZAudio printASBD:audioStreamBasicDescription];
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)microphone:(EZMicrophone *)microphone hasAudioStreamBasicDescription:(AudioStreamBasicDescription)audioStreamBasicDescription
|
||||
{
|
||||
// The AudioStreamBasicDescription of the microphone stream. This is useful
|
||||
// when configuring the EZRecorder or telling another component what
|
||||
// audio format type to expect.
|
||||
[EZAudioUtilities printASBD:audioStreamBasicDescription];
|
||||
}
|
||||
|
||||
-(void)microphone:(EZMicrophone *)microphone
|
||||
hasBufferList:(AudioBufferList *)bufferList
|
||||
withBufferSize:(UInt32)bufferSize
|
||||
withNumberOfChannels:(UInt32)numberOfChannels {
|
||||
// Getting audio data as a buffer list that can be directly fed into the EZRecorder or EZOutput. Say whattt...
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)microphone:(EZMicrophone *)microphone
|
||||
hasBufferList:(AudioBufferList *)bufferList
|
||||
withBufferSize:(UInt32)bufferSize
|
||||
withNumberOfChannels:(UInt32)numberOfChannels
|
||||
{
|
||||
// Getting audio data as a buffer list that can be directly fed into the
|
||||
// EZRecorder or EZOutput. Say whattt...
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)microphone:(EZMicrophone *)microphone changedDevice:(EZAudioDevice *)device
|
||||
{
|
||||
NSLog(@"Microphone changed device: %@", device.name);
|
||||
|
||||
// Called anytime the microphone's device changes
|
||||
__weak typeof(self) weakSelf = self;
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
NSString *name = device.name;
|
||||
NSString *tapText = @" (Tap To Change)";
|
||||
NSString *microphoneInputToggleButtonText = [NSString stringWithFormat:@"%@%@", device.name, tapText];
|
||||
NSRange rangeOfName = [microphoneInputToggleButtonText rangeOfString:name];
|
||||
NSMutableAttributedString *microphoneInputToggleButtonAttributedText = [[NSMutableAttributedString alloc] initWithString:microphoneInputToggleButtonText];
|
||||
[microphoneInputToggleButtonAttributedText addAttribute:NSFontAttributeName value:[UIFont boldSystemFontOfSize:13.0f] range:rangeOfName];
|
||||
[weakSelf.microphoneInputToggleButton setAttributedTitle:microphoneInputToggleButtonAttributedText forState:UIControlStateNormal];
|
||||
|
||||
// reset the device list (a device may have been plugged in/out)
|
||||
weakSelf.inputs = [EZAudioDevice inputDevices];
|
||||
[weakSelf.microphoneInputPickerView reloadAllComponents];
|
||||
[weakSelf setMicrophonePickerViewHidden:YES];
|
||||
});
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@end
|
||||
|
||||
+92
-78
@@ -7,22 +7,24 @@
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
664FC6841A9DB8D9001D0184 /* AEFloatConverter.m in Sources */ = {isa = PBXBuildFile; fileRef = 664FC6661A9DB8D9001D0184 /* AEFloatConverter.m */; };
|
||||
664FC6861A9DB8D9001D0184 /* EZAudioFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 664FC66A1A9DB8D9001D0184 /* EZAudioFile.m */; };
|
||||
664FC6871A9DB8D9001D0184 /* EZAudioFloatConverter.m in Sources */ = {isa = PBXBuildFile; fileRef = 664FC66C1A9DB8D9001D0184 /* EZAudioFloatConverter.m */; };
|
||||
664FC6881A9DB8D9001D0184 /* EZAudioFloatData.m in Sources */ = {isa = PBXBuildFile; fileRef = 664FC66E1A9DB8D9001D0184 /* EZAudioFloatData.m */; };
|
||||
664FC6891A9DB8D9001D0184 /* EZAudioPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 664FC6701A9DB8D9001D0184 /* EZAudioPlayer.m */; };
|
||||
664FC68A1A9DB8D9001D0184 /* EZAudioPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 664FC6721A9DB8D9001D0184 /* EZAudioPlot.m */; };
|
||||
664FC68B1A9DB8D9001D0184 /* EZAudioPlotGL.m in Sources */ = {isa = PBXBuildFile; fileRef = 664FC6741A9DB8D9001D0184 /* EZAudioPlotGL.m */; };
|
||||
664FC68C1A9DB8D9001D0184 /* EZAudioPlotGLKViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 664FC6761A9DB8D9001D0184 /* EZAudioPlotGLKViewController.m */; };
|
||||
664FC68D1A9DB8D9001D0184 /* EZMicrophone.m in Sources */ = {isa = PBXBuildFile; fileRef = 664FC6781A9DB8D9001D0184 /* EZMicrophone.m */; };
|
||||
664FC68E1A9DB8D9001D0184 /* EZOutput.m in Sources */ = {isa = PBXBuildFile; fileRef = 664FC67A1A9DB8D9001D0184 /* EZOutput.m */; };
|
||||
664FC68F1A9DB8D9001D0184 /* EZPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 664FC67C1A9DB8D9001D0184 /* EZPlot.m */; };
|
||||
664FC6901A9DB8D9001D0184 /* EZRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 664FC67E1A9DB8D9001D0184 /* EZRecorder.m */; };
|
||||
664FC6911A9DB8D9001D0184 /* TPCircularBuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 664FC67F1A9DB8D9001D0184 /* TPCircularBuffer.c */; };
|
||||
664FC6921A9DB8D9001D0184 /* CHANGELOG in Resources */ = {isa = PBXBuildFile; fileRef = 664FC6821A9DB8D9001D0184 /* CHANGELOG */; };
|
||||
664FC6931A9DB8D9001D0184 /* VERSION in Resources */ = {isa = PBXBuildFile; fileRef = 664FC6831A9DB8D9001D0184 /* VERSION */; };
|
||||
9417A6C718658FB500D9D37B /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9417A6C618658FB500D9D37B /* AudioToolbox.framework */; };
|
||||
9417A6C918658FC000D9D37B /* GLKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9417A6C818658FC000D9D37B /* GLKit.framework */; };
|
||||
9417A6D1186591CA00D9D37B /* simple-drum-beat.wav in Resources */ = {isa = PBXBuildFile; fileRef = 9417A6D0186591CA00D9D37B /* simple-drum-beat.wav */; };
|
||||
9417A8281867DDF600D9D37B /* AEFloatConverter.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A8101867DDF600D9D37B /* AEFloatConverter.m */; };
|
||||
9417A8291867DDF600D9D37B /* EZAudio.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A8121867DDF600D9D37B /* EZAudio.m */; };
|
||||
9417A82A1867DDF600D9D37B /* EZAudioFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A8141867DDF600D9D37B /* EZAudioFile.m */; };
|
||||
9417A82B1867DDF600D9D37B /* EZAudioPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A8161867DDF600D9D37B /* EZAudioPlot.m */; };
|
||||
9417A82C1867DDF600D9D37B /* EZAudioPlotGL.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A8181867DDF600D9D37B /* EZAudioPlotGL.m */; };
|
||||
9417A82D1867DDF600D9D37B /* EZAudioPlotGLKViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A81A1867DDF600D9D37B /* EZAudioPlotGLKViewController.m */; };
|
||||
9417A82E1867DDF600D9D37B /* EZMicrophone.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A81C1867DDF600D9D37B /* EZMicrophone.m */; };
|
||||
9417A82F1867DDF600D9D37B /* EZOutput.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A81E1867DDF600D9D37B /* EZOutput.m */; };
|
||||
9417A8301867DDF600D9D37B /* EZPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A8201867DDF600D9D37B /* EZPlot.m */; };
|
||||
9417A8311867DDF600D9D37B /* EZRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A8221867DDF600D9D37B /* EZRecorder.m */; };
|
||||
9417A8321867DDF600D9D37B /* TPCircularBuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 9417A8231867DDF600D9D37B /* TPCircularBuffer.c */; };
|
||||
9417A8331867DDF600D9D37B /* CHANGELOG in Resources */ = {isa = PBXBuildFile; fileRef = 9417A8261867DDF600D9D37B /* CHANGELOG */; };
|
||||
9417A8341867DDF600D9D37B /* VERSION in Resources */ = {isa = PBXBuildFile; fileRef = 9417A8271867DDF600D9D37B /* VERSION */; };
|
||||
944D03DD186038A60076EF7A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 944D03DC186038A60076EF7A /* Foundation.framework */; };
|
||||
944D03DF186038A60076EF7A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 944D03DE186038A60076EF7A /* CoreGraphics.framework */; };
|
||||
944D03E1186038A60076EF7A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 944D03E0186038A60076EF7A /* UIKit.framework */; };
|
||||
@@ -52,33 +54,38 @@
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
664FC6651A9DB8D9001D0184 /* AEFloatConverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AEFloatConverter.h; sourceTree = "<group>"; };
|
||||
664FC6661A9DB8D9001D0184 /* AEFloatConverter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AEFloatConverter.m; sourceTree = "<group>"; };
|
||||
664FC6671A9DB8D9001D0184 /* EZAudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudio.h; sourceTree = "<group>"; };
|
||||
664FC6691A9DB8D9001D0184 /* EZAudioFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioFile.h; sourceTree = "<group>"; };
|
||||
664FC66A1A9DB8D9001D0184 /* EZAudioFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioFile.m; sourceTree = "<group>"; };
|
||||
664FC66B1A9DB8D9001D0184 /* EZAudioFloatConverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioFloatConverter.h; sourceTree = "<group>"; };
|
||||
664FC66C1A9DB8D9001D0184 /* EZAudioFloatConverter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioFloatConverter.m; sourceTree = "<group>"; };
|
||||
664FC66D1A9DB8D9001D0184 /* EZAudioFloatData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioFloatData.h; sourceTree = "<group>"; };
|
||||
664FC66E1A9DB8D9001D0184 /* EZAudioFloatData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioFloatData.m; sourceTree = "<group>"; };
|
||||
664FC66F1A9DB8D9001D0184 /* EZAudioPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlayer.h; sourceTree = "<group>"; };
|
||||
664FC6701A9DB8D9001D0184 /* EZAudioPlayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlayer.m; sourceTree = "<group>"; };
|
||||
664FC6711A9DB8D9001D0184 /* EZAudioPlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlot.h; sourceTree = "<group>"; };
|
||||
664FC6721A9DB8D9001D0184 /* EZAudioPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlot.m; sourceTree = "<group>"; };
|
||||
664FC6731A9DB8D9001D0184 /* EZAudioPlotGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGL.h; sourceTree = "<group>"; };
|
||||
664FC6741A9DB8D9001D0184 /* EZAudioPlotGL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGL.m; sourceTree = "<group>"; };
|
||||
664FC6751A9DB8D9001D0184 /* EZAudioPlotGLKViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGLKViewController.h; sourceTree = "<group>"; };
|
||||
664FC6761A9DB8D9001D0184 /* EZAudioPlotGLKViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGLKViewController.m; sourceTree = "<group>"; };
|
||||
664FC6771A9DB8D9001D0184 /* EZMicrophone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZMicrophone.h; sourceTree = "<group>"; };
|
||||
664FC6781A9DB8D9001D0184 /* EZMicrophone.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZMicrophone.m; sourceTree = "<group>"; };
|
||||
664FC6791A9DB8D9001D0184 /* EZOutput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZOutput.h; sourceTree = "<group>"; };
|
||||
664FC67A1A9DB8D9001D0184 /* EZOutput.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZOutput.m; sourceTree = "<group>"; };
|
||||
664FC67B1A9DB8D9001D0184 /* EZPlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZPlot.h; sourceTree = "<group>"; };
|
||||
664FC67C1A9DB8D9001D0184 /* EZPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZPlot.m; sourceTree = "<group>"; };
|
||||
664FC67D1A9DB8D9001D0184 /* EZRecorder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZRecorder.h; sourceTree = "<group>"; };
|
||||
664FC67E1A9DB8D9001D0184 /* EZRecorder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZRecorder.m; sourceTree = "<group>"; };
|
||||
664FC67F1A9DB8D9001D0184 /* TPCircularBuffer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = TPCircularBuffer.c; sourceTree = "<group>"; };
|
||||
664FC6801A9DB8D9001D0184 /* TPCircularBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TPCircularBuffer.h; sourceTree = "<group>"; };
|
||||
664FC6821A9DB8D9001D0184 /* CHANGELOG */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CHANGELOG; sourceTree = "<group>"; };
|
||||
664FC6831A9DB8D9001D0184 /* VERSION */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VERSION; sourceTree = "<group>"; };
|
||||
9417A6C618658FB500D9D37B /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
|
||||
9417A6C818658FC000D9D37B /* GLKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLKit.framework; path = System/Library/Frameworks/GLKit.framework; sourceTree = SDKROOT; };
|
||||
9417A6D0186591CA00D9D37B /* simple-drum-beat.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = "simple-drum-beat.wav"; path = "../../../simple-drum-beat.wav"; sourceTree = "<group>"; };
|
||||
9417A80F1867DDF600D9D37B /* AEFloatConverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AEFloatConverter.h; sourceTree = "<group>"; };
|
||||
9417A8101867DDF600D9D37B /* AEFloatConverter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AEFloatConverter.m; sourceTree = "<group>"; };
|
||||
9417A8111867DDF600D9D37B /* EZAudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudio.h; sourceTree = "<group>"; };
|
||||
9417A8121867DDF600D9D37B /* EZAudio.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudio.m; sourceTree = "<group>"; };
|
||||
9417A8131867DDF600D9D37B /* EZAudioFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioFile.h; sourceTree = "<group>"; };
|
||||
9417A8141867DDF600D9D37B /* EZAudioFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioFile.m; sourceTree = "<group>"; };
|
||||
9417A8151867DDF600D9D37B /* EZAudioPlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlot.h; sourceTree = "<group>"; };
|
||||
9417A8161867DDF600D9D37B /* EZAudioPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlot.m; sourceTree = "<group>"; };
|
||||
9417A8171867DDF600D9D37B /* EZAudioPlotGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGL.h; sourceTree = "<group>"; };
|
||||
9417A8181867DDF600D9D37B /* EZAudioPlotGL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGL.m; sourceTree = "<group>"; };
|
||||
9417A8191867DDF600D9D37B /* EZAudioPlotGLKViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGLKViewController.h; sourceTree = "<group>"; };
|
||||
9417A81A1867DDF600D9D37B /* EZAudioPlotGLKViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGLKViewController.m; sourceTree = "<group>"; };
|
||||
9417A81B1867DDF600D9D37B /* EZMicrophone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZMicrophone.h; sourceTree = "<group>"; };
|
||||
9417A81C1867DDF600D9D37B /* EZMicrophone.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZMicrophone.m; sourceTree = "<group>"; };
|
||||
9417A81D1867DDF600D9D37B /* EZOutput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZOutput.h; sourceTree = "<group>"; };
|
||||
9417A81E1867DDF600D9D37B /* EZOutput.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZOutput.m; sourceTree = "<group>"; };
|
||||
9417A81F1867DDF600D9D37B /* EZPlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZPlot.h; sourceTree = "<group>"; };
|
||||
9417A8201867DDF600D9D37B /* EZPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZPlot.m; sourceTree = "<group>"; };
|
||||
9417A8211867DDF600D9D37B /* EZRecorder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZRecorder.h; sourceTree = "<group>"; };
|
||||
9417A8221867DDF600D9D37B /* EZRecorder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZRecorder.m; sourceTree = "<group>"; };
|
||||
9417A8231867DDF600D9D37B /* TPCircularBuffer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = TPCircularBuffer.c; sourceTree = "<group>"; };
|
||||
9417A8241867DDF600D9D37B /* TPCircularBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TPCircularBuffer.h; sourceTree = "<group>"; };
|
||||
9417A8261867DDF600D9D37B /* CHANGELOG */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CHANGELOG; sourceTree = "<group>"; };
|
||||
9417A8271867DDF600D9D37B /* VERSION */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VERSION; sourceTree = "<group>"; };
|
||||
944D03D9186038A60076EF7A /* EZAudioPlayFileExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = EZAudioPlayFileExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
944D03DC186038A60076EF7A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
944D03DE186038A60076EF7A /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
|
||||
@@ -129,42 +136,47 @@
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
9417A80E1867DDF600D9D37B /* EZAudio */ = {
|
||||
664FC6641A9DB8D9001D0184 /* EZAudio */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9417A80F1867DDF600D9D37B /* AEFloatConverter.h */,
|
||||
9417A8101867DDF600D9D37B /* AEFloatConverter.m */,
|
||||
9417A8111867DDF600D9D37B /* EZAudio.h */,
|
||||
9417A8121867DDF600D9D37B /* EZAudio.m */,
|
||||
9417A8131867DDF600D9D37B /* EZAudioFile.h */,
|
||||
9417A8141867DDF600D9D37B /* EZAudioFile.m */,
|
||||
9417A8151867DDF600D9D37B /* EZAudioPlot.h */,
|
||||
9417A8161867DDF600D9D37B /* EZAudioPlot.m */,
|
||||
9417A8171867DDF600D9D37B /* EZAudioPlotGL.h */,
|
||||
9417A8181867DDF600D9D37B /* EZAudioPlotGL.m */,
|
||||
9417A8191867DDF600D9D37B /* EZAudioPlotGLKViewController.h */,
|
||||
9417A81A1867DDF600D9D37B /* EZAudioPlotGLKViewController.m */,
|
||||
9417A81B1867DDF600D9D37B /* EZMicrophone.h */,
|
||||
9417A81C1867DDF600D9D37B /* EZMicrophone.m */,
|
||||
9417A81D1867DDF600D9D37B /* EZOutput.h */,
|
||||
9417A81E1867DDF600D9D37B /* EZOutput.m */,
|
||||
9417A81F1867DDF600D9D37B /* EZPlot.h */,
|
||||
9417A8201867DDF600D9D37B /* EZPlot.m */,
|
||||
9417A8211867DDF600D9D37B /* EZRecorder.h */,
|
||||
9417A8221867DDF600D9D37B /* EZRecorder.m */,
|
||||
9417A8231867DDF600D9D37B /* TPCircularBuffer.c */,
|
||||
9417A8241867DDF600D9D37B /* TPCircularBuffer.h */,
|
||||
9417A8251867DDF600D9D37B /* VERSION */,
|
||||
664FC6651A9DB8D9001D0184 /* AEFloatConverter.h */,
|
||||
664FC6661A9DB8D9001D0184 /* AEFloatConverter.m */,
|
||||
664FC6671A9DB8D9001D0184 /* EZAudio.h */,
|
||||
664FC6691A9DB8D9001D0184 /* EZAudioFile.h */,
|
||||
664FC66A1A9DB8D9001D0184 /* EZAudioFile.m */,
|
||||
664FC66B1A9DB8D9001D0184 /* EZAudioFloatConverter.h */,
|
||||
664FC66C1A9DB8D9001D0184 /* EZAudioFloatConverter.m */,
|
||||
664FC66D1A9DB8D9001D0184 /* EZAudioFloatData.h */,
|
||||
664FC66E1A9DB8D9001D0184 /* EZAudioFloatData.m */,
|
||||
664FC66F1A9DB8D9001D0184 /* EZAudioPlayer.h */,
|
||||
664FC6701A9DB8D9001D0184 /* EZAudioPlayer.m */,
|
||||
664FC6711A9DB8D9001D0184 /* EZAudioPlot.h */,
|
||||
664FC6721A9DB8D9001D0184 /* EZAudioPlot.m */,
|
||||
664FC6731A9DB8D9001D0184 /* EZAudioPlotGL.h */,
|
||||
664FC6741A9DB8D9001D0184 /* EZAudioPlotGL.m */,
|
||||
664FC6751A9DB8D9001D0184 /* EZAudioPlotGLKViewController.h */,
|
||||
664FC6761A9DB8D9001D0184 /* EZAudioPlotGLKViewController.m */,
|
||||
664FC6771A9DB8D9001D0184 /* EZMicrophone.h */,
|
||||
664FC6781A9DB8D9001D0184 /* EZMicrophone.m */,
|
||||
664FC6791A9DB8D9001D0184 /* EZOutput.h */,
|
||||
664FC67A1A9DB8D9001D0184 /* EZOutput.m */,
|
||||
664FC67B1A9DB8D9001D0184 /* EZPlot.h */,
|
||||
664FC67C1A9DB8D9001D0184 /* EZPlot.m */,
|
||||
664FC67D1A9DB8D9001D0184 /* EZRecorder.h */,
|
||||
664FC67E1A9DB8D9001D0184 /* EZRecorder.m */,
|
||||
664FC67F1A9DB8D9001D0184 /* TPCircularBuffer.c */,
|
||||
664FC6801A9DB8D9001D0184 /* TPCircularBuffer.h */,
|
||||
664FC6811A9DB8D9001D0184 /* VERSION */,
|
||||
);
|
||||
name = EZAudio;
|
||||
path = ../../../../EZAudio;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9417A8251867DDF600D9D37B /* VERSION */ = {
|
||||
664FC6811A9DB8D9001D0184 /* VERSION */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9417A8261867DDF600D9D37B /* CHANGELOG */,
|
||||
9417A8271867DDF600D9D37B /* VERSION */,
|
||||
664FC6821A9DB8D9001D0184 /* CHANGELOG */,
|
||||
664FC6831A9DB8D9001D0184 /* VERSION */,
|
||||
);
|
||||
path = VERSION;
|
||||
sourceTree = "<group>";
|
||||
@@ -205,7 +217,7 @@
|
||||
944D03E2186038A60076EF7A /* EZAudioPlayFileExample */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9417A80E1867DDF600D9D37B /* EZAudio */,
|
||||
664FC6641A9DB8D9001D0184 /* EZAudio */,
|
||||
944D03EB186038A60076EF7A /* AppDelegate.h */,
|
||||
944D03EC186038A60076EF7A /* AppDelegate.m */,
|
||||
944D03EE186038A60076EF7A /* Main_iPhone.storyboard */,
|
||||
@@ -325,12 +337,12 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
9417A6D1186591CA00D9D37B /* simple-drum-beat.wav in Resources */,
|
||||
9417A8341867DDF600D9D37B /* VERSION in Resources */,
|
||||
664FC6931A9DB8D9001D0184 /* VERSION in Resources */,
|
||||
944D03F3186038A60076EF7A /* Main_iPad.storyboard in Resources */,
|
||||
944D03F8186038A60076EF7A /* Images.xcassets in Resources */,
|
||||
944D03F0186038A60076EF7A /* Main_iPhone.storyboard in Resources */,
|
||||
944D03E7186038A60076EF7A /* InfoPlist.strings in Resources */,
|
||||
9417A8331867DDF600D9D37B /* CHANGELOG in Resources */,
|
||||
664FC6921A9DB8D9001D0184 /* CHANGELOG in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -349,20 +361,22 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
9417A8321867DDF600D9D37B /* TPCircularBuffer.c in Sources */,
|
||||
9417A82F1867DDF600D9D37B /* EZOutput.m in Sources */,
|
||||
9417A82D1867DDF600D9D37B /* EZAudioPlotGLKViewController.m in Sources */,
|
||||
664FC68F1A9DB8D9001D0184 /* EZPlot.m in Sources */,
|
||||
664FC68B1A9DB8D9001D0184 /* EZAudioPlotGL.m in Sources */,
|
||||
944D03ED186038A60076EF7A /* AppDelegate.m in Sources */,
|
||||
9417A8281867DDF600D9D37B /* AEFloatConverter.m in Sources */,
|
||||
664FC6841A9DB8D9001D0184 /* AEFloatConverter.m in Sources */,
|
||||
944D043D1860398B0076EF7A /* PlayFileViewController.m in Sources */,
|
||||
9417A82B1867DDF600D9D37B /* EZAudioPlot.m in Sources */,
|
||||
9417A82A1867DDF600D9D37B /* EZAudioFile.m in Sources */,
|
||||
9417A82C1867DDF600D9D37B /* EZAudioPlotGL.m in Sources */,
|
||||
664FC6861A9DB8D9001D0184 /* EZAudioFile.m in Sources */,
|
||||
944D03E9186038A60076EF7A /* main.m in Sources */,
|
||||
9417A8301867DDF600D9D37B /* EZPlot.m in Sources */,
|
||||
9417A82E1867DDF600D9D37B /* EZMicrophone.m in Sources */,
|
||||
9417A8311867DDF600D9D37B /* EZRecorder.m in Sources */,
|
||||
9417A8291867DDF600D9D37B /* EZAudio.m in Sources */,
|
||||
664FC68C1A9DB8D9001D0184 /* EZAudioPlotGLKViewController.m in Sources */,
|
||||
664FC6891A9DB8D9001D0184 /* EZAudioPlayer.m in Sources */,
|
||||
664FC68E1A9DB8D9001D0184 /* EZOutput.m in Sources */,
|
||||
664FC6881A9DB8D9001D0184 /* EZAudioFloatData.m in Sources */,
|
||||
664FC6901A9DB8D9001D0184 /* EZRecorder.m in Sources */,
|
||||
664FC6911A9DB8D9001D0184 /* TPCircularBuffer.c in Sources */,
|
||||
664FC68A1A9DB8D9001D0184 /* EZAudioPlot.m in Sources */,
|
||||
664FC68D1A9DB8D9001D0184 /* EZMicrophone.m in Sources */,
|
||||
664FC6871A9DB8D9001D0184 /* EZAudioFloatConverter.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
||||
+4
-8
@@ -1,7 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="5056" systemVersion="13E28" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="vXZ-lx-hvc">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6254" systemVersion="14C109" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="vXZ-lx-hvc">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3733"/>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6247"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Play File View Controller-->
|
||||
@@ -18,11 +19,9 @@
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="uPM-eF-6ct" customClass="EZAudioPlotGL">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="TsA-XB-MTe">
|
||||
<rect key="frame" x="187" y="520" width="113" height="29"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<segments>
|
||||
<segment title="Buffer"/>
|
||||
<segment title="Rolling"/>
|
||||
@@ -33,14 +32,12 @@
|
||||
</segmentedControl>
|
||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Sh2-sS-uR6">
|
||||
<rect key="frame" x="20" y="488" width="280" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="xKX-cQ-AvV">
|
||||
<rect key="frame" x="20" y="519" width="30" height="30"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<state key="normal" title="Play">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
@@ -48,9 +45,8 @@
|
||||
<action selector="play:" destination="vXZ-lx-hvc" eventType="touchUpInside" id="0vr-5R-dT3"/>
|
||||
</connections>
|
||||
</button>
|
||||
<slider opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="0.5" minValue="0.0" maxValue="1" continuous="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tSM-7B-ujg">
|
||||
<slider opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="0.5" minValue="0.0" maxValue="1" translatesAutoresizingMaskIntoConstraints="NO" id="tSM-7B-ujg">
|
||||
<rect key="frame" x="18" y="447" width="284" height="34"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<connections>
|
||||
<action selector="seekToFrame:" destination="vXZ-lx-hvc" eventType="valueChanged" id="3A8-F6-h6C"/>
|
||||
</connections>
|
||||
|
||||
+20
-19
@@ -129,26 +129,27 @@
|
||||
|
||||
-(void)openFileWithFilePathURL:(NSURL*)filePathURL {
|
||||
|
||||
// Stop playback
|
||||
[[EZOutput sharedOutput] stopPlayback];
|
||||
|
||||
self.audioFile = [EZAudioFile audioFileWithURL:filePathURL];
|
||||
self.audioFile.audioFileDelegate = self;
|
||||
self.eof = NO;
|
||||
self.filePathLabel.text = filePathURL.lastPathComponent;
|
||||
self.framePositionSlider.maximumValue = (float)self.audioFile.totalFrames;
|
||||
|
||||
// Set the client format from the EZAudioFile on the output
|
||||
[[EZOutput sharedOutput] setAudioStreamBasicDescription:self.audioFile.clientFormat];
|
||||
// Stop playback
|
||||
[[EZOutput sharedOutput] stopPlayback];
|
||||
|
||||
// Plot the whole waveform
|
||||
self.audioPlot.plotType = EZPlotTypeBuffer;
|
||||
self.audioPlot.shouldFill = YES;
|
||||
self.audioPlot.shouldMirror = YES;
|
||||
[self.audioFile getWaveformDataWithCompletionBlock:^(float *waveformData, UInt32 length) {
|
||||
[self.audioPlot updateBuffer:waveformData withBufferSize:length];
|
||||
}];
|
||||
|
||||
self.audioFile = [EZAudioFile audioFileWithURL:filePathURL];
|
||||
self.audioFile.delegate = self;
|
||||
self.eof = NO;
|
||||
self.filePathLabel.text = filePathURL.lastPathComponent;
|
||||
self.framePositionSlider.maximumValue = (float)self.audioFile.totalFrames;
|
||||
|
||||
// Set the client format from the EZAudioFile on the output
|
||||
[[EZOutput sharedOutput] setAudioStreamBasicDescription:self.audioFile.clientFormat];
|
||||
|
||||
// Plot the whole waveform
|
||||
self.audioPlot.plotType = EZPlotTypeBuffer;
|
||||
self.audioPlot.shouldFill = YES;
|
||||
self.audioPlot.shouldMirror = YES;
|
||||
|
||||
[self.audioFile getWaveformDataWithCompletionBlock:^(EZAudioFloatData *waveformData) {
|
||||
[self.audioPlot updateBuffer:[waveformData bufferForChannel:0]
|
||||
withBufferSize:waveformData.bufferSize];
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - EZAudioFileDelegate
|
||||
|
||||
Binary file not shown.
+125
-115
@@ -7,14 +7,31 @@
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
664371341B0A90D900A8B5F0 /* MainStoryboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 664371331B0A90D900A8B5F0 /* MainStoryboard.storyboard */; };
|
||||
6659564F1B37F328003E97A1 /* EZAudio.m in Sources */ = {isa = PBXBuildFile; fileRef = 6659562D1B37F328003E97A1 /* EZAudio.m */; };
|
||||
665956501B37F328003E97A1 /* EZAudioDevice.m in Sources */ = {isa = PBXBuildFile; fileRef = 6659562F1B37F328003E97A1 /* EZAudioDevice.m */; };
|
||||
665956511B37F328003E97A1 /* EZAudioDisplayLink.m in Sources */ = {isa = PBXBuildFile; fileRef = 665956311B37F328003E97A1 /* EZAudioDisplayLink.m */; };
|
||||
665956521B37F328003E97A1 /* EZAudioFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 665956331B37F328003E97A1 /* EZAudioFile.m */; };
|
||||
665956531B37F328003E97A1 /* EZAudioFloatConverter.m in Sources */ = {isa = PBXBuildFile; fileRef = 665956351B37F328003E97A1 /* EZAudioFloatConverter.m */; };
|
||||
665956541B37F328003E97A1 /* EZAudioFloatData.m in Sources */ = {isa = PBXBuildFile; fileRef = 665956371B37F328003E97A1 /* EZAudioFloatData.m */; };
|
||||
665956551B37F328003E97A1 /* EZAudioPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 665956391B37F328003E97A1 /* EZAudioPlayer.m */; };
|
||||
665956561B37F328003E97A1 /* EZAudioPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 6659563B1B37F328003E97A1 /* EZAudioPlot.m */; };
|
||||
665956571B37F328003E97A1 /* EZAudioPlotGL.m in Sources */ = {isa = PBXBuildFile; fileRef = 6659563D1B37F328003E97A1 /* EZAudioPlotGL.m */; };
|
||||
665956581B37F328003E97A1 /* EZAudioPlotGLKViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6659563F1B37F328003E97A1 /* EZAudioPlotGLKViewController.m */; };
|
||||
665956591B37F328003E97A1 /* EZAudioUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 665956411B37F328003E97A1 /* EZAudioUtilities.m */; };
|
||||
6659565A1B37F328003E97A1 /* EZMicrophone.m in Sources */ = {isa = PBXBuildFile; fileRef = 665956431B37F328003E97A1 /* EZMicrophone.m */; };
|
||||
6659565B1B37F328003E97A1 /* EZOutput.m in Sources */ = {isa = PBXBuildFile; fileRef = 665956451B37F328003E97A1 /* EZOutput.m */; };
|
||||
6659565C1B37F328003E97A1 /* EZPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 665956471B37F328003E97A1 /* EZPlot.m */; };
|
||||
6659565D1B37F328003E97A1 /* EZRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 665956491B37F328003E97A1 /* EZRecorder.m */; };
|
||||
6659565E1B37F328003E97A1 /* TPCircularBuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 6659564A1B37F328003E97A1 /* TPCircularBuffer.c */; };
|
||||
6659565F1B37F328003E97A1 /* CHANGELOG in Resources */ = {isa = PBXBuildFile; fileRef = 6659564D1B37F328003E97A1 /* CHANGELOG */; };
|
||||
665956601B37F328003E97A1 /* VERSION in Resources */ = {isa = PBXBuildFile; fileRef = 6659564E1B37F328003E97A1 /* VERSION */; };
|
||||
9405705E185E69D400EB94BA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9405705D185E69D400EB94BA /* Foundation.framework */; };
|
||||
94057060185E69D400EB94BA /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9405705F185E69D400EB94BA /* CoreGraphics.framework */; };
|
||||
94057062185E69D400EB94BA /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94057061185E69D400EB94BA /* UIKit.framework */; };
|
||||
94057068185E69D400EB94BA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 94057066185E69D400EB94BA /* InfoPlist.strings */; };
|
||||
9405706A185E69D400EB94BA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 94057069185E69D400EB94BA /* main.m */; };
|
||||
9405706E185E69D400EB94BA /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 9405706D185E69D400EB94BA /* AppDelegate.m */; };
|
||||
94057071185E69D400EB94BA /* Main_iPhone.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9405706F185E69D400EB94BA /* Main_iPhone.storyboard */; };
|
||||
94057074185E69D400EB94BA /* Main_iPad.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 94057072185E69D400EB94BA /* Main_iPad.storyboard */; };
|
||||
94057079185E69D400EB94BA /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 94057078185E69D400EB94BA /* Images.xcassets */; };
|
||||
94057080185E69D400EB94BA /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9405707F185E69D400EB94BA /* XCTest.framework */; };
|
||||
94057081185E69D400EB94BA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9405705D185E69D400EB94BA /* Foundation.framework */; };
|
||||
@@ -25,19 +42,6 @@
|
||||
9417A6C118658F9700D9D37B /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9417A6C018658F9700D9D37B /* AudioToolbox.framework */; };
|
||||
9417A6C318658F9C00D9D37B /* GLKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9417A6C218658F9C00D9D37B /* GLKit.framework */; };
|
||||
9417A6CF186591BC00D9D37B /* simple-drum-beat.wav in Resources */ = {isa = PBXBuildFile; fileRef = 9417A6CE186591BC00D9D37B /* simple-drum-beat.wav */; };
|
||||
9417A8761867DE0F00D9D37B /* AEFloatConverter.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A85E1867DE0F00D9D37B /* AEFloatConverter.m */; };
|
||||
9417A8771867DE0F00D9D37B /* EZAudio.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A8601867DE0F00D9D37B /* EZAudio.m */; };
|
||||
9417A8781867DE0F00D9D37B /* EZAudioFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A8621867DE0F00D9D37B /* EZAudioFile.m */; };
|
||||
9417A8791867DE0F00D9D37B /* EZAudioPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A8641867DE0F00D9D37B /* EZAudioPlot.m */; };
|
||||
9417A87A1867DE0F00D9D37B /* EZAudioPlotGL.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A8661867DE0F00D9D37B /* EZAudioPlotGL.m */; };
|
||||
9417A87B1867DE0F00D9D37B /* EZAudioPlotGLKViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A8681867DE0F00D9D37B /* EZAudioPlotGLKViewController.m */; };
|
||||
9417A87C1867DE0F00D9D37B /* EZMicrophone.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A86A1867DE0F00D9D37B /* EZMicrophone.m */; };
|
||||
9417A87D1867DE0F00D9D37B /* EZOutput.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A86C1867DE0F00D9D37B /* EZOutput.m */; };
|
||||
9417A87E1867DE0F00D9D37B /* EZPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A86E1867DE0F00D9D37B /* EZPlot.m */; };
|
||||
9417A87F1867DE0F00D9D37B /* EZRecorder.m in Sources */ = {isa = PBXBuildFile; fileRef = 9417A8701867DE0F00D9D37B /* EZRecorder.m */; };
|
||||
9417A8801867DE0F00D9D37B /* TPCircularBuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 9417A8711867DE0F00D9D37B /* TPCircularBuffer.c */; };
|
||||
9417A8811867DE0F00D9D37B /* CHANGELOG in Resources */ = {isa = PBXBuildFile; fileRef = 9417A8741867DE0F00D9D37B /* CHANGELOG */; };
|
||||
9417A8821867DE0F00D9D37B /* VERSION in Resources */ = {isa = PBXBuildFile; fileRef = 9417A8751867DE0F00D9D37B /* VERSION */; };
|
||||
94FBB77718B156AE007CAE45 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94FBB77618B156AE007CAE45 /* AVFoundation.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
@@ -52,6 +56,41 @@
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
664371331B0A90D900A8B5F0 /* MainStoryboard.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = MainStoryboard.storyboard; sourceTree = "<group>"; };
|
||||
6659562C1B37F328003E97A1 /* EZAudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudio.h; sourceTree = "<group>"; };
|
||||
6659562D1B37F328003E97A1 /* EZAudio.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudio.m; sourceTree = "<group>"; };
|
||||
6659562E1B37F328003E97A1 /* EZAudioDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioDevice.h; sourceTree = "<group>"; };
|
||||
6659562F1B37F328003E97A1 /* EZAudioDevice.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioDevice.m; sourceTree = "<group>"; };
|
||||
665956301B37F328003E97A1 /* EZAudioDisplayLink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioDisplayLink.h; sourceTree = "<group>"; };
|
||||
665956311B37F328003E97A1 /* EZAudioDisplayLink.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioDisplayLink.m; sourceTree = "<group>"; };
|
||||
665956321B37F328003E97A1 /* EZAudioFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioFile.h; sourceTree = "<group>"; };
|
||||
665956331B37F328003E97A1 /* EZAudioFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioFile.m; sourceTree = "<group>"; };
|
||||
665956341B37F328003E97A1 /* EZAudioFloatConverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioFloatConverter.h; sourceTree = "<group>"; };
|
||||
665956351B37F328003E97A1 /* EZAudioFloatConverter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioFloatConverter.m; sourceTree = "<group>"; };
|
||||
665956361B37F328003E97A1 /* EZAudioFloatData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioFloatData.h; sourceTree = "<group>"; };
|
||||
665956371B37F328003E97A1 /* EZAudioFloatData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioFloatData.m; sourceTree = "<group>"; };
|
||||
665956381B37F328003E97A1 /* EZAudioPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlayer.h; sourceTree = "<group>"; };
|
||||
665956391B37F328003E97A1 /* EZAudioPlayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlayer.m; sourceTree = "<group>"; };
|
||||
6659563A1B37F328003E97A1 /* EZAudioPlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlot.h; sourceTree = "<group>"; };
|
||||
6659563B1B37F328003E97A1 /* EZAudioPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlot.m; sourceTree = "<group>"; };
|
||||
6659563C1B37F328003E97A1 /* EZAudioPlotGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGL.h; sourceTree = "<group>"; };
|
||||
6659563D1B37F328003E97A1 /* EZAudioPlotGL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGL.m; sourceTree = "<group>"; };
|
||||
6659563E1B37F328003E97A1 /* EZAudioPlotGLKViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGLKViewController.h; sourceTree = "<group>"; };
|
||||
6659563F1B37F328003E97A1 /* EZAudioPlotGLKViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGLKViewController.m; sourceTree = "<group>"; };
|
||||
665956401B37F328003E97A1 /* EZAudioUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioUtilities.h; sourceTree = "<group>"; };
|
||||
665956411B37F328003E97A1 /* EZAudioUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioUtilities.m; sourceTree = "<group>"; };
|
||||
665956421B37F328003E97A1 /* EZMicrophone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZMicrophone.h; sourceTree = "<group>"; };
|
||||
665956431B37F328003E97A1 /* EZMicrophone.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZMicrophone.m; sourceTree = "<group>"; };
|
||||
665956441B37F328003E97A1 /* EZOutput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZOutput.h; sourceTree = "<group>"; };
|
||||
665956451B37F328003E97A1 /* EZOutput.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZOutput.m; sourceTree = "<group>"; };
|
||||
665956461B37F328003E97A1 /* EZPlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZPlot.h; sourceTree = "<group>"; };
|
||||
665956471B37F328003E97A1 /* EZPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZPlot.m; sourceTree = "<group>"; };
|
||||
665956481B37F328003E97A1 /* EZRecorder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZRecorder.h; sourceTree = "<group>"; };
|
||||
665956491B37F328003E97A1 /* EZRecorder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZRecorder.m; sourceTree = "<group>"; };
|
||||
6659564A1B37F328003E97A1 /* TPCircularBuffer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = TPCircularBuffer.c; sourceTree = "<group>"; };
|
||||
6659564B1B37F328003E97A1 /* TPCircularBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TPCircularBuffer.h; sourceTree = "<group>"; };
|
||||
6659564D1B37F328003E97A1 /* CHANGELOG */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CHANGELOG; sourceTree = "<group>"; };
|
||||
6659564E1B37F328003E97A1 /* VERSION */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VERSION; sourceTree = "<group>"; };
|
||||
9405705A185E69D400EB94BA /* EZAudioWaveformFromFileExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = EZAudioWaveformFromFileExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
9405705D185E69D400EB94BA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
9405705F185E69D400EB94BA /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
|
||||
@@ -62,8 +101,6 @@
|
||||
9405706B185E69D400EB94BA /* EZAudioWaveformFromFileExample-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "EZAudioWaveformFromFileExample-Prefix.pch"; sourceTree = "<group>"; };
|
||||
9405706C185E69D400EB94BA /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
|
||||
9405706D185E69D400EB94BA /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
|
||||
94057070185E69D400EB94BA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main_iPhone.storyboard; sourceTree = "<group>"; };
|
||||
94057073185E69D400EB94BA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main_iPad.storyboard; sourceTree = "<group>"; };
|
||||
94057078185E69D400EB94BA /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
|
||||
9405707E185E69D400EB94BA /* EZAudioWaveformFromFileExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = EZAudioWaveformFromFileExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
9405707F185E69D400EB94BA /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
|
||||
@@ -75,30 +112,6 @@
|
||||
9417A6C018658F9700D9D37B /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
|
||||
9417A6C218658F9C00D9D37B /* GLKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLKit.framework; path = System/Library/Frameworks/GLKit.framework; sourceTree = SDKROOT; };
|
||||
9417A6CE186591BC00D9D37B /* simple-drum-beat.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = "simple-drum-beat.wav"; path = "../../../simple-drum-beat.wav"; sourceTree = "<group>"; };
|
||||
9417A85D1867DE0F00D9D37B /* AEFloatConverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AEFloatConverter.h; sourceTree = "<group>"; };
|
||||
9417A85E1867DE0F00D9D37B /* AEFloatConverter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AEFloatConverter.m; sourceTree = "<group>"; };
|
||||
9417A85F1867DE0F00D9D37B /* EZAudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudio.h; sourceTree = "<group>"; };
|
||||
9417A8601867DE0F00D9D37B /* EZAudio.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudio.m; sourceTree = "<group>"; };
|
||||
9417A8611867DE0F00D9D37B /* EZAudioFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioFile.h; sourceTree = "<group>"; };
|
||||
9417A8621867DE0F00D9D37B /* EZAudioFile.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioFile.m; sourceTree = "<group>"; };
|
||||
9417A8631867DE0F00D9D37B /* EZAudioPlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlot.h; sourceTree = "<group>"; };
|
||||
9417A8641867DE0F00D9D37B /* EZAudioPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlot.m; sourceTree = "<group>"; };
|
||||
9417A8651867DE0F00D9D37B /* EZAudioPlotGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGL.h; sourceTree = "<group>"; };
|
||||
9417A8661867DE0F00D9D37B /* EZAudioPlotGL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGL.m; sourceTree = "<group>"; };
|
||||
9417A8671867DE0F00D9D37B /* EZAudioPlotGLKViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGLKViewController.h; sourceTree = "<group>"; };
|
||||
9417A8681867DE0F00D9D37B /* EZAudioPlotGLKViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGLKViewController.m; sourceTree = "<group>"; };
|
||||
9417A8691867DE0F00D9D37B /* EZMicrophone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZMicrophone.h; sourceTree = "<group>"; };
|
||||
9417A86A1867DE0F00D9D37B /* EZMicrophone.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZMicrophone.m; sourceTree = "<group>"; };
|
||||
9417A86B1867DE0F00D9D37B /* EZOutput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZOutput.h; sourceTree = "<group>"; };
|
||||
9417A86C1867DE0F00D9D37B /* EZOutput.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZOutput.m; sourceTree = "<group>"; };
|
||||
9417A86D1867DE0F00D9D37B /* EZPlot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZPlot.h; sourceTree = "<group>"; };
|
||||
9417A86E1867DE0F00D9D37B /* EZPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZPlot.m; sourceTree = "<group>"; };
|
||||
9417A86F1867DE0F00D9D37B /* EZRecorder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZRecorder.h; sourceTree = "<group>"; };
|
||||
9417A8701867DE0F00D9D37B /* EZRecorder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZRecorder.m; sourceTree = "<group>"; };
|
||||
9417A8711867DE0F00D9D37B /* TPCircularBuffer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = TPCircularBuffer.c; sourceTree = "<group>"; };
|
||||
9417A8721867DE0F00D9D37B /* TPCircularBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TPCircularBuffer.h; sourceTree = "<group>"; };
|
||||
9417A8741867DE0F00D9D37B /* CHANGELOG */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CHANGELOG; sourceTree = "<group>"; };
|
||||
9417A8751867DE0F00D9D37B /* VERSION */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = VERSION; sourceTree = "<group>"; };
|
||||
94FBB77618B156AE007CAE45 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
@@ -129,6 +142,56 @@
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
6659562B1B37F328003E97A1 /* EZAudio */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
6659562C1B37F328003E97A1 /* EZAudio.h */,
|
||||
6659562D1B37F328003E97A1 /* EZAudio.m */,
|
||||
6659562E1B37F328003E97A1 /* EZAudioDevice.h */,
|
||||
6659562F1B37F328003E97A1 /* EZAudioDevice.m */,
|
||||
665956301B37F328003E97A1 /* EZAudioDisplayLink.h */,
|
||||
665956311B37F328003E97A1 /* EZAudioDisplayLink.m */,
|
||||
665956321B37F328003E97A1 /* EZAudioFile.h */,
|
||||
665956331B37F328003E97A1 /* EZAudioFile.m */,
|
||||
665956341B37F328003E97A1 /* EZAudioFloatConverter.h */,
|
||||
665956351B37F328003E97A1 /* EZAudioFloatConverter.m */,
|
||||
665956361B37F328003E97A1 /* EZAudioFloatData.h */,
|
||||
665956371B37F328003E97A1 /* EZAudioFloatData.m */,
|
||||
665956381B37F328003E97A1 /* EZAudioPlayer.h */,
|
||||
665956391B37F328003E97A1 /* EZAudioPlayer.m */,
|
||||
6659563A1B37F328003E97A1 /* EZAudioPlot.h */,
|
||||
6659563B1B37F328003E97A1 /* EZAudioPlot.m */,
|
||||
6659563C1B37F328003E97A1 /* EZAudioPlotGL.h */,
|
||||
6659563D1B37F328003E97A1 /* EZAudioPlotGL.m */,
|
||||
6659563E1B37F328003E97A1 /* EZAudioPlotGLKViewController.h */,
|
||||
6659563F1B37F328003E97A1 /* EZAudioPlotGLKViewController.m */,
|
||||
665956401B37F328003E97A1 /* EZAudioUtilities.h */,
|
||||
665956411B37F328003E97A1 /* EZAudioUtilities.m */,
|
||||
665956421B37F328003E97A1 /* EZMicrophone.h */,
|
||||
665956431B37F328003E97A1 /* EZMicrophone.m */,
|
||||
665956441B37F328003E97A1 /* EZOutput.h */,
|
||||
665956451B37F328003E97A1 /* EZOutput.m */,
|
||||
665956461B37F328003E97A1 /* EZPlot.h */,
|
||||
665956471B37F328003E97A1 /* EZPlot.m */,
|
||||
665956481B37F328003E97A1 /* EZRecorder.h */,
|
||||
665956491B37F328003E97A1 /* EZRecorder.m */,
|
||||
6659564A1B37F328003E97A1 /* TPCircularBuffer.c */,
|
||||
6659564B1B37F328003E97A1 /* TPCircularBuffer.h */,
|
||||
6659564C1B37F328003E97A1 /* VERSION */,
|
||||
);
|
||||
name = EZAudio;
|
||||
path = ../../../../EZAudio;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
6659564C1B37F328003E97A1 /* VERSION */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
6659564D1B37F328003E97A1 /* CHANGELOG */,
|
||||
6659564E1B37F328003E97A1 /* VERSION */,
|
||||
);
|
||||
path = VERSION;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
94057051185E69D400EB94BA = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -165,11 +228,10 @@
|
||||
94057063185E69D400EB94BA /* EZAudioWaveformFromFileExample */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9417A85C1867DE0F00D9D37B /* EZAudio */,
|
||||
6659562B1B37F328003E97A1 /* EZAudio */,
|
||||
9405706C185E69D400EB94BA /* AppDelegate.h */,
|
||||
9405706D185E69D400EB94BA /* AppDelegate.m */,
|
||||
9405706F185E69D400EB94BA /* Main_iPhone.storyboard */,
|
||||
94057072185E69D400EB94BA /* Main_iPad.storyboard */,
|
||||
664371331B0A90D900A8B5F0 /* MainStoryboard.storyboard */,
|
||||
940570BC185E6A0400EB94BA /* WaveformFromFileViewController.h */,
|
||||
940570BD185E6A0400EB94BA /* WaveformFromFileViewController.m */,
|
||||
9417A6CE186591BC00D9D37B /* simple-drum-beat.wav */,
|
||||
@@ -208,46 +270,6 @@
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9417A85C1867DE0F00D9D37B /* EZAudio */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9417A85D1867DE0F00D9D37B /* AEFloatConverter.h */,
|
||||
9417A85E1867DE0F00D9D37B /* AEFloatConverter.m */,
|
||||
9417A85F1867DE0F00D9D37B /* EZAudio.h */,
|
||||
9417A8601867DE0F00D9D37B /* EZAudio.m */,
|
||||
9417A8611867DE0F00D9D37B /* EZAudioFile.h */,
|
||||
9417A8621867DE0F00D9D37B /* EZAudioFile.m */,
|
||||
9417A8631867DE0F00D9D37B /* EZAudioPlot.h */,
|
||||
9417A8641867DE0F00D9D37B /* EZAudioPlot.m */,
|
||||
9417A8651867DE0F00D9D37B /* EZAudioPlotGL.h */,
|
||||
9417A8661867DE0F00D9D37B /* EZAudioPlotGL.m */,
|
||||
9417A8671867DE0F00D9D37B /* EZAudioPlotGLKViewController.h */,
|
||||
9417A8681867DE0F00D9D37B /* EZAudioPlotGLKViewController.m */,
|
||||
9417A8691867DE0F00D9D37B /* EZMicrophone.h */,
|
||||
9417A86A1867DE0F00D9D37B /* EZMicrophone.m */,
|
||||
9417A86B1867DE0F00D9D37B /* EZOutput.h */,
|
||||
9417A86C1867DE0F00D9D37B /* EZOutput.m */,
|
||||
9417A86D1867DE0F00D9D37B /* EZPlot.h */,
|
||||
9417A86E1867DE0F00D9D37B /* EZPlot.m */,
|
||||
9417A86F1867DE0F00D9D37B /* EZRecorder.h */,
|
||||
9417A8701867DE0F00D9D37B /* EZRecorder.m */,
|
||||
9417A8711867DE0F00D9D37B /* TPCircularBuffer.c */,
|
||||
9417A8721867DE0F00D9D37B /* TPCircularBuffer.h */,
|
||||
9417A8731867DE0F00D9D37B /* VERSION */,
|
||||
);
|
||||
name = EZAudio;
|
||||
path = ../../../../EZAudio;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9417A8731867DE0F00D9D37B /* VERSION */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9417A8741867DE0F00D9D37B /* CHANGELOG */,
|
||||
9417A8751867DE0F00D9D37B /* VERSION */,
|
||||
);
|
||||
path = VERSION;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
@@ -324,13 +346,12 @@
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
664371341B0A90D900A8B5F0 /* MainStoryboard.storyboard in Resources */,
|
||||
9417A6CF186591BC00D9D37B /* simple-drum-beat.wav in Resources */,
|
||||
9417A8821867DE0F00D9D37B /* VERSION in Resources */,
|
||||
94057074185E69D400EB94BA /* Main_iPad.storyboard in Resources */,
|
||||
94057079185E69D400EB94BA /* Images.xcassets in Resources */,
|
||||
94057071185E69D400EB94BA /* Main_iPhone.storyboard in Resources */,
|
||||
665956601B37F328003E97A1 /* VERSION in Resources */,
|
||||
94057068185E69D400EB94BA /* InfoPlist.strings in Resources */,
|
||||
9417A8811867DE0F00D9D37B /* CHANGELOG in Resources */,
|
||||
6659565F1B37F328003E97A1 /* CHANGELOG in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -349,20 +370,25 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
9417A8801867DE0F00D9D37B /* TPCircularBuffer.c in Sources */,
|
||||
9417A87D1867DE0F00D9D37B /* EZOutput.m in Sources */,
|
||||
9417A87B1867DE0F00D9D37B /* EZAudioPlotGLKViewController.m in Sources */,
|
||||
6659565D1B37F328003E97A1 /* EZRecorder.m in Sources */,
|
||||
9405706E185E69D400EB94BA /* AppDelegate.m in Sources */,
|
||||
9417A8761867DE0F00D9D37B /* AEFloatConverter.m in Sources */,
|
||||
665956531B37F328003E97A1 /* EZAudioFloatConverter.m in Sources */,
|
||||
665956541B37F328003E97A1 /* EZAudioFloatData.m in Sources */,
|
||||
6659564F1B37F328003E97A1 /* EZAudio.m in Sources */,
|
||||
665956521B37F328003E97A1 /* EZAudioFile.m in Sources */,
|
||||
6659565B1B37F328003E97A1 /* EZOutput.m in Sources */,
|
||||
665956571B37F328003E97A1 /* EZAudioPlotGL.m in Sources */,
|
||||
6659565E1B37F328003E97A1 /* TPCircularBuffer.c in Sources */,
|
||||
665956561B37F328003E97A1 /* EZAudioPlot.m in Sources */,
|
||||
940570BE185E6A0400EB94BA /* WaveformFromFileViewController.m in Sources */,
|
||||
9417A8791867DE0F00D9D37B /* EZAudioPlot.m in Sources */,
|
||||
9417A8781867DE0F00D9D37B /* EZAudioFile.m in Sources */,
|
||||
9417A87A1867DE0F00D9D37B /* EZAudioPlotGL.m in Sources */,
|
||||
6659565A1B37F328003E97A1 /* EZMicrophone.m in Sources */,
|
||||
665956551B37F328003E97A1 /* EZAudioPlayer.m in Sources */,
|
||||
9405706A185E69D400EB94BA /* main.m in Sources */,
|
||||
9417A87E1867DE0F00D9D37B /* EZPlot.m in Sources */,
|
||||
9417A87C1867DE0F00D9D37B /* EZMicrophone.m in Sources */,
|
||||
9417A87F1867DE0F00D9D37B /* EZRecorder.m in Sources */,
|
||||
9417A8771867DE0F00D9D37B /* EZAudio.m in Sources */,
|
||||
665956511B37F328003E97A1 /* EZAudioDisplayLink.m in Sources */,
|
||||
6659565C1B37F328003E97A1 /* EZPlot.m in Sources */,
|
||||
665956501B37F328003E97A1 /* EZAudioDevice.m in Sources */,
|
||||
665956591B37F328003E97A1 /* EZAudioUtilities.m in Sources */,
|
||||
665956581B37F328003E97A1 /* EZAudioPlotGLKViewController.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@@ -393,22 +419,6 @@
|
||||
name = InfoPlist.strings;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9405706F185E69D400EB94BA /* Main_iPhone.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
94057070185E69D400EB94BA /* Base */,
|
||||
);
|
||||
name = Main_iPhone.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
94057072185E69D400EB94BA /* Main_iPad.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
94057073185E69D400EB94BA /* Base */,
|
||||
);
|
||||
name = Main_iPad.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
94057088185E69D400EB94BA /* InfoPlist.strings */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
|
||||
-46
@@ -1,46 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4514" systemVersion="13A603" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES" initialViewController="BYZ-38-t0r">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3747"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Waveform From File View Controller-->
|
||||
<scene sceneID="tne-QT-ifu">
|
||||
<objects>
|
||||
<viewController id="BYZ-38-t0r" customClass="WaveformFromFileViewController" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="7Mj-Bw-gG2"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="G7Q-3z-VRc"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
||||
<rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="NjS-lu-A8r" customClass="EZAudioPlot">
|
||||
<rect key="frame" x="0.0" y="0.0" width="768" height="1024"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="NjS-lu-A8r" firstAttribute="top" secondItem="8bC-Xf-vdC" secondAttribute="top" id="Hew-2N-2Vc"/>
|
||||
<constraint firstAttribute="bottom" secondItem="NjS-lu-A8r" secondAttribute="bottom" id="QJO-Yr-XAe"/>
|
||||
<constraint firstItem="NjS-lu-A8r" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leading" id="tRl-mN-7qK"/>
|
||||
<constraint firstAttribute="trailing" secondItem="NjS-lu-A8r" secondAttribute="trailing" id="wbC-hw-V1P"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="audioPlot" destination="NjS-lu-A8r" id="MhW-xX-k6l"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
</scene>
|
||||
</scenes>
|
||||
<simulatedMetricsContainer key="defaultSimulatedMetrics">
|
||||
<simulatedStatusBarMetrics key="statusBar" statusBarStyle="blackOpaque"/>
|
||||
<simulatedOrientationMetrics key="orientation"/>
|
||||
<simulatedScreenMetrics key="destination"/>
|
||||
</simulatedMetricsContainer>
|
||||
</document>
|
||||
-50
@@ -1,50 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4514" systemVersion="13A603" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="vXZ-lx-hvc">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3747"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Waveform From File View Controller-->
|
||||
<scene sceneID="ufC-wZ-h7g">
|
||||
<objects>
|
||||
<viewController id="vXZ-lx-hvc" customClass="WaveformFromFileViewController" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="Uy4-gb-cCK"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="anR-IY-kWc"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="kh9-bI-dsS">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="wJ1-QR-zjX" customClass="EZAudioPlot">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="wJ1-QR-zjX" secondAttribute="trailing" id="5iy-IT-HrP"/>
|
||||
<constraint firstItem="wJ1-QR-zjX" firstAttribute="leading" secondItem="kh9-bI-dsS" secondAttribute="leading" id="BW5-rx-Rbd"/>
|
||||
<constraint firstAttribute="trailing" secondItem="wJ1-QR-zjX" secondAttribute="trailing" id="HPH-gi-fep"/>
|
||||
<constraint firstItem="wJ1-QR-zjX" firstAttribute="top" secondItem="kh9-bI-dsS" secondAttribute="top" id="KJa-p3-PCH"/>
|
||||
<constraint firstAttribute="bottom" secondItem="wJ1-QR-zjX" secondAttribute="bottom" id="Kfc-GW-cwF"/>
|
||||
<constraint firstItem="wJ1-QR-zjX" firstAttribute="leading" secondItem="kh9-bI-dsS" secondAttribute="leading" id="WV3-7B-eJI"/>
|
||||
<constraint firstItem="wJ1-QR-zjX" firstAttribute="top" secondItem="kh9-bI-dsS" secondAttribute="top" id="gJX-Eu-y6Z"/>
|
||||
<constraint firstAttribute="bottom" secondItem="wJ1-QR-zjX" secondAttribute="bottom" id="gla-h7-kPa"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="audioPlot" destination="wJ1-QR-zjX" id="6n2-mE-oz7"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
</scene>
|
||||
</scenes>
|
||||
<simulatedMetricsContainer key="defaultSimulatedMetrics">
|
||||
<simulatedStatusBarMetrics key="statusBar"/>
|
||||
<simulatedOrientationMetrics key="orientation"/>
|
||||
<simulatedScreenMetrics key="destination" type="retina4"/>
|
||||
</simulatedMetricsContainer>
|
||||
</document>
|
||||
+2
-2
@@ -25,9 +25,9 @@
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main_iPhone</string>
|
||||
<string>MainStoryboard</string>
|
||||
<key>UIMainStoryboardFile~ipad</key>
|
||||
<string>Main_iPad</string>
|
||||
<string>MainStoryboard</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7702" systemVersion="14C109" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="Mlw-nQ-rjI">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7701"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Waveform From File View Controller-->
|
||||
<scene sceneID="pTa-uf-LcH">
|
||||
<objects>
|
||||
<viewController id="Mlw-nQ-rjI" customClass="WaveformFromFileViewController" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="A6L-0P-MH5"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="l2b-Mr-Lhg"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="hy8-yB-VnN">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" alwaysBounceHorizontal="YES" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dsD-0P-GYs">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="fRU-2C-Uqy" customClass="EZAudioPlot">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
</subviews>
|
||||
</scrollView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="l2b-Mr-Lhg" firstAttribute="top" secondItem="dsD-0P-GYs" secondAttribute="bottom" id="2nw-vO-y58"/>
|
||||
<constraint firstItem="dsD-0P-GYs" firstAttribute="leading" secondItem="hy8-yB-VnN" secondAttribute="leading" id="3p8-TA-OeY"/>
|
||||
<constraint firstItem="dsD-0P-GYs" firstAttribute="top" secondItem="hy8-yB-VnN" secondAttribute="top" id="80D-j2-Ktl"/>
|
||||
<constraint firstAttribute="trailing" secondItem="dsD-0P-GYs" secondAttribute="trailing" id="ayU-WR-1El"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="audioPlot" destination="fRU-2C-Uqy" id="8kO-3b-fug"/>
|
||||
<outlet property="scrollView" destination="dsD-0P-GYs" id="N1h-qR-WKG"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="Kw4-aB-FNF" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="309" y="397"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
||||
+3
-1
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
#define kAudioFileDefault [[NSBundle mainBundle] pathForResource:@"simple-drum-beat" ofType:@"wav"]
|
||||
|
||||
@interface WaveformFromFileViewController : UIViewController
|
||||
@interface WaveformFromFileViewController : UIViewController <UIScrollViewDelegate>
|
||||
|
||||
#pragma mark - Components
|
||||
/**
|
||||
@@ -29,6 +29,8 @@
|
||||
*/
|
||||
@property (nonatomic,weak) IBOutlet EZAudioPlot *audioPlot;
|
||||
|
||||
@property (nonatomic,weak) IBOutlet UIScrollView *scrollView;
|
||||
|
||||
/**
|
||||
A BOOL indicating whether or not we've reached the end of the file
|
||||
*/
|
||||
|
||||
+103
-36
@@ -20,46 +20,113 @@
|
||||
@synthesize filePathLabel = _filePathLabel;
|
||||
|
||||
#pragma mark - Customize the Audio Plot
|
||||
-(void)viewDidLoad {
|
||||
|
||||
[super viewDidLoad];
|
||||
|
||||
/*
|
||||
Customizing the audio plot's look
|
||||
*/
|
||||
// Background color
|
||||
self.audioPlot.backgroundColor = [UIColor colorWithRed: 0.169 green: 0.643 blue: 0.675 alpha: 1];
|
||||
// Waveform color
|
||||
self.audioPlot.color = [UIColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:1.0];
|
||||
// Plot type
|
||||
self.audioPlot.plotType = EZPlotTypeBuffer;
|
||||
// Fill
|
||||
self.audioPlot.shouldFill = YES;
|
||||
// Mirror
|
||||
self.audioPlot.shouldMirror = YES;
|
||||
|
||||
/*
|
||||
Load in the sample file
|
||||
*/
|
||||
[self openFileWithFilePathURL:[NSURL fileURLWithPath:kAudioFileDefault]];
|
||||
-(void)viewDidLoad
|
||||
{
|
||||
|
||||
[super viewDidLoad];
|
||||
|
||||
/*
|
||||
Customizing the audio plot's look
|
||||
*/
|
||||
// Background color
|
||||
self.audioPlot.backgroundColor = [UIColor colorWithRed: 0.169 green: 0.643 blue: 0.675 alpha: 1];
|
||||
// Waveform color
|
||||
self.audioPlot.color = [UIColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:1.0];
|
||||
// Plot type
|
||||
self.audioPlot.plotType = EZPlotTypeBuffer;
|
||||
// Fill
|
||||
self.audioPlot.shouldFill = YES;
|
||||
// Mirror
|
||||
self.audioPlot.shouldMirror = YES;
|
||||
|
||||
/*
|
||||
Load in the sample file
|
||||
*/
|
||||
[self openFileWithFilePathURL:[NSURL fileURLWithPath:kAudioFileDefault]];
|
||||
|
||||
// UIPinchGestureRecognizer *pinchGestureRecognizer = [[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(pinchedAudioPlot:)];
|
||||
// [self.audioPlot addGestureRecognizer:pinchGestureRecognizer];
|
||||
//
|
||||
// UIPanGestureRecognizer *panGestureRecongizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(pannedAudioPlot:)];
|
||||
// [self.audioPlot addGestureRecognizer:panGestureRecongizer];
|
||||
|
||||
self.audioPlot.autoresizingMask = UIViewAutoresizingFlexibleHeight;
|
||||
self.scrollView.backgroundColor = self.audioPlot.backgroundColor;
|
||||
self.scrollView.delegate = self;
|
||||
self.scrollView.minimumZoomScale = 1.0f;
|
||||
self.scrollView.maximumZoomScale = 4.75f;
|
||||
}
|
||||
|
||||
//- (void)pinchedAudioPlot:(UIPinchGestureRecognizer *)pinchGestureRecognizer
|
||||
//{
|
||||
// CATransform3D transform = CATransform3DScale(self.audioPlot.waveformLayer.transform,
|
||||
// pinchGestureRecognizer.scale,
|
||||
// 1.0,
|
||||
// 1.0);
|
||||
// pinchGestureRecognizer.scale = 1.0f;
|
||||
// CGAffineTransform affineTransform = CATransform3DGetAffineTransform(transform);
|
||||
// CGFloat scaleFactor = sqrt(powf(affineTransform.a, 2) + powf(affineTransform.c, 2));
|
||||
// if (scaleFactor >= 1.0)
|
||||
// {
|
||||
// [CATransaction begin];
|
||||
// [CATransaction setDisableActions:YES];
|
||||
// self.audioPlot.waveformLayer.transform = transform;
|
||||
// [CATransaction commit];
|
||||
// }
|
||||
//
|
||||
// [self checkWaveformFitsInView];
|
||||
//}
|
||||
//
|
||||
//- (void)pannedAudioPlot:(UIPanGestureRecognizer *)panGestureRecognizer
|
||||
//{
|
||||
// CGAffineTransform affineTransform = CATransform3DGetAffineTransform(self.audioPlot.waveformLayer.transform);
|
||||
// CGFloat scaleFactor = sqrt(powf(affineTransform.a, 2) + powf(affineTransform.c, 2));
|
||||
// CGPoint translation = [panGestureRecognizer translationInView:self.audioPlot];
|
||||
// [panGestureRecognizer setTranslation:CGPointZero inView:self.audioPlot];
|
||||
// CGPoint waveformLayerCenter = self.audioPlot.waveformLayerCenter;
|
||||
// waveformLayerCenter = CGPointMake(waveformLayerCenter.x - translation.x / scaleFactor, waveformLayerCenter.y);
|
||||
//
|
||||
// [CATransaction begin];
|
||||
// [CATransaction setDisableActions:YES];
|
||||
// self.audioPlot.waveformLayerCenter = waveformLayerCenter;
|
||||
// [CATransaction commit];
|
||||
//
|
||||
// [self checkWaveformFitsInView];
|
||||
//}
|
||||
|
||||
- (void)scrollViewDidEndZooming:(UIScrollView *)scrollView
|
||||
withView:(UIView *)view
|
||||
atScale:(CGFloat)scale
|
||||
{
|
||||
NSLog(@"end content offset: %@", NSStringFromCGPoint(scrollView.contentOffset));
|
||||
// scrollView.contentSize = CGPointZero;
|
||||
}
|
||||
|
||||
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
|
||||
{
|
||||
[scrollView setContentOffset: CGPointMake(scrollView.contentOffset.x, 0)];
|
||||
}
|
||||
|
||||
- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView
|
||||
{
|
||||
return self.audioPlot;
|
||||
}
|
||||
|
||||
#pragma mark - Action Extensions
|
||||
-(void)openFileWithFilePathURL:(NSURL*)filePathURL {
|
||||
|
||||
self.audioFile = [EZAudioFile audioFileWithURL:filePathURL];
|
||||
self.eof = NO;
|
||||
self.filePathLabel.text = filePathURL.lastPathComponent;
|
||||
|
||||
// Plot the whole waveform
|
||||
self.audioPlot.plotType = EZPlotTypeBuffer;
|
||||
self.audioPlot.shouldFill = YES;
|
||||
self.audioPlot.shouldMirror = YES;
|
||||
[self.audioFile getWaveformDataWithCompletionBlock:^(float *waveformData, UInt32 length) {
|
||||
[self.audioPlot updateBuffer:waveformData withBufferSize:length];
|
||||
}];
|
||||
|
||||
-(void)openFileWithFilePathURL:(NSURL*)filePathURL
|
||||
{
|
||||
self.audioFile = [EZAudioFile audioFileWithURL:filePathURL];
|
||||
self.eof = NO;
|
||||
self.filePathLabel.text = filePathURL.lastPathComponent;
|
||||
|
||||
// Plot the whole waveform
|
||||
self.audioPlot.plotType = EZPlotTypeBuffer;
|
||||
// self.audioPlot.shouldFill = YES;
|
||||
self.audioPlot.shouldMirror = YES;
|
||||
self.audioPlot.optimizeForRealtimePlot = NO;
|
||||
[self.audioFile getWaveformDataWithNumberOfPoints:1024 completion:^(EZAudioFloatData *waveformData) {
|
||||
[self.audioPlot updateBuffer:waveformData.buffers[0] withBufferSize:waveformData.bufferSize];
|
||||
}];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user