Compare commits
31 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| dcaadd43ce | |||
| 03db74e842 | |||
| ec19d44d86 | |||
| 1e23f95dc2 | |||
| 4d0b40d730 | |||
| 732cf79963 | |||
| 7e84f8744f | |||
| 556ac8390a | |||
| 700bd4bbce | |||
| 7df85ed2b8 | |||
| 68ad54d824 | |||
| c6ed4c48b6 | |||
| d65c918f00 | |||
| e771fe257a | |||
| 7fc587d3af | |||
| 7bcf2517cb | |||
| 47de71d817 | |||
| cdee3dadd5 | |||
| 4b76949836 | |||
| 55172b2356 | |||
| 302a047f6a | |||
| 2705a7b559 | |||
| e620db225a | |||
| 6f51b2b387 | |||
| a8202b44ad | |||
| ddfe22106f | |||
| 64a9e963ee | |||
| 2309329709 | |||
| bb19920533 | |||
| 44429ec91a | |||
| 3936165aeb |
+25
-16
@@ -1,18 +1,27 @@
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "EZAudio"
|
||||
s.version = "0.5.0"
|
||||
s.summary = "A simple, intuitive audio framework for iOS and OSX useful for anyone doing audio processing and/or audio-based visualizations."
|
||||
s.homepage = "https://github.com/syedhali/EZAudio"
|
||||
s.screenshots = "https://s3-us-west-1.amazonaws.com/ezaudio-media/EZAudioSummary.png"
|
||||
s.license = { :type => 'MIT', :file => 'LICENSE' }
|
||||
s.author = { "Syed Haris Ali" => "syedhali07@gmail.com" }
|
||||
s.ios.deployment_target = '6.0'
|
||||
s.osx.deployment_target = '10.8'
|
||||
s.source = { :git => "https://github.com/syedhali/EZAudio.git", :tag => s.version }
|
||||
s.source_files = 'EZAudio/*.{h,m,c}'
|
||||
s.exclude_files = [ 'EZAudio/VERSION', 'EZAudio/TPCircularBuffer.{h,c}' ]
|
||||
s.ios.frameworks = 'AudioToolbox','AVFoundation','GLKit'
|
||||
s.osx.frameworks = 'AudioToolbox','AudioUnit','CoreAudio','QuartzCore','OpenGL','GLKit'
|
||||
s.dependency 'TPCircularBuffer', '~> 0.0'
|
||||
s.requires_arc = true;
|
||||
s.name = "EZAudio"
|
||||
s.version = "0.7.2"
|
||||
s.summary = "A simple, intuitive audio framework for iOS and OSX useful for anyone doing audio processing and/or audio-based visualizations."
|
||||
s.homepage = "https://github.com/syedhali/EZAudio"
|
||||
s.screenshots = "https://s3-us-west-1.amazonaws.com/ezaudio-media/EZAudioSummary.png"
|
||||
s.license = { :type => 'MIT', :file => 'LICENSE' }
|
||||
s.author = { "Syed Haris Ali" => "syedhali07@gmail.com" }
|
||||
s.ios.deployment_target = '6.0'
|
||||
s.osx.deployment_target = '10.8'
|
||||
s.source = { :git => "https://github.com/syedhali/EZAudio.git", :tag => s.version }
|
||||
s.exclude_files = [ 'EZAudio/VERSION', 'EZAudio/TPCircularBuffer.{h,c}' ]
|
||||
s.ios.frameworks = 'AudioToolbox','AVFoundation','GLKit'
|
||||
s.osx.frameworks = 'AudioToolbox','AudioUnit','CoreAudio','QuartzCore','OpenGL','GLKit'
|
||||
s.requires_arc = true;
|
||||
s.default_subspec = 'Full'
|
||||
|
||||
s.subspec 'Core' do |core|
|
||||
core.source_files = 'EZAudio/*.{h,m,c}'
|
||||
end
|
||||
|
||||
s.subspec 'Full' do |full|
|
||||
full.dependency 'TPCircularBuffer', '~> 0.0'
|
||||
full.dependency 'EZAudio/Core'
|
||||
end
|
||||
|
||||
end
|
||||
@@ -25,9 +25,6 @@
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#pragma mark - 3rd Party Utilties
|
||||
#import "TPCircularBuffer.h"
|
||||
|
||||
#pragma mark - Core Components
|
||||
#import "EZAudioFile.h"
|
||||
#import "EZAudioFloatData.h"
|
||||
@@ -43,7 +40,6 @@
|
||||
#import "EZPlot.h"
|
||||
#import "EZAudioPlot.h"
|
||||
#import "EZAudioPlotGL.h"
|
||||
#import "EZAudioPlotGLKViewController.h"
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -24,8 +24,6 @@
|
||||
// THE SOFTWARE.
|
||||
|
||||
#import <QuartzCore/QuartzCore.h>
|
||||
#import "TargetConditionals.h"
|
||||
#import "EZAudioUtilities.h"
|
||||
#import "EZPlot.h"
|
||||
|
||||
@class EZAudio;
|
||||
@@ -115,16 +113,16 @@ FOUNDATION_EXPORT UInt32 const EZAudioPlotDefaultMaxHistoryBufferLength;
|
||||
///-----------------------------------------------------------
|
||||
|
||||
/**
|
||||
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.
|
||||
Sets the length of the rolling history buffer (i.e. the number of points in the rolling plot's buffer). Can grow or shrink the display up to the maximum size specified by the `maximumRollingHistoryLength` method. Will return the actual set value, which will be either the given value if smaller than the `maximumRollingHistoryLength` or `maximumRollingHistoryLength` 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.
|
||||
@return The new value equal to the historyLength or the `maximumRollingHistoryLength`.
|
||||
*/
|
||||
-(int)setRollingHistoryLength:(int)historyLength;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Provides the length of the rolling history buffer
|
||||
Provides the length of the rolling history buffer (i.e. the number of points in the rolling plot's buffer).
|
||||
* @return An int representing the length of the rolling history buffer
|
||||
*/
|
||||
-(int)rollingHistoryLength;
|
||||
@@ -187,8 +185,7 @@ FOUNDATION_EXPORT UInt32 const EZAudioPlotDefaultMaxHistoryBufferLength;
|
||||
@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;
|
||||
-(void)setSampleData:(float *)data length:(int)length;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -41,9 +41,9 @@ UInt32 const EZAudioPlotDefaultMaxHistoryBufferLength = 8192;
|
||||
|
||||
@interface EZAudioPlot () <EZAudioDisplayLinkDelegate>
|
||||
@property (nonatomic, strong) EZAudioDisplayLink *displayLink;
|
||||
@property (nonatomic, assign) EZPlotHistoryInfo *historyInfo;
|
||||
@property (nonatomic, assign) CGPoint *points;
|
||||
@property (nonatomic, assign) UInt32 pointCount;
|
||||
@property (nonatomic, assign) EZPlotHistoryInfo *historyInfo;
|
||||
@property (nonatomic, assign) CGPoint *points;
|
||||
@property (nonatomic, assign) UInt32 pointCount;
|
||||
@end
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
+125
-87
@@ -23,126 +23,126 @@
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
#import "TargetConditionals.h"
|
||||
#import <GLKit/GLKit.h>
|
||||
#import "EZPlot.h"
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
#import <GLKit/GLKit.h>
|
||||
@class EZAudioPlotGLKViewController;
|
||||
#elif TARGET_OS_MAC
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import <GLKit/GLKit.h>
|
||||
#import <OpenGL/gl3.h>
|
||||
#import <QuartzCore/CVDisplayLink.h>
|
||||
#if !TARGET_OS_IPHONE
|
||||
#import <OpenGL/OpenGL.h>
|
||||
#endif
|
||||
|
||||
#pragma mark - Enumerations
|
||||
/**
|
||||
Constant drawing types wrapping around the OpenGL equivalents. In the audio drawings the line strip will be the stroked graph while the triangle will provide the filled equivalent.
|
||||
*/
|
||||
typedef NS_ENUM(NSUInteger,EZAudioPlotGLDrawType){
|
||||
/**
|
||||
* Maps to the OpenGL constant for a line strip, which for the audio graph will correspond to a stroked drawing (no fill).
|
||||
*/
|
||||
EZAudioPlotGLDrawTypeLineStrip = GL_LINE_STRIP,
|
||||
/**
|
||||
* Maps to the OpenGL constant for a triangle strip, which for the audio graph will correspond to a filled drawing.
|
||||
*/
|
||||
EZAudioPlotGLDrawTypeTriangleStrip = GL_TRIANGLE_STRIP
|
||||
};
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Data Structures
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#pragma mark - Structures
|
||||
/**
|
||||
A structure describing a 2D point (x,y) in space for an audio plot.
|
||||
*/
|
||||
typedef struct {
|
||||
GLfloat x;
|
||||
GLfloat y;
|
||||
typedef struct
|
||||
{
|
||||
GLfloat x;
|
||||
GLfloat y;
|
||||
} EZAudioPlotGLPoint;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - EZAudioPlotGL
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
EZAudioPlotGL is a subclass of either the EZPlot on iOS or an NSOpenGLView on OSX. I apologize ahead of time for the weirdness in the docs for this class, but I had to do a bit of hackery to get a universal namespace for something works on both iOS and OSX without any additional components. The EZAudioPlotGL provides an the same utilities and interface as the EZAudioPlot with the added benefit of being GPU-accelerated. This is the recommended plot to use on iOS devices to get super fast real-time drawings of audio streams. For the methods and properties below I've included notes on the bottom just indicating which OS they correspond to. In most (if not all) use cases you can just refer to the EZPlot documentation to see which custom properties can be setup. There update function is the same as the EZPlot as well: `updateBuffer:withBufferSize:`
|
||||
EZAudioPlotGL is a subclass of either a GLKView on iOS or an NSOpenGLView on OSX. As of 0.6.0 this class no longer depends on an embedded GLKViewController for iOS as the display link is just manually managed within this single view instead. The EZAudioPlotGL provides the same kind of audio plot as the EZAudioPlot, but uses OpenGL to GPU-accelerate the drawing of the points, which means you can fit a lot more points and complex geometries.
|
||||
*/
|
||||
#if TARGET_OS_IPHONE
|
||||
@interface EZAudioPlotGL : EZPlot
|
||||
@interface EZAudioPlotGL : GLKView
|
||||
#elif TARGET_OS_MAC
|
||||
@interface EZAudioPlotGL : NSOpenGLView
|
||||
#endif
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
|
||||
// Inherited from EZPlot
|
||||
|
||||
#elif TARGET_OS_MAC
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Properties
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
///-----------------------------------------------------------
|
||||
/// @name Customizing The Plot's Appearance
|
||||
///-----------------------------------------------------------
|
||||
/**
|
||||
The default background color of the plot. For iOS the color is specified as a UIColor while for OSX the color is an NSColor. The default value on both platforms is black.
|
||||
*/
|
||||
@property (nonatomic,strong) id backgroundColor;
|
||||
|
||||
/**
|
||||
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.
|
||||
The default background color of the plot. For iOS the color is specified as a UIColor while for OSX the color is an NSColor. The default value on both platforms is a sweet looking green.
|
||||
@warning On OSX, if you set the background to a value where the alpha component is 0 then the EZAudioPlotGL will automatically set its superview to be layer-backed.
|
||||
*/
|
||||
@property (nonatomic,strong) id color;
|
||||
@property (nonatomic, strong) id backgroundColor;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
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 white.
|
||||
*/
|
||||
@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.
|
||||
*/
|
||||
@property (nonatomic,assign,setter=setGain:) float gain;
|
||||
@property (nonatomic, assign) float gain;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
The type of plot as specified by the `EZPlotType` enumeration (i.e. a buffer or rolling plot type).
|
||||
The type of plot as specified by the `EZPlotType` enumeration (i.e. a buffer or rolling plot type). Default is EZPlotTypeBuffer.
|
||||
*/
|
||||
@property (nonatomic,assign,setter=setPlotType:) EZPlotType plotType;
|
||||
@property (nonatomic, assign) EZPlotType plotType;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
A BOOL indicating whether or not to fill in the graph. A value of YES will make a filled graph (filling in the space between the x-axis and the y-value), while a value of NO will create a stroked graph (connecting the points along the y-axis).
|
||||
A BOOL indicating whether or not to fill in the graph. A value of YES will make a filled graph (filling in the space between the x-axis and the y-value), while a value of NO will create a stroked graph (connecting the points along the y-axis). Default is NO.
|
||||
*/
|
||||
@property (nonatomic,assign,setter=setShouldFill:) BOOL shouldFill;
|
||||
@property (nonatomic, assign) BOOL shouldFill;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
A boolean indicating whether the graph should be rotated along the x-axis to give a mirrored reflection. This is typical for audio plots to produce the classic waveform look. A value of YES will produce a mirrored reflection of the y-values about the x-axis, while a value of NO will only plot the y-values.
|
||||
A boolean indicating whether the graph should be rotated along the x-axis to give a mirrored reflection. This is typical for audio plots to produce the classic waveform look. A value of YES will produce a mirrored reflection of the y-values about the x-axis, while a value of NO will only plot the y-values. Default is NO.
|
||||
*/
|
||||
@property (nonatomic,assign,setter=setShouldMirror:) BOOL shouldMirror;
|
||||
@property (nonatomic, assign) BOOL shouldMirror;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Updating The Plot
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#pragma mark - Get Samples
|
||||
///-----------------------------------------------------------
|
||||
/// @name Updating The Plot
|
||||
///-----------------------------------------------------------
|
||||
|
||||
/**
|
||||
Updates the plot with the new buffer data and tells the view to redraw itself. Caller will provide a float array with the values they expect to see on the y-axis. The plot will internally handle mapping the x-axis and y-axis to the current view port, any interpolation for fills effects, and mirroring.
|
||||
@param buffer A float array of values to map to the y-axis.
|
||||
@param bufferSize The size of the float array that will be mapped to the y-axis.
|
||||
@warning The bufferSize is expected to be the same, constant value once initial triggered. For plots using OpenGL a vertex buffer object will be allocated with a maximum buffersize of (2 * the initial given buffer size) to account for any interpolation necessary for filling in the graph. Updates use the glBufferSubData(...) function, which will crash if the buffersize exceeds the initial maximum allocated size.
|
||||
*/
|
||||
-(void)updateBuffer:(float *)buffer
|
||||
withBufferSize:(UInt32)bufferSize;
|
||||
|
||||
#endif
|
||||
-(void)updateBuffer:(float *)buffer withBufferSize:(UInt32)bufferSize;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#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.
|
||||
Sets the length of the rolling history buffer (i.e. the number of points in the rolling plot's buffer). Can grow or shrink the display up to the maximum size specified by the `maximumRollingHistoryLength` method. Will return the actual set value, which will be either the given value if smaller than the `maximumRollingHistoryLength` or `maximumRollingHistoryLength` 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.
|
||||
@return The new value equal to the historyLength or the `maximumRollingHistoryLength`.
|
||||
*/
|
||||
-(int)setRollingHistoryLength:(int)historyLength;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Provides the length of the rolling history buffer
|
||||
Provides the length of the rolling history buffer (i.e. the number of points in the rolling plot's buffer).
|
||||
* @return An int representing the length of the rolling history buffer
|
||||
*/
|
||||
-(int)rollingHistoryLength;
|
||||
|
||||
#pragma mark - Shared Methods
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Clearing The Plot
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
///-----------------------------------------------------------
|
||||
/// @name Clearing The Plot
|
||||
///-----------------------------------------------------------
|
||||
@@ -152,32 +152,70 @@ typedef struct {
|
||||
*/
|
||||
-(void)clear;
|
||||
|
||||
///-----------------------------------------------------------
|
||||
/// @name Shared OpenGL Methods
|
||||
///-----------------------------------------------------------
|
||||
/**
|
||||
Converts a float array to an array of EZAudioPlotGLPoint structures that hold the (x,y) values the OpenGL buffer needs to properly plot its points.
|
||||
@param graph A pointer to the array that should hold the EZAudioPlotGLPoint structures.
|
||||
@param graphSize The size (or length) of the array with the EZAudioPlotGLPoint structures.
|
||||
@param drawingType The EZAudioPlotGLDrawType constant defining whether the plot should interpolate between points for a triangle strip (filled waveform) or not for a line strip (stroked waveform)
|
||||
@param buffer The float array holding the audio data
|
||||
@param bufferSize The size of the float array holding the audio data
|
||||
@param gain The gain (always greater than 0.0) to apply to the amplitudes (y-values) of the graph. Y-values can only range from -1.0 to 1.0 so any value that's greater will be rounded to -1.0 or 1.0.
|
||||
*/
|
||||
+(void)fillGraph:(EZAudioPlotGLPoint*)graph
|
||||
withGraphSize:(UInt32)graphSize
|
||||
forDrawingType:(EZAudioPlotGLDrawType)drawingType
|
||||
withBuffer:(float*)buffer
|
||||
withBufferSize:(UInt32)bufferSize
|
||||
withGain:(float)gain;
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Start/Stop Display Link
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Determines the proper size of a graph given a EZAudioPlotGLDrawType (line strip or triangle strip) and the size of the incoming buffer. Triangle strips require interpolating between points so the buffer becomes 2*bufferSize
|
||||
@param drawingType The EZAudioPlotGLDraw type (line strip or triangle strip)
|
||||
@param bufferSize The size of the float array holding the audio data coming in.
|
||||
@return A Int32 representing the proper graph size that should be used to account for any necessary interpolating between points.
|
||||
Call this method to tell the EZAudioDisplayLink to stop drawing temporarily.
|
||||
*/
|
||||
+(UInt32)graphSizeForDrawingType:(EZAudioPlotGLDrawType)drawingType
|
||||
withBufferSize:(UInt32)bufferSize;
|
||||
- (void)pauseDrawing;
|
||||
|
||||
@end
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Call this method to manually tell the EZAudioDisplayLink to start drawing again.
|
||||
*/
|
||||
- (void)resumeDrawing;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Subclass
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
///-----------------------------------------------------------
|
||||
/// @name Customizing The Drawing
|
||||
///-----------------------------------------------------------
|
||||
|
||||
/**
|
||||
This method is used to perform the actual OpenGL drawing code to clear the background and draw the lines representing the 2D audio plot. Subclasses can use the current implementation as an example and implement their own custom geometries. This is the analogy of overriding the drawRect: method in an NSView or UIView.
|
||||
@param points An array of EZAudioPlotGLPoint structures representing the mapped audio data to x,y coordinates. The x-axis goes from 0 to the number of points (pointCount) while the y-axis goes from -1 to 1. Check out the implementation of this method to see how the model view matrix of the base effect is transformed to map this properly to the viewport.
|
||||
@param pointCount A UInt32 representing the number of points contained in the points array.
|
||||
@param baseEffect An optional GLKBaseEffect to use as a default shader. Call prepareToDraw on the base effect before any glDrawArrays call.
|
||||
@param vbo The Vertex Buffer Object used to buffer the point data.
|
||||
@param vab The Vertex Array Buffer used to bind the Vertex Buffer Object. This is a Mac only thing, you can ignore this completely on iOS.
|
||||
@param interpolated A BOOL indicating whether the data has been interpolated. This means the point data is twice as long, where every other point is 0 on the y-axis to allow drawing triangle stripes for filled in waveforms. Typically if the point data is interpolated you will be using the GL_TRIANGLE_STRIP drawing mode, while non-interpolated plots will just use a GL_LINE_STRIP drawing mode.
|
||||
@param mirrored A BOOL indicating whether the plot should be mirrored about the y-axis (or whatever geometry you come up with).
|
||||
@param gain A float representing a gain that should be used to influence the height or intensity of your geometry's shape. A gain of 0.0 means silence, a gain of 1.0 means full volume (you're welcome to boost this to whatever you want).
|
||||
*/
|
||||
- (void)redrawWithPoints:(EZAudioPlotGLPoint *)points
|
||||
pointCount:(UInt32)pointCount
|
||||
baseEffect:(GLKBaseEffect *)baseEffect
|
||||
vertexBufferObject:(GLuint)vbo
|
||||
vertexArrayBuffer:(GLuint)vab
|
||||
interpolated:(BOOL)interpolated
|
||||
mirrored:(BOOL)mirrored
|
||||
gain:(float)gain;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
///-----------------------------------------------------------
|
||||
/// @name Subclass Methods
|
||||
///-----------------------------------------------------------
|
||||
|
||||
/**
|
||||
Provides the default length of the rolling history buffer when the plot is initialized. Default is `EZAudioPlotDefaultHistoryBufferLength` constant.
|
||||
@return An int describing the initial length of the rolling history buffer.
|
||||
*/
|
||||
- (int)defaultRollingHistoryLength;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Provides the default maximum rolling history length - that is, the maximum amount of points the `setRollingHistoryLength:` method may be set to. If a length higher than this is set then the plot will likely crash because the appropriate resources are only allocated once during the plot's initialization step. Defualt is `EZAudioPlotDefaultMaxHistoryBufferLength` constant.
|
||||
@return An int describing the maximum length of the absolute rolling history buffer.
|
||||
*/
|
||||
- (int)maximumRollingHistoryLength;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@end
|
||||
+480
-718
File diff suppressed because it is too large
Load Diff
@@ -1,127 +0,0 @@
|
||||
//
|
||||
// EZAudioPlotGLKViewController.h
|
||||
// EZAudio
|
||||
//
|
||||
// Created by Syed Haris Ali on 11/22/13.
|
||||
// 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 "TargetConditionals.h"
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
|
||||
#import "EZAudioPlotGL.h"
|
||||
|
||||
@class EZAudio;
|
||||
|
||||
/**
|
||||
EZAudioPlotGLKViewController is a subclass of the GLKViewController and handles the OpenGL drawing routine for iOS OpenGL ES views. This class has not been used outside the scope of the EZAudioPlotGL, but should be safe to use by itself if the intended use case is to have a view controller take up the whole screen.
|
||||
*/
|
||||
@interface EZAudioPlotGLKViewController : GLKViewController
|
||||
|
||||
#pragma mark - Properties
|
||||
///-----------------------------------------------------------
|
||||
/// @name Customizing The Plot's Appearance
|
||||
///-----------------------------------------------------------
|
||||
/**
|
||||
The default background color of the plot. For iOS the color is specified as a UIColor while for OSX the color is an NSColor. The default value on both platforms is black.
|
||||
*/
|
||||
@property (nonatomic,strong) UIColor *backgroundColor;
|
||||
|
||||
/**
|
||||
The default shader to use to fill the graph.
|
||||
*/
|
||||
@property (nonatomic,strong) GLKBaseEffect *baseEffect;
|
||||
|
||||
/**
|
||||
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) UIColor *color;
|
||||
|
||||
/**
|
||||
The OpenGL ES context (EAGLContext) in which to perform the drawing
|
||||
*/
|
||||
@property (nonatomic,strong) EAGLContext *context;
|
||||
|
||||
/**
|
||||
The EZAudioPlotGLDrawType specifying which OpenGL primitive to use for drawing (either line strip for stroke and no fill or triangle strip for fill)
|
||||
*/
|
||||
@property (nonatomic,assign) EZAudioPlotGLDrawType drawingType;
|
||||
|
||||
/**
|
||||
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.
|
||||
*/
|
||||
@property (nonatomic,assign,setter=setGain:) float gain;
|
||||
|
||||
/**
|
||||
The type of plot as specified by the `EZPlotType` enumeration (i.e. a buffer or rolling plot type).
|
||||
*/
|
||||
@property (nonatomic,assign,setter=setPlotType:) EZPlotType plotType;
|
||||
|
||||
/**
|
||||
A boolean indicating whether the graph should be rotated along the x-axis to give a mirrored reflection. This is typical for audio plots to produce the classic waveform look. A value of YES will produce a mirrored reflection of the y-values about the x-axis, while a value of NO will only plot the y-values.
|
||||
*/
|
||||
@property (nonatomic,assign,setter=setShouldMirror:) BOOL shouldMirror;
|
||||
|
||||
#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.
|
||||
@param historyLength The new length of the rolling history buffer.
|
||||
@return The new value equal to the historyLength or the kEZAudioPlotMaxHistoryBufferLength.
|
||||
*/
|
||||
-(int)setRollingHistoryLength:(int)historyLength;
|
||||
|
||||
/**
|
||||
Provides the length of the rolling history buffer
|
||||
* @return An int representing the length of the rolling history buffer
|
||||
*/
|
||||
-(int)rollingHistoryLength;
|
||||
|
||||
#pragma mark - Clearing
|
||||
///-----------------------------------------------------------
|
||||
/// @name Clearing The Plot
|
||||
///-----------------------------------------------------------
|
||||
|
||||
/**
|
||||
Clears all data from the audio plot (includes both EZPlotTypeBuffer and EZPlotTypeRolling)
|
||||
*/
|
||||
-(void)clear;
|
||||
|
||||
#pragma mark - Get Samples
|
||||
///-----------------------------------------------------------
|
||||
/// @name Updating The Plot
|
||||
///-----------------------------------------------------------
|
||||
/**
|
||||
Updates the plot with the new buffer data and tells the view to redraw itself. Caller will provide a float array with the values they expect to see on the y-axis. The plot will internally handle mapping the x-axis and y-axis to the current view port, any interpolation for fills effects, and mirroring.
|
||||
@param buffer A float array of values to map to the y-axis.
|
||||
@param bufferSize The size of the float array that will be mapped to the y-axis.
|
||||
@warning The bufferSize is expected to be the same, constant value once initial triggered. For plots using OpenGL a vertex buffer object will be allocated with a maximum buffersize of (2 * the initial given buffer size) to account for any interpolation necessary for filling in the graph. Updates use the glBufferSubData(...) function, which will crash if the buffersize exceeds the initial maximum allocated size.
|
||||
*/
|
||||
-(void)updateBuffer:(float *)buffer
|
||||
withBufferSize:(UInt32)bufferSize;
|
||||
|
||||
@end
|
||||
|
||||
#elif TARGET_OS_MAC
|
||||
#endif
|
||||
@@ -1,486 +0,0 @@
|
||||
//
|
||||
// EZAudioPlotGLKViewController.m
|
||||
// EZAudio
|
||||
//
|
||||
// Created by Syed Haris Ali on 11/22/13.
|
||||
// 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.
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
|
||||
#import "EZAudioPlotGLKViewController.h"
|
||||
#import "EZAudioUtilities.h"
|
||||
#import "EZAudioPlot.h"
|
||||
|
||||
@interface EZAudioPlotGLKViewController () {
|
||||
|
||||
// Flags indicating whether the plots have been instantiated
|
||||
BOOL _hasBufferPlotData;
|
||||
BOOL _hasRollingPlotData;
|
||||
|
||||
// The buffers
|
||||
GLuint _bufferPlotVBO;
|
||||
GLuint _rollingPlotVBO;
|
||||
|
||||
// Buffers size
|
||||
UInt32 _bufferPlotGraphSize;
|
||||
UInt32 _rollingPlotGraphSize;
|
||||
|
||||
// Rolling History
|
||||
BOOL _setMaxLength;
|
||||
float *_scrollHistory;
|
||||
int _scrollHistoryIndex;
|
||||
UInt32 _scrollHistoryLength;
|
||||
BOOL _changingHistorySize;
|
||||
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation EZAudioPlotGLKViewController
|
||||
@synthesize baseEffect = _baseEffect;
|
||||
@synthesize context = _context;
|
||||
@synthesize drawingType = _drawingType;
|
||||
@synthesize plotType = _plotType;
|
||||
@synthesize shouldMirror = _shouldMirror;
|
||||
|
||||
#pragma mark - Initialization
|
||||
-(id)init
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
[self initializeView];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(id)initWithCoder:(NSCoder *)aDecoder {
|
||||
self = [super initWithCoder:aDecoder];
|
||||
if(self){
|
||||
[self initializeView];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
|
||||
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
|
||||
if(self){
|
||||
[self initializeView];
|
||||
}
|
||||
return self;
|
||||
|
||||
}
|
||||
#pragma mark - Initialize Properties Here
|
||||
-(void)initializeView {
|
||||
// Setup the base effect
|
||||
self.baseEffect = [[GLKBaseEffect alloc] init];
|
||||
self.baseEffect.useConstantColor = GL_TRUE;
|
||||
self.preferredFramesPerSecond = 60;
|
||||
_scrollHistory = NULL;
|
||||
_scrollHistoryLength = EZAudioPlotDefaultHistoryBufferLength;
|
||||
}
|
||||
|
||||
#pragma mark - View Did Load
|
||||
-(void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
|
||||
// Setup the context
|
||||
if (![EAGLContext currentContext])
|
||||
{
|
||||
self.context = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2];
|
||||
}
|
||||
else
|
||||
{
|
||||
self.context = [EAGLContext currentContext];
|
||||
}
|
||||
|
||||
if (!self.context) {
|
||||
NSLog(@"Failed to create ES context");
|
||||
}
|
||||
else {
|
||||
EAGLContext.currentContext = self.context;
|
||||
}
|
||||
|
||||
// Set the view's context
|
||||
GLKView *view = (GLKView *)self.view;
|
||||
view.context = self.context;
|
||||
view.drawableMultisample = GLKViewDrawableMultisample4X;
|
||||
view.opaque = NO;
|
||||
|
||||
// Generate both the buffer id references
|
||||
glGenBuffers(1, &_bufferPlotVBO);
|
||||
glGenBuffers(1, &_rollingPlotVBO);
|
||||
|
||||
// Refresh color values
|
||||
[self _refreshWithBackgroundColor: self.backgroundColor];
|
||||
[self _refreshWithColor: self.color];
|
||||
|
||||
// Set the line width for the context
|
||||
glLineWidth(2.0);
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - Adjust Resolution
|
||||
-(int)setRollingHistoryLength:(int)historyLength {
|
||||
_changingHistorySize = YES;
|
||||
historyLength = MIN(historyLength, EZAudioPlotDefaultMaxHistoryBufferLength);
|
||||
size_t floatByteSize = sizeof(float);
|
||||
if (_scrollHistoryLength != historyLength){
|
||||
_scrollHistoryLength = historyLength;
|
||||
}
|
||||
_scrollHistory = realloc(_scrollHistory,_scrollHistoryLength*floatByteSize);
|
||||
if (_scrollHistoryIndex < _scrollHistoryLength){
|
||||
memset(&_scrollHistory[_scrollHistoryIndex],
|
||||
0,
|
||||
(_scrollHistoryLength-_scrollHistoryIndex)*floatByteSize);
|
||||
}
|
||||
else {
|
||||
_scrollHistoryIndex = _scrollHistoryLength;
|
||||
}
|
||||
[self _updateRollingPlotDisplay];
|
||||
_changingHistorySize = NO;
|
||||
return historyLength;
|
||||
}
|
||||
|
||||
-(int)rollingHistoryLength {
|
||||
return _scrollHistoryLength;
|
||||
}
|
||||
|
||||
#pragma mark - Clearing
|
||||
-(void)clear
|
||||
{
|
||||
_scrollHistoryIndex = 0;
|
||||
[self _clearBufferPlot];
|
||||
[self _clearRollingPlot];
|
||||
}
|
||||
|
||||
-(void)_clearBufferPlot
|
||||
{
|
||||
if (_hasBufferPlotData)
|
||||
{
|
||||
float empty[_bufferPlotGraphSize];
|
||||
memset( empty, 0.0f, sizeof(float));
|
||||
[self _updateBufferPlotBufferWithAudioReceived:empty
|
||||
withBufferSize:_bufferPlotGraphSize];
|
||||
}
|
||||
}
|
||||
|
||||
-(void)_clearRollingPlot
|
||||
{
|
||||
if (_hasRollingPlotData)
|
||||
{
|
||||
float empty[_rollingPlotGraphSize];
|
||||
EZAudioPlotGLPoint graph[_rollingPlotGraphSize];
|
||||
// Figure out better way to do this
|
||||
for(int i = 0; i < _rollingPlotGraphSize; i++)
|
||||
{
|
||||
empty[i] = 0.0f;
|
||||
}
|
||||
for(int i = 0; i < _scrollHistoryLength; i++)
|
||||
{
|
||||
_scrollHistory[i] = 0.0f;
|
||||
}
|
||||
// Update the scroll history datasource
|
||||
[EZAudioUtilities updateScrollHistory:&_scrollHistory
|
||||
withLength:_scrollHistoryLength
|
||||
atIndex:&_scrollHistoryIndex
|
||||
withBuffer:empty
|
||||
withBufferSize:_rollingPlotGraphSize
|
||||
isResolutionChanging:&_changingHistorySize];
|
||||
// Fill in graph data
|
||||
[EZAudioPlotGL fillGraph:graph
|
||||
withGraphSize:_rollingPlotGraphSize
|
||||
forDrawingType:_drawingType
|
||||
withBuffer:_scrollHistory
|
||||
withBufferSize:_scrollHistoryLength
|
||||
withGain:self.gain];
|
||||
// Update the drawing
|
||||
glBufferSubData(GL_ARRAY_BUFFER, 0, sizeof(graph), graph);
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Get Samples
|
||||
-(void)updateBuffer:(float *)buffer
|
||||
withBufferSize:(UInt32)bufferSize {
|
||||
|
||||
// Make sure the update render loop is active
|
||||
if (self.paused) self.paused = NO;
|
||||
|
||||
// Make sure we are updating the buffers on the correct gl context.
|
||||
EAGLContext.currentContext = self.context;
|
||||
|
||||
// Draw based on plot type
|
||||
switch(_plotType) {
|
||||
case EZPlotTypeBuffer:
|
||||
[self _updateBufferPlotBufferWithAudioReceived:buffer
|
||||
withBufferSize:bufferSize];
|
||||
break;
|
||||
case EZPlotTypeRolling:
|
||||
[self _updateRollingPlotBufferWithAudioReceived:buffer
|
||||
withBufferSize:bufferSize];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - Buffer Updating By Type
|
||||
-(void)_updateBufferPlotBufferWithAudioReceived:(float*)buffer
|
||||
withBufferSize:(UInt32)bufferSize {
|
||||
|
||||
glBindBuffer(GL_ARRAY_BUFFER, _bufferPlotVBO);
|
||||
|
||||
// If starting with a VBO of half of our max size make sure we initialize it to anticipate
|
||||
// a filled graph (which needs 2 * bufferSize) to allocate its resources properly
|
||||
if (!_hasBufferPlotData && _drawingType == EZAudioPlotGLDrawTypeLineStrip){
|
||||
EZAudioPlotGLPoint maxGraph[2*bufferSize];
|
||||
glBufferData(GL_ARRAY_BUFFER, sizeof(maxGraph), maxGraph, GL_STREAM_DRAW);
|
||||
_hasBufferPlotData = YES;
|
||||
}
|
||||
|
||||
// Setup the buffer plot's graph size
|
||||
_bufferPlotGraphSize = [EZAudioPlotGL graphSizeForDrawingType:_drawingType
|
||||
withBufferSize:bufferSize];
|
||||
|
||||
// Setup the graph
|
||||
EZAudioPlotGLPoint graph[_bufferPlotGraphSize];
|
||||
|
||||
// Fill in graph data
|
||||
[EZAudioPlotGL fillGraph:graph
|
||||
withGraphSize:_bufferPlotGraphSize
|
||||
forDrawingType:_drawingType
|
||||
withBuffer:buffer
|
||||
withBufferSize:bufferSize
|
||||
withGain:self.gain];
|
||||
|
||||
if (!_hasBufferPlotData){
|
||||
glBufferData( GL_ARRAY_BUFFER, sizeof(graph), graph, GL_STREAM_DRAW);
|
||||
_hasBufferPlotData = YES;
|
||||
}
|
||||
else {
|
||||
glBufferSubData(GL_ARRAY_BUFFER, 0, sizeof(graph), graph);
|
||||
}
|
||||
|
||||
glBindBuffer(GL_ARRAY_BUFFER, 0);
|
||||
|
||||
}
|
||||
|
||||
-(void)_updateRollingPlotBufferWithAudioReceived:(float*)buffer
|
||||
withBufferSize:(UInt32)bufferSize {
|
||||
|
||||
glBindBuffer(GL_ARRAY_BUFFER, _rollingPlotVBO);
|
||||
|
||||
|
||||
|
||||
// If starting with a VBO of half of our max size make sure we initialize it to anticipate
|
||||
// a filled graph (which needs 2 * bufferSize) to allocate its resources properly
|
||||
if (!_hasRollingPlotData){
|
||||
EZAudioPlotGLPoint maxGraph[2*EZAudioPlotDefaultMaxHistoryBufferLength];
|
||||
glBufferData( GL_ARRAY_BUFFER, sizeof(maxGraph), maxGraph, GL_STREAM_DRAW);
|
||||
_hasRollingPlotData = YES;
|
||||
}
|
||||
|
||||
// Setup the plot
|
||||
_rollingPlotGraphSize = [EZAudioPlotGL graphSizeForDrawingType:_drawingType
|
||||
withBufferSize:_scrollHistoryLength];
|
||||
|
||||
// Fill the graph with data
|
||||
EZAudioPlotGLPoint graph[_rollingPlotGraphSize];
|
||||
|
||||
// Update the scroll history datasource
|
||||
[EZAudioUtilities updateScrollHistory:&_scrollHistory
|
||||
withLength:_scrollHistoryLength
|
||||
atIndex:&_scrollHistoryIndex
|
||||
withBuffer:buffer
|
||||
withBufferSize:bufferSize
|
||||
isResolutionChanging:&_changingHistorySize];
|
||||
|
||||
// Fill in graph data
|
||||
[EZAudioPlotGL fillGraph:graph
|
||||
withGraphSize:_rollingPlotGraphSize
|
||||
forDrawingType:_drawingType
|
||||
withBuffer:_scrollHistory
|
||||
withBufferSize:_scrollHistoryLength
|
||||
withGain:self.gain];
|
||||
|
||||
// Update the drawing
|
||||
if (!_hasRollingPlotData){
|
||||
glBufferData( GL_ARRAY_BUFFER, sizeof(graph) , graph, GL_STREAM_DRAW);
|
||||
_hasRollingPlotData = YES;
|
||||
}
|
||||
else {
|
||||
glBufferSubData(GL_ARRAY_BUFFER, 0, sizeof(graph), graph);
|
||||
}
|
||||
|
||||
glBindBuffer(GL_ARRAY_BUFFER, 0);
|
||||
|
||||
}
|
||||
|
||||
-(void)_updateRollingPlotDisplay {
|
||||
// Setup the plot
|
||||
_rollingPlotGraphSize = [EZAudioPlotGL graphSizeForDrawingType:_drawingType
|
||||
withBufferSize:_scrollHistoryLength];
|
||||
|
||||
// Fill the graph with data
|
||||
EZAudioPlotGLPoint graph[_rollingPlotGraphSize];
|
||||
|
||||
// Fill in graph data
|
||||
[EZAudioPlotGL fillGraph:graph
|
||||
withGraphSize:_rollingPlotGraphSize
|
||||
forDrawingType:_drawingType
|
||||
withBuffer:_scrollHistory
|
||||
withBufferSize:_scrollHistoryLength
|
||||
withGain:self.gain];
|
||||
|
||||
// Update the drawing
|
||||
if (_hasRollingPlotData){
|
||||
glBufferSubData(GL_ARRAY_BUFFER, 0, sizeof(graph), graph);
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Drawing
|
||||
-(void)glkView:(GLKView *)view drawInRect:(CGRect)rect {
|
||||
|
||||
EAGLContext.currentContext = self.context;
|
||||
|
||||
// Clear the context
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
||||
if (_hasBufferPlotData || _hasRollingPlotData){
|
||||
// Prepare the effect for drawing
|
||||
[self.baseEffect prepareToDraw];
|
||||
|
||||
// Plot either a buffer plot or a rolling plot
|
||||
switch(_plotType) {
|
||||
case EZPlotTypeBuffer:
|
||||
[self _drawBufferPlotWithView:view
|
||||
drawInRect:rect];
|
||||
break;
|
||||
case EZPlotTypeRolling:
|
||||
[self _drawRollingPlotWithView:view
|
||||
drawInRect:rect];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Private Drawing
|
||||
-(void)_drawBufferPlotWithView:(GLKView*)view drawInRect:(CGRect)rect {
|
||||
if (_hasBufferPlotData){
|
||||
|
||||
glBindBuffer(GL_ARRAY_BUFFER, _bufferPlotVBO);
|
||||
glEnableVertexAttribArray(GLKVertexAttribPosition);
|
||||
glVertexAttribPointer(GLKVertexAttribPosition, 2, GL_FLOAT, GL_FALSE, sizeof(EZAudioPlotGLPoint), NULL);
|
||||
|
||||
// Normal plot
|
||||
|
||||
self.baseEffect.transform.modelviewMatrix = GLKMatrix4MakeXRotation(0);
|
||||
glDrawArrays(_drawingType, 0, _bufferPlotGraphSize);
|
||||
|
||||
|
||||
if (self.shouldMirror){
|
||||
// Mirrored plot
|
||||
[self.baseEffect prepareToDraw];
|
||||
|
||||
self.baseEffect.transform.modelviewMatrix = GLKMatrix4MakeXRotation(M_PI);
|
||||
glDrawArrays(_drawingType, 0, _bufferPlotGraphSize);
|
||||
|
||||
}
|
||||
|
||||
|
||||
glBindBuffer(GL_ARRAY_BUFFER,0);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
-(void)_drawRollingPlotWithView:(GLKView*)view drawInRect:(CGRect)rect {
|
||||
if (_hasRollingPlotData){
|
||||
|
||||
// Normal plot
|
||||
glBindBuffer(GL_ARRAY_BUFFER, _rollingPlotVBO);
|
||||
glEnableVertexAttribArray(GLKVertexAttribPosition);
|
||||
glVertexAttribPointer(GLKVertexAttribPosition, 2, GL_FLOAT, GL_FALSE, sizeof(EZAudioPlotGLPoint), NULL);
|
||||
|
||||
// Normal plot
|
||||
|
||||
self.baseEffect.transform.modelviewMatrix = GLKMatrix4MakeXRotation(0);
|
||||
glDrawArrays(_drawingType, 0, _rollingPlotGraphSize);
|
||||
|
||||
|
||||
if (self.shouldMirror){
|
||||
// Mirrored plot
|
||||
[self.baseEffect prepareToDraw];
|
||||
|
||||
self.baseEffect.transform.modelviewMatrix = GLKMatrix4MakeXRotation(3.14159265359);
|
||||
glDrawArrays(_drawingType, 0, _rollingPlotGraphSize);
|
||||
|
||||
}
|
||||
|
||||
glBindBuffer(GL_ARRAY_BUFFER,0);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Setters
|
||||
-(void)setBackgroundColor:(UIColor *)backgroundColor {
|
||||
// Set the background color
|
||||
_backgroundColor = backgroundColor;
|
||||
// Refresh background color (map to GL vector)
|
||||
[self _refreshWithBackgroundColor:backgroundColor];
|
||||
}
|
||||
|
||||
-(void)setColor:(UIColor *)color {
|
||||
// Set the color
|
||||
_color = color;
|
||||
// Refresh the color (map to GL vector)
|
||||
[self _refreshWithColor:color];
|
||||
}
|
||||
|
||||
#pragma mark - Private Setters
|
||||
-(void)_refreshWithBackgroundColor:(UIColor*)backgroundColor {
|
||||
// Extract colors
|
||||
CGFloat red; CGFloat green; CGFloat blue; CGFloat alpha;
|
||||
[backgroundColor getRed:&red
|
||||
green:&green
|
||||
blue:&blue
|
||||
alpha:&alpha];
|
||||
// Set them on the context
|
||||
glClearColor((GLclampf)red,(GLclampf)green,(GLclampf)blue,(GLclampf)alpha);
|
||||
}
|
||||
|
||||
-(void)_refreshWithColor:(UIColor*)color {
|
||||
// Extract colors
|
||||
CGFloat red; CGFloat green; CGFloat blue; CGFloat alpha;
|
||||
[color getRed:&red
|
||||
green:&green
|
||||
blue:&blue
|
||||
alpha:&alpha];
|
||||
// Set them on the base shader
|
||||
self.baseEffect.constantColor = GLKVector4Make((GLclampf)red,(GLclampf)green,(GLclampf)blue,(GLclampf)alpha);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#elif TARGET_OS_MAC
|
||||
|
||||
#endif
|
||||
@@ -25,8 +25,8 @@
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <AudioToolbox/AudioToolbox.h>
|
||||
#import <TargetConditionals.h>
|
||||
#import "TPCircularBuffer.h"
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
#import <AVFoundation/AVFoundation.h>
|
||||
#elif TARGET_OS_MAC
|
||||
@@ -404,6 +404,28 @@ typedef NSRect EZRect;
|
||||
*/
|
||||
+ (NSString *)stringFromUInt32Code:(UInt32)code;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Color Utility
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
///-----------------------------------------------------------
|
||||
/// @name Color Utility
|
||||
///-----------------------------------------------------------
|
||||
|
||||
/**
|
||||
Helper function to get the color components from a CGColorRef in the RGBA colorspace.
|
||||
@param color A CGColorRef that represents a color.
|
||||
@param red A pointer to a CGFloat to hold the value of the red component. This value will be between 0 and 1.
|
||||
@param green A pointer to a CGFloat to hold the value of the green component. This value will be between 0 and 1.
|
||||
@param blue A pointer to a CGFloat to hold the value of the blue component. This value will be between 0 and 1.
|
||||
@param alpha A pointer to a CGFloat to hold the value of the alpha component. This value will be between 0 and 1.
|
||||
*/
|
||||
+ (void)getColorComponentsFromCGColor:(CGColorRef)color
|
||||
red:(CGFloat *)red
|
||||
green:(CGFloat *)green
|
||||
blue:(CGFloat *)blue
|
||||
alpha:(CGFloat *)alpha;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Plot Utility
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -478,6 +500,14 @@ typedef NSRect EZRect;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Zeroes out a EZPlotHistoryInfo data structure without freeing the resources.
|
||||
@param historyInfo A pointer to a EZPlotHistoryInfo data structure
|
||||
*/
|
||||
+ (void)clearHistoryInfo:(EZPlotHistoryInfo *)historyInfo;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
Frees a EZPlotHistoryInfo data structure
|
||||
@param historyInfo A pointer to a EZPlotHistoryInfo data structure
|
||||
|
||||
@@ -534,6 +534,31 @@ BOOL __shouldExitOnCheckResultFail = YES;
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Color Utility
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
///-----------------------------------------------------------
|
||||
/// @name Color Utility
|
||||
///-----------------------------------------------------------
|
||||
|
||||
+ (void)getColorComponentsFromCGColor:(CGColorRef)color
|
||||
red:(CGFloat *)red
|
||||
green:(CGFloat *)green
|
||||
blue:(CGFloat *)blue
|
||||
alpha:(CGFloat *)alpha
|
||||
{
|
||||
size_t componentCount = CGColorGetNumberOfComponents(color);
|
||||
if (componentCount == 4)
|
||||
{
|
||||
const CGFloat *components = CGColorGetComponents(color);
|
||||
*red = components[0];
|
||||
*green = components[1];
|
||||
*blue = components[2];
|
||||
*alpha = components[3];
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - TPCircularBuffer Utility
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -591,17 +616,25 @@ BOOL __shouldExitOnCheckResultFail = YES;
|
||||
memmove(historyInfo->buffer, historyBuffer, bytes);
|
||||
if (targetBytes <= availableBytes)
|
||||
{
|
||||
TPCircularBufferConsume(&historyInfo->circularBuffer, sizeof(src));
|
||||
TPCircularBufferConsume(&historyInfo->circularBuffer, availableBytes - targetBytes);
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
+ (void)clearHistoryInfo:(EZPlotHistoryInfo *)historyInfo
|
||||
{
|
||||
memset(historyInfo->buffer, 0, historyInfo->bufferSize * sizeof(float));
|
||||
TPCircularBufferClear(&historyInfo->circularBuffer);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
+ (void)freeHistoryInfo:(EZPlotHistoryInfo *)historyInfo
|
||||
{
|
||||
free(historyInfo->buffer);
|
||||
free(historyInfo);
|
||||
TPCircularBufferClear(&historyInfo->circularBuffer);
|
||||
TPCircularBufferCleanup(&historyInfo->circularBuffer);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -70,7 +70,8 @@ static OSStatus EZAudioMicrophoneCallback(void *inRefCon,
|
||||
- (void)dealloc
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
[EZAudioUtilities checkResult:AudioUnitUninitialize(self.info->audioUnit) operation:"Failed to unintialize audio unit for microphone"];
|
||||
[EZAudioUtilities checkResult:AudioUnitUninitialize(self.info->audioUnit)
|
||||
operation:"Failed to unintialize audio unit for microphone"];
|
||||
[EZAudioUtilities freeBufferList:self.info->audioBufferList];
|
||||
[EZAudioUtilities freeFloatBuffers:self.info->floatData
|
||||
numberOfChannels:self.info->streamFormat.mChannelsPerFrame];
|
||||
@@ -116,11 +117,7 @@ static OSStatus EZAudioMicrophoneCallback(void *inRefCon,
|
||||
self = [self initWithMicrophoneDelegate:delegate];
|
||||
if(self)
|
||||
{
|
||||
self.info = (EZMicrophoneInfo *)malloc(sizeof(EZMicrophoneInfo));
|
||||
memset(self.info, 0, sizeof(EZMicrophoneInfo));
|
||||
self.info->streamFormat = audioStreamBasicDescription;
|
||||
_delegate = delegate;
|
||||
[self setup];
|
||||
[self setAudioStreamBasicDescription:audioStreamBasicDescription];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
+2
-2
@@ -108,8 +108,8 @@ OSStatus EZOutputGraphRenderCallback(void *inRefCon,
|
||||
operation:"Failed to stop graph"];
|
||||
[EZAudioUtilities checkResult:AUGraphClose(self.info->graph)
|
||||
operation:"Failed to close graph"];
|
||||
[EZAudioUtilities checkResult:AUGraphUninitialize(self.info->graph)
|
||||
operation:"Failed to uninitialize graph"];
|
||||
[EZAudioUtilities checkResult:DisposeAUGraph(self.info->graph)
|
||||
operation:"Failed to dispose of graph"];
|
||||
free(self.info);
|
||||
}
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ typedef NS_ENUM(NSInteger, EZPlotType)
|
||||
Plot that displays only the samples of the current buffer
|
||||
*/
|
||||
EZPlotTypeBuffer,
|
||||
|
||||
/**
|
||||
Plot that displays a rolling history of values using the RMS calculated for each incoming buffer
|
||||
*/
|
||||
|
||||
-6
@@ -30,7 +30,6 @@
|
||||
66755A371B3B790D0013E67E /* EZAudioPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755A1A1B3B790D0013E67E /* EZAudioPlayer.m */; };
|
||||
66755A381B3B790D0013E67E /* EZAudioPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755A1C1B3B790D0013E67E /* EZAudioPlot.m */; };
|
||||
66755A391B3B790D0013E67E /* EZAudioPlotGL.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755A1E1B3B790D0013E67E /* EZAudioPlotGL.m */; };
|
||||
66755A3A1B3B790D0013E67E /* EZAudioPlotGLKViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755A201B3B790D0013E67E /* EZAudioPlotGLKViewController.m */; };
|
||||
66755A3B1B3B790D0013E67E /* EZAudioUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755A221B3B790D0013E67E /* EZAudioUtilities.m */; };
|
||||
66755A3C1B3B790D0013E67E /* EZMicrophone.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755A241B3B790D0013E67E /* EZMicrophone.m */; };
|
||||
66755A3D1B3B790D0013E67E /* EZOutput.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755A261B3B790D0013E67E /* EZOutput.m */; };
|
||||
@@ -89,8 +88,6 @@
|
||||
66755A1C1B3B790D0013E67E /* EZAudioPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlot.m; sourceTree = "<group>"; };
|
||||
66755A1D1B3B790D0013E67E /* EZAudioPlotGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGL.h; sourceTree = "<group>"; };
|
||||
66755A1E1B3B790D0013E67E /* EZAudioPlotGL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGL.m; sourceTree = "<group>"; };
|
||||
66755A1F1B3B790D0013E67E /* EZAudioPlotGLKViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGLKViewController.h; sourceTree = "<group>"; };
|
||||
66755A201B3B790D0013E67E /* EZAudioPlotGLKViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGLKViewController.m; sourceTree = "<group>"; };
|
||||
66755A211B3B790D0013E67E /* EZAudioUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioUtilities.h; sourceTree = "<group>"; };
|
||||
66755A221B3B790D0013E67E /* EZAudioUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioUtilities.m; sourceTree = "<group>"; };
|
||||
66755A231B3B790D0013E67E /* EZMicrophone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZMicrophone.h; sourceTree = "<group>"; };
|
||||
@@ -183,8 +180,6 @@
|
||||
66755A1C1B3B790D0013E67E /* EZAudioPlot.m */,
|
||||
66755A1D1B3B790D0013E67E /* EZAudioPlotGL.h */,
|
||||
66755A1E1B3B790D0013E67E /* EZAudioPlotGL.m */,
|
||||
66755A1F1B3B790D0013E67E /* EZAudioPlotGLKViewController.h */,
|
||||
66755A201B3B790D0013E67E /* EZAudioPlotGLKViewController.m */,
|
||||
66755A211B3B790D0013E67E /* EZAudioUtilities.h */,
|
||||
66755A221B3B790D0013E67E /* EZAudioUtilities.m */,
|
||||
66755A231B3B790D0013E67E /* EZMicrophone.h */,
|
||||
@@ -425,7 +420,6 @@
|
||||
66755A371B3B790D0013E67E /* EZAudioPlayer.m in Sources */,
|
||||
94056D88185B97E300EB94BA /* CoreGraphicsWaveformViewController.m in Sources */,
|
||||
66755A391B3B790D0013E67E /* EZAudioPlotGL.m in Sources */,
|
||||
66755A3A1B3B790D0013E67E /* EZAudioPlotGLKViewController.m in Sources */,
|
||||
66755A341B3B790D0013E67E /* EZAudioFile.m in Sources */,
|
||||
66755A3D1B3B790D0013E67E /* EZOutput.m in Sources */,
|
||||
66755A3B1B3B790D0013E67E /* EZAudioUtilities.m in Sources */,
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
66755B8D1B3B79380013E67E /* EZAudioPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755B701B3B79380013E67E /* EZAudioPlayer.m */; };
|
||||
66755B8E1B3B79380013E67E /* EZAudioPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755B721B3B79380013E67E /* EZAudioPlot.m */; };
|
||||
66755B8F1B3B79380013E67E /* EZAudioPlotGL.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755B741B3B79380013E67E /* EZAudioPlotGL.m */; };
|
||||
66755B901B3B79380013E67E /* EZAudioPlotGLKViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755B761B3B79380013E67E /* EZAudioPlotGLKViewController.m */; };
|
||||
66755B911B3B79380013E67E /* EZAudioUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755B781B3B79380013E67E /* EZAudioUtilities.m */; };
|
||||
66755B921B3B79380013E67E /* EZMicrophone.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755B7A1B3B79380013E67E /* EZMicrophone.m */; };
|
||||
66755B931B3B79380013E67E /* EZOutput.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755B7C1B3B79380013E67E /* EZOutput.m */; };
|
||||
@@ -76,8 +75,6 @@
|
||||
66755B721B3B79380013E67E /* EZAudioPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlot.m; sourceTree = "<group>"; };
|
||||
66755B731B3B79380013E67E /* EZAudioPlotGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGL.h; sourceTree = "<group>"; };
|
||||
66755B741B3B79380013E67E /* EZAudioPlotGL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGL.m; sourceTree = "<group>"; };
|
||||
66755B751B3B79380013E67E /* EZAudioPlotGLKViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGLKViewController.h; sourceTree = "<group>"; };
|
||||
66755B761B3B79380013E67E /* EZAudioPlotGLKViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGLKViewController.m; sourceTree = "<group>"; };
|
||||
66755B771B3B79380013E67E /* EZAudioUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioUtilities.h; sourceTree = "<group>"; };
|
||||
66755B781B3B79380013E67E /* EZAudioUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioUtilities.m; sourceTree = "<group>"; };
|
||||
66755B791B3B79380013E67E /* EZMicrophone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZMicrophone.h; sourceTree = "<group>"; };
|
||||
@@ -172,8 +169,6 @@
|
||||
66755B721B3B79380013E67E /* EZAudioPlot.m */,
|
||||
66755B731B3B79380013E67E /* EZAudioPlotGL.h */,
|
||||
66755B741B3B79380013E67E /* EZAudioPlotGL.m */,
|
||||
66755B751B3B79380013E67E /* EZAudioPlotGLKViewController.h */,
|
||||
66755B761B3B79380013E67E /* EZAudioPlotGLKViewController.m */,
|
||||
66755B771B3B79380013E67E /* EZAudioUtilities.h */,
|
||||
66755B781B3B79380013E67E /* EZAudioUtilities.m */,
|
||||
66755B791B3B79380013E67E /* EZMicrophone.h */,
|
||||
@@ -398,7 +393,6 @@
|
||||
66755B8D1B3B79380013E67E /* EZAudioPlayer.m in Sources */,
|
||||
9417A9D61872130200D9D37B /* FFTViewController.m in Sources */,
|
||||
66755B8F1B3B79380013E67E /* EZAudioPlotGL.m in Sources */,
|
||||
66755B901B3B79380013E67E /* EZAudioPlotGLKViewController.m in Sources */,
|
||||
66755B8A1B3B79380013E67E /* EZAudioFile.m in Sources */,
|
||||
66755B931B3B79380013E67E /* EZOutput.m in Sources */,
|
||||
66755B911B3B79380013E67E /* EZAudioUtilities.m in Sources */,
|
||||
|
||||
-6
@@ -16,7 +16,6 @@
|
||||
66755A701B3B79130013E67E /* EZAudioPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755A531B3B79130013E67E /* EZAudioPlayer.m */; };
|
||||
66755A711B3B79130013E67E /* EZAudioPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755A551B3B79130013E67E /* EZAudioPlot.m */; };
|
||||
66755A721B3B79130013E67E /* EZAudioPlotGL.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755A571B3B79130013E67E /* EZAudioPlotGL.m */; };
|
||||
66755A731B3B79130013E67E /* EZAudioPlotGLKViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755A591B3B79130013E67E /* EZAudioPlotGLKViewController.m */; };
|
||||
66755A741B3B79130013E67E /* EZAudioUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755A5B1B3B79130013E67E /* EZAudioUtilities.m */; };
|
||||
66755A751B3B79130013E67E /* EZMicrophone.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755A5D1B3B79130013E67E /* EZMicrophone.m */; };
|
||||
66755A761B3B79130013E67E /* EZOutput.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755A5F1B3B79130013E67E /* EZOutput.m */; };
|
||||
@@ -75,8 +74,6 @@
|
||||
66755A551B3B79130013E67E /* EZAudioPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlot.m; sourceTree = "<group>"; };
|
||||
66755A561B3B79130013E67E /* EZAudioPlotGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGL.h; sourceTree = "<group>"; };
|
||||
66755A571B3B79130013E67E /* EZAudioPlotGL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGL.m; sourceTree = "<group>"; };
|
||||
66755A581B3B79130013E67E /* EZAudioPlotGLKViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGLKViewController.h; sourceTree = "<group>"; };
|
||||
66755A591B3B79130013E67E /* EZAudioPlotGLKViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGLKViewController.m; sourceTree = "<group>"; };
|
||||
66755A5A1B3B79130013E67E /* EZAudioUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioUtilities.h; sourceTree = "<group>"; };
|
||||
66755A5B1B3B79130013E67E /* EZAudioUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioUtilities.m; sourceTree = "<group>"; };
|
||||
66755A5C1B3B79130013E67E /* EZMicrophone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZMicrophone.h; sourceTree = "<group>"; };
|
||||
@@ -169,8 +166,6 @@
|
||||
66755A551B3B79130013E67E /* EZAudioPlot.m */,
|
||||
66755A561B3B79130013E67E /* EZAudioPlotGL.h */,
|
||||
66755A571B3B79130013E67E /* EZAudioPlotGL.m */,
|
||||
66755A581B3B79130013E67E /* EZAudioPlotGLKViewController.h */,
|
||||
66755A591B3B79130013E67E /* EZAudioPlotGLKViewController.m */,
|
||||
66755A5A1B3B79130013E67E /* EZAudioUtilities.h */,
|
||||
66755A5B1B3B79130013E67E /* EZAudioUtilities.m */,
|
||||
66755A5C1B3B79130013E67E /* EZMicrophone.h */,
|
||||
@@ -394,7 +389,6 @@
|
||||
66755A701B3B79130013E67E /* EZAudioPlayer.m in Sources */,
|
||||
94056DAA185BB0BC00EB94BA /* AppDelegate.m in Sources */,
|
||||
66755A721B3B79130013E67E /* EZAudioPlotGL.m in Sources */,
|
||||
66755A731B3B79130013E67E /* EZAudioPlotGLKViewController.m in Sources */,
|
||||
66755A6D1B3B79130013E67E /* EZAudioFile.m in Sources */,
|
||||
66755A761B3B79130013E67E /* EZOutput.m in Sources */,
|
||||
66755A741B3B79130013E67E /* EZAudioUtilities.m in Sources */,
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="7702" systemVersion="14C109" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="7706" systemVersion="14E46" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<dependencies>
|
||||
<deployment version="1070" identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="7702"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="7706"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<customObject id="-2" userLabel="File's Owner" customClass="OpenGLWaveformViewController">
|
||||
|
||||
-6
@@ -16,7 +16,6 @@
|
||||
66755B541B3B79310013E67E /* EZAudioPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755B371B3B79310013E67E /* EZAudioPlayer.m */; };
|
||||
66755B551B3B79310013E67E /* EZAudioPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755B391B3B79310013E67E /* EZAudioPlot.m */; };
|
||||
66755B561B3B79310013E67E /* EZAudioPlotGL.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755B3B1B3B79310013E67E /* EZAudioPlotGL.m */; };
|
||||
66755B571B3B79310013E67E /* EZAudioPlotGLKViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755B3D1B3B79310013E67E /* EZAudioPlotGLKViewController.m */; };
|
||||
66755B581B3B79310013E67E /* EZAudioUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755B3F1B3B79310013E67E /* EZAudioUtilities.m */; };
|
||||
66755B591B3B79310013E67E /* EZMicrophone.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755B411B3B79310013E67E /* EZMicrophone.m */; };
|
||||
66755B5A1B3B79310013E67E /* EZOutput.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755B431B3B79310013E67E /* EZOutput.m */; };
|
||||
@@ -75,8 +74,6 @@
|
||||
66755B391B3B79310013E67E /* EZAudioPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlot.m; sourceTree = "<group>"; };
|
||||
66755B3A1B3B79310013E67E /* EZAudioPlotGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGL.h; sourceTree = "<group>"; };
|
||||
66755B3B1B3B79310013E67E /* EZAudioPlotGL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGL.m; sourceTree = "<group>"; };
|
||||
66755B3C1B3B79310013E67E /* EZAudioPlotGLKViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGLKViewController.h; sourceTree = "<group>"; };
|
||||
66755B3D1B3B79310013E67E /* EZAudioPlotGLKViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGLKViewController.m; sourceTree = "<group>"; };
|
||||
66755B3E1B3B79310013E67E /* EZAudioUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioUtilities.h; sourceTree = "<group>"; };
|
||||
66755B3F1B3B79310013E67E /* EZAudioUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioUtilities.m; sourceTree = "<group>"; };
|
||||
66755B401B3B79310013E67E /* EZMicrophone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZMicrophone.h; sourceTree = "<group>"; };
|
||||
@@ -169,8 +166,6 @@
|
||||
66755B391B3B79310013E67E /* EZAudioPlot.m */,
|
||||
66755B3A1B3B79310013E67E /* EZAudioPlotGL.h */,
|
||||
66755B3B1B3B79310013E67E /* EZAudioPlotGL.m */,
|
||||
66755B3C1B3B79310013E67E /* EZAudioPlotGLKViewController.h */,
|
||||
66755B3D1B3B79310013E67E /* EZAudioPlotGLKViewController.m */,
|
||||
66755B3E1B3B79310013E67E /* EZAudioUtilities.h */,
|
||||
66755B3F1B3B79310013E67E /* EZAudioUtilities.m */,
|
||||
66755B401B3B79310013E67E /* EZMicrophone.h */,
|
||||
@@ -394,7 +389,6 @@
|
||||
66755B541B3B79310013E67E /* EZAudioPlayer.m in Sources */,
|
||||
941D72211864C4D7007D52D8 /* PassThroughViewController.m in Sources */,
|
||||
66755B561B3B79310013E67E /* EZAudioPlotGL.m in Sources */,
|
||||
66755B571B3B79310013E67E /* EZAudioPlotGLKViewController.m in Sources */,
|
||||
66755B511B3B79310013E67E /* EZAudioFile.m in Sources */,
|
||||
66755B5A1B3B79310013E67E /* EZOutput.m in Sources */,
|
||||
66755B581B3B79310013E67E /* EZAudioUtilities.m in Sources */,
|
||||
|
||||
-6
@@ -17,7 +17,6 @@
|
||||
66755AA91B3B791C0013E67E /* EZAudioPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755A8C1B3B791C0013E67E /* EZAudioPlayer.m */; };
|
||||
66755AAA1B3B791C0013E67E /* EZAudioPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755A8E1B3B791C0013E67E /* EZAudioPlot.m */; };
|
||||
66755AAB1B3B791C0013E67E /* EZAudioPlotGL.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755A901B3B791C0013E67E /* EZAudioPlotGL.m */; };
|
||||
66755AAC1B3B791C0013E67E /* EZAudioPlotGLKViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755A921B3B791C0013E67E /* EZAudioPlotGLKViewController.m */; };
|
||||
66755AAD1B3B791C0013E67E /* EZAudioUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755A941B3B791C0013E67E /* EZAudioUtilities.m */; };
|
||||
66755AAE1B3B791C0013E67E /* EZMicrophone.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755A961B3B791C0013E67E /* EZMicrophone.m */; };
|
||||
66755AAF1B3B791C0013E67E /* EZOutput.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755A981B3B791C0013E67E /* EZOutput.m */; };
|
||||
@@ -77,8 +76,6 @@
|
||||
66755A8E1B3B791C0013E67E /* EZAudioPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlot.m; sourceTree = "<group>"; };
|
||||
66755A8F1B3B791C0013E67E /* EZAudioPlotGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGL.h; sourceTree = "<group>"; };
|
||||
66755A901B3B791C0013E67E /* EZAudioPlotGL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGL.m; sourceTree = "<group>"; };
|
||||
66755A911B3B791C0013E67E /* EZAudioPlotGLKViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGLKViewController.h; sourceTree = "<group>"; };
|
||||
66755A921B3B791C0013E67E /* EZAudioPlotGLKViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGLKViewController.m; sourceTree = "<group>"; };
|
||||
66755A931B3B791C0013E67E /* EZAudioUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioUtilities.h; sourceTree = "<group>"; };
|
||||
66755A941B3B791C0013E67E /* EZAudioUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioUtilities.m; sourceTree = "<group>"; };
|
||||
66755A951B3B791C0013E67E /* EZMicrophone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZMicrophone.h; sourceTree = "<group>"; };
|
||||
@@ -171,8 +168,6 @@
|
||||
66755A8E1B3B791C0013E67E /* EZAudioPlot.m */,
|
||||
66755A8F1B3B791C0013E67E /* EZAudioPlotGL.h */,
|
||||
66755A901B3B791C0013E67E /* EZAudioPlotGL.m */,
|
||||
66755A911B3B791C0013E67E /* EZAudioPlotGLKViewController.h */,
|
||||
66755A921B3B791C0013E67E /* EZAudioPlotGLKViewController.m */,
|
||||
66755A931B3B791C0013E67E /* EZAudioUtilities.h */,
|
||||
66755A941B3B791C0013E67E /* EZAudioUtilities.m */,
|
||||
66755A951B3B791C0013E67E /* EZMicrophone.h */,
|
||||
@@ -398,7 +393,6 @@
|
||||
66755AA91B3B791C0013E67E /* EZAudioPlayer.m in Sources */,
|
||||
94056F31185BD86D00EB94BA /* PlayFileViewController.m in Sources */,
|
||||
66755AAB1B3B791C0013E67E /* EZAudioPlotGL.m in Sources */,
|
||||
66755AAC1B3B791C0013E67E /* EZAudioPlotGLKViewController.m in Sources */,
|
||||
66755AA61B3B791C0013E67E /* EZAudioFile.m in Sources */,
|
||||
66755AAF1B3B791C0013E67E /* EZOutput.m in Sources */,
|
||||
66755AAD1B3B791C0013E67E /* EZAudioUtilities.m in Sources */,
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@
|
||||
/**
|
||||
The CoreGraphics based audio plot
|
||||
*/
|
||||
@property (nonatomic, weak) IBOutlet EZAudioPlot *audioPlot;
|
||||
@property (nonatomic, weak) IBOutlet EZAudioPlotGL *audioPlot;
|
||||
|
||||
#pragma mark - UI Extras
|
||||
/**
|
||||
|
||||
+1
-2
@@ -313,13 +313,12 @@
|
||||
self.audioPlot.plotType = EZPlotTypeBuffer;
|
||||
self.audioPlot.shouldFill = YES;
|
||||
self.audioPlot.shouldMirror = YES;
|
||||
[self.audioPlot clear];
|
||||
|
||||
//
|
||||
// Plot the whole waveform
|
||||
//
|
||||
__weak typeof (self) weakSelf = self;
|
||||
[self.audioFile getWaveformDataWithNumberOfPoints:256
|
||||
[self.audioFile getWaveformDataWithNumberOfPoints:1024
|
||||
completion:^(float **waveformData,
|
||||
int length)
|
||||
{
|
||||
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="7702" systemVersion="14C109" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="7706" systemVersion="14E46" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||
<dependencies>
|
||||
<deployment version="1070" identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="7702"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="7706"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<customObject id="-2" userLabel="File's Owner" customClass="PlayFileViewController">
|
||||
@@ -29,7 +29,7 @@
|
||||
<rect key="frame" x="0.0" y="-1" width="480" height="366"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
|
||||
<subviews>
|
||||
<customView translatesAutoresizingMaskIntoConstraints="NO" id="Lz1-Gs-1lD" customClass="EZAudioPlot">
|
||||
<customView translatesAutoresizingMaskIntoConstraints="NO" id="Lz1-Gs-1lD" customClass="EZAudioPlotGL">
|
||||
<rect key="frame" x="0.0" y="0.0" width="480" height="146"/>
|
||||
</customView>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="2Ma-jj-U3z">
|
||||
|
||||
-6
@@ -16,7 +16,6 @@
|
||||
66755AE21B3B79230013E67E /* EZAudioPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755AC51B3B79220013E67E /* EZAudioPlayer.m */; };
|
||||
66755AE31B3B79230013E67E /* EZAudioPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755AC71B3B79220013E67E /* EZAudioPlot.m */; };
|
||||
66755AE41B3B79230013E67E /* EZAudioPlotGL.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755AC91B3B79220013E67E /* EZAudioPlotGL.m */; };
|
||||
66755AE51B3B79230013E67E /* EZAudioPlotGLKViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755ACB1B3B79220013E67E /* EZAudioPlotGLKViewController.m */; };
|
||||
66755AE61B3B79230013E67E /* EZAudioUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755ACD1B3B79220013E67E /* EZAudioUtilities.m */; };
|
||||
66755AE71B3B79230013E67E /* EZMicrophone.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755ACF1B3B79230013E67E /* EZMicrophone.m */; };
|
||||
66755AE81B3B79230013E67E /* EZOutput.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755AD11B3B79230013E67E /* EZOutput.m */; };
|
||||
@@ -76,8 +75,6 @@
|
||||
66755AC71B3B79220013E67E /* EZAudioPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlot.m; sourceTree = "<group>"; };
|
||||
66755AC81B3B79220013E67E /* EZAudioPlotGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGL.h; sourceTree = "<group>"; };
|
||||
66755AC91B3B79220013E67E /* EZAudioPlotGL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGL.m; sourceTree = "<group>"; };
|
||||
66755ACA1B3B79220013E67E /* EZAudioPlotGLKViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGLKViewController.h; sourceTree = "<group>"; };
|
||||
66755ACB1B3B79220013E67E /* EZAudioPlotGLKViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGLKViewController.m; sourceTree = "<group>"; };
|
||||
66755ACC1B3B79220013E67E /* EZAudioUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioUtilities.h; sourceTree = "<group>"; };
|
||||
66755ACD1B3B79220013E67E /* EZAudioUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioUtilities.m; sourceTree = "<group>"; };
|
||||
66755ACE1B3B79230013E67E /* EZMicrophone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZMicrophone.h; sourceTree = "<group>"; };
|
||||
@@ -172,8 +169,6 @@
|
||||
66755AC71B3B79220013E67E /* EZAudioPlot.m */,
|
||||
66755AC81B3B79220013E67E /* EZAudioPlotGL.h */,
|
||||
66755AC91B3B79220013E67E /* EZAudioPlotGL.m */,
|
||||
66755ACA1B3B79220013E67E /* EZAudioPlotGLKViewController.h */,
|
||||
66755ACB1B3B79220013E67E /* EZAudioPlotGLKViewController.m */,
|
||||
66755ACC1B3B79220013E67E /* EZAudioUtilities.h */,
|
||||
66755ACD1B3B79220013E67E /* EZAudioUtilities.m */,
|
||||
66755ACE1B3B79230013E67E /* EZMicrophone.h */,
|
||||
@@ -398,7 +393,6 @@
|
||||
66755AE21B3B79230013E67E /* EZAudioPlayer.m in Sources */,
|
||||
94056E74185BB44200EB94BA /* RecordViewController.m in Sources */,
|
||||
66755AE41B3B79230013E67E /* EZAudioPlotGL.m in Sources */,
|
||||
66755AE51B3B79230013E67E /* EZAudioPlotGLKViewController.m in Sources */,
|
||||
66755ADF1B3B79230013E67E /* EZAudioFile.m in Sources */,
|
||||
66755AE81B3B79230013E67E /* EZOutput.m in Sources */,
|
||||
66755AE61B3B79230013E67E /* EZAudioUtilities.m in Sources */,
|
||||
|
||||
-6
@@ -16,7 +16,6 @@
|
||||
66755B1B1B3B792A0013E67E /* EZAudioPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755AFE1B3B792A0013E67E /* EZAudioPlayer.m */; };
|
||||
66755B1C1B3B792A0013E67E /* EZAudioPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755B001B3B792A0013E67E /* EZAudioPlot.m */; };
|
||||
66755B1D1B3B792A0013E67E /* EZAudioPlotGL.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755B021B3B792A0013E67E /* EZAudioPlotGL.m */; };
|
||||
66755B1E1B3B792A0013E67E /* EZAudioPlotGLKViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755B041B3B792A0013E67E /* EZAudioPlotGLKViewController.m */; };
|
||||
66755B1F1B3B792A0013E67E /* EZAudioUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755B061B3B792A0013E67E /* EZAudioUtilities.m */; };
|
||||
66755B201B3B792A0013E67E /* EZMicrophone.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755B081B3B792A0013E67E /* EZMicrophone.m */; };
|
||||
66755B211B3B792A0013E67E /* EZOutput.m in Sources */ = {isa = PBXBuildFile; fileRef = 66755B0A1B3B792A0013E67E /* EZOutput.m */; };
|
||||
@@ -76,8 +75,6 @@
|
||||
66755B001B3B792A0013E67E /* EZAudioPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlot.m; sourceTree = "<group>"; };
|
||||
66755B011B3B792A0013E67E /* EZAudioPlotGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGL.h; sourceTree = "<group>"; };
|
||||
66755B021B3B792A0013E67E /* EZAudioPlotGL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGL.m; sourceTree = "<group>"; };
|
||||
66755B031B3B792A0013E67E /* EZAudioPlotGLKViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGLKViewController.h; sourceTree = "<group>"; };
|
||||
66755B041B3B792A0013E67E /* EZAudioPlotGLKViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGLKViewController.m; sourceTree = "<group>"; };
|
||||
66755B051B3B792A0013E67E /* EZAudioUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioUtilities.h; sourceTree = "<group>"; };
|
||||
66755B061B3B792A0013E67E /* EZAudioUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioUtilities.m; sourceTree = "<group>"; };
|
||||
66755B071B3B792A0013E67E /* EZMicrophone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZMicrophone.h; sourceTree = "<group>"; };
|
||||
@@ -171,8 +168,6 @@
|
||||
66755B001B3B792A0013E67E /* EZAudioPlot.m */,
|
||||
66755B011B3B792A0013E67E /* EZAudioPlotGL.h */,
|
||||
66755B021B3B792A0013E67E /* EZAudioPlotGL.m */,
|
||||
66755B031B3B792A0013E67E /* EZAudioPlotGLKViewController.h */,
|
||||
66755B041B3B792A0013E67E /* EZAudioPlotGLKViewController.m */,
|
||||
66755B051B3B792A0013E67E /* EZAudioUtilities.h */,
|
||||
66755B061B3B792A0013E67E /* EZAudioUtilities.m */,
|
||||
66755B071B3B792A0013E67E /* EZMicrophone.h */,
|
||||
@@ -398,7 +393,6 @@
|
||||
66755B1B1B3B792A0013E67E /* EZAudioPlayer.m in Sources */,
|
||||
94056E96185BCBC000EB94BA /* AppDelegate.m in Sources */,
|
||||
66755B1D1B3B792A0013E67E /* EZAudioPlotGL.m in Sources */,
|
||||
66755B1E1B3B792A0013E67E /* EZAudioPlotGLKViewController.m in Sources */,
|
||||
66755B181B3B792A0013E67E /* EZAudioFile.m in Sources */,
|
||||
66755B211B3B792A0013E67E /* EZOutput.m in Sources */,
|
||||
66755B1F1B3B792A0013E67E /* EZAudioUtilities.m in Sources */,
|
||||
|
||||
-6
@@ -16,7 +16,6 @@
|
||||
667558A81B3B604B0013E67E /* EZAudioPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 6675588B1B3B604B0013E67E /* EZAudioPlayer.m */; };
|
||||
667558A91B3B604B0013E67E /* EZAudioPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 6675588D1B3B604B0013E67E /* EZAudioPlot.m */; };
|
||||
667558AA1B3B604B0013E67E /* EZAudioPlotGL.m in Sources */ = {isa = PBXBuildFile; fileRef = 6675588F1B3B604B0013E67E /* EZAudioPlotGL.m */; };
|
||||
667558AB1B3B604B0013E67E /* EZAudioPlotGLKViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 667558911B3B604B0013E67E /* EZAudioPlotGLKViewController.m */; };
|
||||
667558AC1B3B604B0013E67E /* EZAudioUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 667558931B3B604B0013E67E /* EZAudioUtilities.m */; };
|
||||
667558AD1B3B604B0013E67E /* EZMicrophone.m in Sources */ = {isa = PBXBuildFile; fileRef = 667558951B3B604B0013E67E /* EZMicrophone.m */; };
|
||||
667558AE1B3B604B0013E67E /* EZOutput.m in Sources */ = {isa = PBXBuildFile; fileRef = 667558971B3B604B0013E67E /* EZOutput.m */; };
|
||||
@@ -73,8 +72,6 @@
|
||||
6675588D1B3B604B0013E67E /* EZAudioPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlot.m; sourceTree = "<group>"; };
|
||||
6675588E1B3B604B0013E67E /* EZAudioPlotGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGL.h; sourceTree = "<group>"; };
|
||||
6675588F1B3B604B0013E67E /* EZAudioPlotGL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGL.m; sourceTree = "<group>"; };
|
||||
667558901B3B604B0013E67E /* EZAudioPlotGLKViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGLKViewController.h; sourceTree = "<group>"; };
|
||||
667558911B3B604B0013E67E /* EZAudioPlotGLKViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGLKViewController.m; sourceTree = "<group>"; };
|
||||
667558921B3B604B0013E67E /* EZAudioUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioUtilities.h; sourceTree = "<group>"; };
|
||||
667558931B3B604B0013E67E /* EZAudioUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioUtilities.m; sourceTree = "<group>"; };
|
||||
667558941B3B604B0013E67E /* EZMicrophone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZMicrophone.h; sourceTree = "<group>"; };
|
||||
@@ -161,8 +158,6 @@
|
||||
6675588D1B3B604B0013E67E /* EZAudioPlot.m */,
|
||||
6675588E1B3B604B0013E67E /* EZAudioPlotGL.h */,
|
||||
6675588F1B3B604B0013E67E /* EZAudioPlotGL.m */,
|
||||
667558901B3B604B0013E67E /* EZAudioPlotGLKViewController.h */,
|
||||
667558911B3B604B0013E67E /* EZAudioPlotGLKViewController.m */,
|
||||
667558921B3B604B0013E67E /* EZAudioUtilities.h */,
|
||||
667558931B3B604B0013E67E /* EZAudioUtilities.m */,
|
||||
667558941B3B604B0013E67E /* EZMicrophone.h */,
|
||||
@@ -370,7 +365,6 @@
|
||||
667558A81B3B604B0013E67E /* EZAudioPlayer.m in Sources */,
|
||||
94056FDE185E59D900EB94BA /* CoreGraphicsWaveformViewController.m in Sources */,
|
||||
667558AA1B3B604B0013E67E /* EZAudioPlotGL.m in Sources */,
|
||||
667558AB1B3B604B0013E67E /* EZAudioPlotGLKViewController.m in Sources */,
|
||||
667558A51B3B604B0013E67E /* EZAudioFile.m in Sources */,
|
||||
667558AE1B3B604B0013E67E /* EZOutput.m in Sources */,
|
||||
667558AC1B3B604B0013E67E /* EZAudioUtilities.m in Sources */,
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
6675591A1B3B78720013E67E /* EZAudioPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 667558FD1B3B78720013E67E /* EZAudioPlayer.m */; };
|
||||
6675591B1B3B78720013E67E /* EZAudioPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 667558FF1B3B78720013E67E /* EZAudioPlot.m */; };
|
||||
6675591C1B3B78720013E67E /* EZAudioPlotGL.m in Sources */ = {isa = PBXBuildFile; fileRef = 667559011B3B78720013E67E /* EZAudioPlotGL.m */; };
|
||||
6675591D1B3B78720013E67E /* EZAudioPlotGLKViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 667559031B3B78720013E67E /* EZAudioPlotGLKViewController.m */; };
|
||||
6675591E1B3B78720013E67E /* EZAudioUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 667559051B3B78720013E67E /* EZAudioUtilities.m */; };
|
||||
6675591F1B3B78720013E67E /* EZMicrophone.m in Sources */ = {isa = PBXBuildFile; fileRef = 667559071B3B78720013E67E /* EZMicrophone.m */; };
|
||||
667559201B3B78720013E67E /* EZOutput.m in Sources */ = {isa = PBXBuildFile; fileRef = 667559091B3B78720013E67E /* EZOutput.m */; };
|
||||
@@ -75,8 +74,6 @@
|
||||
667558FF1B3B78720013E67E /* EZAudioPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlot.m; sourceTree = "<group>"; };
|
||||
667559001B3B78720013E67E /* EZAudioPlotGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGL.h; sourceTree = "<group>"; };
|
||||
667559011B3B78720013E67E /* EZAudioPlotGL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGL.m; sourceTree = "<group>"; };
|
||||
667559021B3B78720013E67E /* EZAudioPlotGLKViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGLKViewController.h; sourceTree = "<group>"; };
|
||||
667559031B3B78720013E67E /* EZAudioPlotGLKViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGLKViewController.m; sourceTree = "<group>"; };
|
||||
667559041B3B78720013E67E /* EZAudioUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioUtilities.h; sourceTree = "<group>"; };
|
||||
667559051B3B78720013E67E /* EZAudioUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioUtilities.m; sourceTree = "<group>"; };
|
||||
667559061B3B78720013E67E /* EZMicrophone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZMicrophone.h; sourceTree = "<group>"; };
|
||||
@@ -164,8 +161,6 @@
|
||||
667558FF1B3B78720013E67E /* EZAudioPlot.m */,
|
||||
667559001B3B78720013E67E /* EZAudioPlotGL.h */,
|
||||
667559011B3B78720013E67E /* EZAudioPlotGL.m */,
|
||||
667559021B3B78720013E67E /* EZAudioPlotGLKViewController.h */,
|
||||
667559031B3B78720013E67E /* EZAudioPlotGLKViewController.m */,
|
||||
667559041B3B78720013E67E /* EZAudioUtilities.h */,
|
||||
667559051B3B78720013E67E /* EZAudioUtilities.m */,
|
||||
667559061B3B78720013E67E /* EZMicrophone.h */,
|
||||
@@ -374,7 +369,6 @@
|
||||
6675591A1B3B78720013E67E /* EZAudioPlayer.m in Sources */,
|
||||
9417A97C1871E88300D9D37B /* AppDelegate.m in Sources */,
|
||||
6675591C1B3B78720013E67E /* EZAudioPlotGL.m in Sources */,
|
||||
6675591D1B3B78720013E67E /* EZAudioPlotGLKViewController.m in Sources */,
|
||||
667559171B3B78720013E67E /* EZAudioFile.m in Sources */,
|
||||
667559201B3B78720013E67E /* EZOutput.m in Sources */,
|
||||
6675591E1B3B78720013E67E /* EZAudioUtilities.m in Sources */,
|
||||
|
||||
@@ -40,7 +40,10 @@
|
||||
*/
|
||||
@interface FFTViewController : UIViewController <EZMicrophoneDelegate>
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Components
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
EZAudioPlot for frequency plot
|
||||
*/
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?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="Weo-wK-GIV">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7706" systemVersion="14E46" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="Weo-wK-GIV">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7701"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
|
||||
-6
@@ -16,7 +16,6 @@
|
||||
667559FE1B3B78940013E67E /* EZAudioPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 667559E11B3B78940013E67E /* EZAudioPlayer.m */; };
|
||||
667559FF1B3B78940013E67E /* EZAudioPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 667559E31B3B78940013E67E /* EZAudioPlot.m */; };
|
||||
66755A001B3B78940013E67E /* EZAudioPlotGL.m in Sources */ = {isa = PBXBuildFile; fileRef = 667559E51B3B78940013E67E /* EZAudioPlotGL.m */; };
|
||||
66755A011B3B78940013E67E /* EZAudioPlotGLKViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 667559E71B3B78940013E67E /* EZAudioPlotGLKViewController.m */; };
|
||||
66755A021B3B78940013E67E /* EZAudioUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 667559E91B3B78940013E67E /* EZAudioUtilities.m */; };
|
||||
66755A031B3B78940013E67E /* EZMicrophone.m in Sources */ = {isa = PBXBuildFile; fileRef = 667559EB1B3B78940013E67E /* EZMicrophone.m */; };
|
||||
66755A041B3B78940013E67E /* EZOutput.m in Sources */ = {isa = PBXBuildFile; fileRef = 667559ED1B3B78940013E67E /* EZOutput.m */; };
|
||||
@@ -73,8 +72,6 @@
|
||||
667559E31B3B78940013E67E /* EZAudioPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlot.m; sourceTree = "<group>"; };
|
||||
667559E41B3B78940013E67E /* EZAudioPlotGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGL.h; sourceTree = "<group>"; };
|
||||
667559E51B3B78940013E67E /* EZAudioPlotGL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGL.m; sourceTree = "<group>"; };
|
||||
667559E61B3B78940013E67E /* EZAudioPlotGLKViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGLKViewController.h; sourceTree = "<group>"; };
|
||||
667559E71B3B78940013E67E /* EZAudioPlotGLKViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGLKViewController.m; sourceTree = "<group>"; };
|
||||
667559E81B3B78940013E67E /* EZAudioUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioUtilities.h; sourceTree = "<group>"; };
|
||||
667559E91B3B78940013E67E /* EZAudioUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioUtilities.m; sourceTree = "<group>"; };
|
||||
667559EA1B3B78940013E67E /* EZMicrophone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZMicrophone.h; sourceTree = "<group>"; };
|
||||
@@ -161,8 +158,6 @@
|
||||
667559E31B3B78940013E67E /* EZAudioPlot.m */,
|
||||
667559E41B3B78940013E67E /* EZAudioPlotGL.h */,
|
||||
667559E51B3B78940013E67E /* EZAudioPlotGL.m */,
|
||||
667559E61B3B78940013E67E /* EZAudioPlotGLKViewController.h */,
|
||||
667559E71B3B78940013E67E /* EZAudioPlotGLKViewController.m */,
|
||||
667559E81B3B78940013E67E /* EZAudioUtilities.h */,
|
||||
667559E91B3B78940013E67E /* EZAudioUtilities.m */,
|
||||
667559EA1B3B78940013E67E /* EZMicrophone.h */,
|
||||
@@ -370,7 +365,6 @@
|
||||
667559FE1B3B78940013E67E /* EZAudioPlayer.m in Sources */,
|
||||
94057050185E636100EB94BA /* OpenGLWaveformViewController.m in Sources */,
|
||||
66755A001B3B78940013E67E /* EZAudioPlotGL.m in Sources */,
|
||||
66755A011B3B78940013E67E /* EZAudioPlotGLKViewController.m in Sources */,
|
||||
667559FB1B3B78940013E67E /* EZAudioFile.m in Sources */,
|
||||
66755A041B3B78940013E67E /* EZOutput.m in Sources */,
|
||||
66755A021B3B78940013E67E /* EZAudioUtilities.m in Sources */,
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
<?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">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7706" systemVersion="14E46" 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"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
|
||||
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
|
||||
-6
@@ -17,7 +17,6 @@
|
||||
667559531B3B78790013E67E /* EZAudioPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 667559361B3B78790013E67E /* EZAudioPlayer.m */; };
|
||||
667559541B3B78790013E67E /* EZAudioPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 667559381B3B78790013E67E /* EZAudioPlot.m */; };
|
||||
667559551B3B78790013E67E /* EZAudioPlotGL.m in Sources */ = {isa = PBXBuildFile; fileRef = 6675593A1B3B78790013E67E /* EZAudioPlotGL.m */; };
|
||||
667559561B3B78790013E67E /* EZAudioPlotGLKViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6675593C1B3B78790013E67E /* EZAudioPlotGLKViewController.m */; };
|
||||
667559571B3B78790013E67E /* EZAudioUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 6675593E1B3B78790013E67E /* EZAudioUtilities.m */; };
|
||||
667559581B3B78790013E67E /* EZMicrophone.m in Sources */ = {isa = PBXBuildFile; fileRef = 667559401B3B78790013E67E /* EZMicrophone.m */; };
|
||||
667559591B3B78790013E67E /* EZOutput.m in Sources */ = {isa = PBXBuildFile; fileRef = 667559421B3B78790013E67E /* EZOutput.m */; };
|
||||
@@ -74,8 +73,6 @@
|
||||
667559381B3B78790013E67E /* EZAudioPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlot.m; sourceTree = "<group>"; };
|
||||
667559391B3B78790013E67E /* EZAudioPlotGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGL.h; sourceTree = "<group>"; };
|
||||
6675593A1B3B78790013E67E /* EZAudioPlotGL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGL.m; sourceTree = "<group>"; };
|
||||
6675593B1B3B78790013E67E /* EZAudioPlotGLKViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGLKViewController.h; sourceTree = "<group>"; };
|
||||
6675593C1B3B78790013E67E /* EZAudioPlotGLKViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGLKViewController.m; sourceTree = "<group>"; };
|
||||
6675593D1B3B78790013E67E /* EZAudioUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioUtilities.h; sourceTree = "<group>"; };
|
||||
6675593E1B3B78790013E67E /* EZAudioUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioUtilities.m; sourceTree = "<group>"; };
|
||||
6675593F1B3B78790013E67E /* EZMicrophone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZMicrophone.h; sourceTree = "<group>"; };
|
||||
@@ -161,8 +158,6 @@
|
||||
667559381B3B78790013E67E /* EZAudioPlot.m */,
|
||||
667559391B3B78790013E67E /* EZAudioPlotGL.h */,
|
||||
6675593A1B3B78790013E67E /* EZAudioPlotGL.m */,
|
||||
6675593B1B3B78790013E67E /* EZAudioPlotGLKViewController.h */,
|
||||
6675593C1B3B78790013E67E /* EZAudioPlotGLKViewController.m */,
|
||||
6675593D1B3B78790013E67E /* EZAudioUtilities.h */,
|
||||
6675593E1B3B78790013E67E /* EZAudioUtilities.m */,
|
||||
6675593F1B3B78790013E67E /* EZMicrophone.h */,
|
||||
@@ -370,7 +365,6 @@
|
||||
667559531B3B78790013E67E /* EZAudioPlayer.m in Sources */,
|
||||
9417A61E1864D4DC00D9D37B /* AppDelegate.m in Sources */,
|
||||
667559551B3B78790013E67E /* EZAudioPlotGL.m in Sources */,
|
||||
667559561B3B78790013E67E /* EZAudioPlotGLKViewController.m in Sources */,
|
||||
667559501B3B78790013E67E /* EZAudioFile.m in Sources */,
|
||||
667559591B3B78790013E67E /* EZOutput.m in Sources */,
|
||||
667559571B3B78790013E67E /* EZAudioUtilities.m in Sources */,
|
||||
|
||||
+21
-4
@@ -28,23 +28,40 @@
|
||||
// Import EZAudio header
|
||||
#import "EZAudio.h"
|
||||
|
||||
@interface PassThroughViewController : UIViewController <EZMicrophoneDelegate,EZOutputDataSource>
|
||||
@interface PassThroughViewController : UIViewController <EZMicrophoneDelegate>
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Components
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
The OpenGL based audio plot
|
||||
*/
|
||||
@property (nonatomic,weak) IBOutlet EZAudioPlotGL *audioPlot;
|
||||
@property (nonatomic, weak) IBOutlet EZAudioPlotGL *audioPlot;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
The UILabel used to display whether the microphone is on or 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)toggleMicrophone:(id)sender;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@end
|
||||
|
||||
+72
-45
@@ -25,22 +25,25 @@
|
||||
|
||||
#import "PassThroughViewController.h"
|
||||
|
||||
@interface PassThroughViewController (){
|
||||
TPCircularBuffer _circularBuffer;
|
||||
}
|
||||
#pragma mark - UI Extras
|
||||
@property (nonatomic,weak) IBOutlet UILabel *microphoneTextLabel;
|
||||
@end
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - PassThroughViewController (Implementation)
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@implementation PassThroughViewController
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Status Bar Style
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (UIStatusBarStyle)preferredStatusBarStyle
|
||||
{
|
||||
return UIStatusBarStyleLightContent;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#pragma mark - Customize the Audio Plot
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
@@ -97,62 +100,86 @@
|
||||
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#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)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] ){
|
||||
[[EZMicrophone sharedMicrophone] stopFetchingAudio];
|
||||
self.microphoneTextLabel.text = @"Microphone Off";
|
||||
}
|
||||
else {
|
||||
[[EZMicrophone sharedMicrophone] startFetchingAudio];
|
||||
self.microphoneTextLabel.text = @"Microphone On";
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void)toggleMicrophone:(id)sender
|
||||
{
|
||||
if( ![(UISwitch*)sender isOn] )
|
||||
{
|
||||
[[EZMicrophone sharedMicrophone] stopFetchingAudio];
|
||||
self.microphoneTextLabel.text = @"Microphone Off";
|
||||
}
|
||||
else
|
||||
{
|
||||
[[EZMicrophone sharedMicrophone] startFetchingAudio];
|
||||
self.microphoneTextLabel.text = @"Microphone On";
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
#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
|
||||
{
|
||||
// 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;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
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
|
||||
-(void)microphone:(EZMicrophone *)microphone
|
||||
hasAudioReceived:(float **)buffer
|
||||
withBufferSize:(UInt32)bufferSize
|
||||
withNumberOfChannels:(UInt32)numberOfChannels {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[self.audioPlot updateBuffer:buffer[0] withBufferSize:bufferSize];
|
||||
});
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
- (void) microphone:(EZMicrophone *)microphone
|
||||
hasAudioReceived:(float **)buffer
|
||||
withBufferSize:(UInt32)bufferSize
|
||||
withNumberOfChannels:(UInt32)numberOfChannels
|
||||
{
|
||||
__weak typeof (self) weakSelf = self;
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[weakSelf.audioPlot updateBuffer:buffer[0] withBufferSize:bufferSize];
|
||||
});
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@end
|
||||
|
||||
-6
@@ -17,7 +17,6 @@
|
||||
667558E11B3B60B80013E67E /* EZAudioPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 667558C41B3B60B80013E67E /* EZAudioPlayer.m */; };
|
||||
667558E21B3B60B80013E67E /* EZAudioPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 667558C61B3B60B80013E67E /* EZAudioPlot.m */; };
|
||||
667558E31B3B60B80013E67E /* EZAudioPlotGL.m in Sources */ = {isa = PBXBuildFile; fileRef = 667558C81B3B60B80013E67E /* EZAudioPlotGL.m */; };
|
||||
667558E41B3B60B80013E67E /* EZAudioPlotGLKViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 667558CA1B3B60B80013E67E /* EZAudioPlotGLKViewController.m */; };
|
||||
667558E51B3B60B80013E67E /* EZAudioUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 667558CC1B3B60B80013E67E /* EZAudioUtilities.m */; };
|
||||
667558E61B3B60B80013E67E /* EZMicrophone.m in Sources */ = {isa = PBXBuildFile; fileRef = 667558CE1B3B60B80013E67E /* EZMicrophone.m */; };
|
||||
667558E71B3B60B80013E67E /* EZOutput.m in Sources */ = {isa = PBXBuildFile; fileRef = 667558D01B3B60B80013E67E /* EZOutput.m */; };
|
||||
@@ -75,8 +74,6 @@
|
||||
667558C61B3B60B80013E67E /* EZAudioPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlot.m; sourceTree = "<group>"; };
|
||||
667558C71B3B60B80013E67E /* EZAudioPlotGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGL.h; sourceTree = "<group>"; };
|
||||
667558C81B3B60B80013E67E /* EZAudioPlotGL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGL.m; sourceTree = "<group>"; };
|
||||
667558C91B3B60B80013E67E /* EZAudioPlotGLKViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGLKViewController.h; sourceTree = "<group>"; };
|
||||
667558CA1B3B60B80013E67E /* EZAudioPlotGLKViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGLKViewController.m; sourceTree = "<group>"; };
|
||||
667558CB1B3B60B80013E67E /* EZAudioUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioUtilities.h; sourceTree = "<group>"; };
|
||||
667558CC1B3B60B80013E67E /* EZAudioUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioUtilities.m; sourceTree = "<group>"; };
|
||||
667558CD1B3B60B80013E67E /* EZMicrophone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZMicrophone.h; sourceTree = "<group>"; };
|
||||
@@ -163,8 +160,6 @@
|
||||
667558C61B3B60B80013E67E /* EZAudioPlot.m */,
|
||||
667558C71B3B60B80013E67E /* EZAudioPlotGL.h */,
|
||||
667558C81B3B60B80013E67E /* EZAudioPlotGL.m */,
|
||||
667558C91B3B60B80013E67E /* EZAudioPlotGLKViewController.h */,
|
||||
667558CA1B3B60B80013E67E /* EZAudioPlotGLKViewController.m */,
|
||||
667558CB1B3B60B80013E67E /* EZAudioUtilities.h */,
|
||||
667558CC1B3B60B80013E67E /* EZAudioUtilities.m */,
|
||||
667558CD1B3B60B80013E67E /* EZMicrophone.h */,
|
||||
@@ -374,7 +369,6 @@
|
||||
667558E11B3B60B80013E67E /* EZAudioPlayer.m in Sources */,
|
||||
944D03ED186038A60076EF7A /* AppDelegate.m in Sources */,
|
||||
667558E31B3B60B80013E67E /* EZAudioPlotGL.m in Sources */,
|
||||
667558E41B3B60B80013E67E /* EZAudioPlotGLKViewController.m in Sources */,
|
||||
667558DE1B3B60B80013E67E /* EZAudioFile.m in Sources */,
|
||||
667558E71B3B60B80013E67E /* EZOutput.m in Sources */,
|
||||
667558E51B3B60B80013E67E /* EZAudioUtilities.m in Sources */,
|
||||
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
<?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="scx-fQ-Cxi">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="7706" systemVersion="14E46" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="scx-fQ-Cxi">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7701"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Play File View Controller-->
|
||||
@@ -17,7 +17,7 @@
|
||||
<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="kt3-hw-eFY" customClass="EZAudioPlot">
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kt3-hw-eFY" customClass="EZAudioPlotGL">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Pcc-nf-p5k">
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@
|
||||
/**
|
||||
The CoreGraphics based audio plot
|
||||
*/
|
||||
@property (nonatomic, weak) IBOutlet EZAudioPlot *audioPlot;
|
||||
@property (nonatomic, weak) IBOutlet EZAudioPlotGL *audioPlot;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
+3
-4
@@ -196,10 +196,9 @@
|
||||
__weak typeof (self) weakSelf = self;
|
||||
[self.audioFile getWaveformDataWithCompletionBlock:^(float **waveformData,
|
||||
int length)
|
||||
{
|
||||
[weakSelf.audioPlot updateBuffer:waveformData[0]
|
||||
withBufferSize:length];
|
||||
}];
|
||||
{
|
||||
[weakSelf.audioPlot updateBuffer:waveformData[0] withBufferSize:length];
|
||||
}];
|
||||
|
||||
//
|
||||
// Play the audio file
|
||||
|
||||
-6
@@ -17,7 +17,6 @@
|
||||
667559C51B3B78890013E67E /* EZAudioPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 667559A81B3B78890013E67E /* EZAudioPlayer.m */; };
|
||||
667559C61B3B78890013E67E /* EZAudioPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 667559AA1B3B78890013E67E /* EZAudioPlot.m */; };
|
||||
667559C71B3B78890013E67E /* EZAudioPlotGL.m in Sources */ = {isa = PBXBuildFile; fileRef = 667559AC1B3B78890013E67E /* EZAudioPlotGL.m */; };
|
||||
667559C81B3B78890013E67E /* EZAudioPlotGLKViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 667559AE1B3B78890013E67E /* EZAudioPlotGLKViewController.m */; };
|
||||
667559C91B3B78890013E67E /* EZAudioUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 667559B01B3B78890013E67E /* EZAudioUtilities.m */; };
|
||||
667559CA1B3B78890013E67E /* EZMicrophone.m in Sources */ = {isa = PBXBuildFile; fileRef = 667559B21B3B78890013E67E /* EZMicrophone.m */; };
|
||||
667559CB1B3B78890013E67E /* EZOutput.m in Sources */ = {isa = PBXBuildFile; fileRef = 667559B41B3B78890013E67E /* EZOutput.m */; };
|
||||
@@ -74,8 +73,6 @@
|
||||
667559AA1B3B78890013E67E /* EZAudioPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlot.m; sourceTree = "<group>"; };
|
||||
667559AB1B3B78890013E67E /* EZAudioPlotGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGL.h; sourceTree = "<group>"; };
|
||||
667559AC1B3B78890013E67E /* EZAudioPlotGL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGL.m; sourceTree = "<group>"; };
|
||||
667559AD1B3B78890013E67E /* EZAudioPlotGLKViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGLKViewController.h; sourceTree = "<group>"; };
|
||||
667559AE1B3B78890013E67E /* EZAudioPlotGLKViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGLKViewController.m; sourceTree = "<group>"; };
|
||||
667559AF1B3B78890013E67E /* EZAudioUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioUtilities.h; sourceTree = "<group>"; };
|
||||
667559B01B3B78890013E67E /* EZAudioUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioUtilities.m; sourceTree = "<group>"; };
|
||||
667559B11B3B78890013E67E /* EZMicrophone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZMicrophone.h; sourceTree = "<group>"; };
|
||||
@@ -161,8 +158,6 @@
|
||||
667559AA1B3B78890013E67E /* EZAudioPlot.m */,
|
||||
667559AB1B3B78890013E67E /* EZAudioPlotGL.h */,
|
||||
667559AC1B3B78890013E67E /* EZAudioPlotGL.m */,
|
||||
667559AD1B3B78890013E67E /* EZAudioPlotGLKViewController.h */,
|
||||
667559AE1B3B78890013E67E /* EZAudioPlotGLKViewController.m */,
|
||||
667559AF1B3B78890013E67E /* EZAudioUtilities.h */,
|
||||
667559B01B3B78890013E67E /* EZAudioUtilities.m */,
|
||||
667559B11B3B78890013E67E /* EZMicrophone.h */,
|
||||
@@ -370,7 +365,6 @@
|
||||
667559C51B3B78890013E67E /* EZAudioPlayer.m in Sources */,
|
||||
94057105185E805900EB94BA /* RecordViewController.m in Sources */,
|
||||
667559C71B3B78890013E67E /* EZAudioPlotGL.m in Sources */,
|
||||
667559C81B3B78890013E67E /* EZAudioPlotGLKViewController.m in Sources */,
|
||||
667559C21B3B78890013E67E /* EZAudioFile.m in Sources */,
|
||||
667559CB1B3B78890013E67E /* EZOutput.m in Sources */,
|
||||
667559C91B3B78890013E67E /* EZAudioUtilities.m in Sources */,
|
||||
|
||||
-6
@@ -17,7 +17,6 @@
|
||||
6675598C1B3B78820013E67E /* EZAudioPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 6675596F1B3B78820013E67E /* EZAudioPlayer.m */; };
|
||||
6675598D1B3B78820013E67E /* EZAudioPlot.m in Sources */ = {isa = PBXBuildFile; fileRef = 667559711B3B78820013E67E /* EZAudioPlot.m */; };
|
||||
6675598E1B3B78820013E67E /* EZAudioPlotGL.m in Sources */ = {isa = PBXBuildFile; fileRef = 667559731B3B78820013E67E /* EZAudioPlotGL.m */; };
|
||||
6675598F1B3B78820013E67E /* EZAudioPlotGLKViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 667559751B3B78820013E67E /* EZAudioPlotGLKViewController.m */; };
|
||||
667559901B3B78820013E67E /* EZAudioUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 667559771B3B78820013E67E /* EZAudioUtilities.m */; };
|
||||
667559911B3B78820013E67E /* EZMicrophone.m in Sources */ = {isa = PBXBuildFile; fileRef = 667559791B3B78820013E67E /* EZMicrophone.m */; };
|
||||
667559921B3B78820013E67E /* EZOutput.m in Sources */ = {isa = PBXBuildFile; fileRef = 6675597B1B3B78820013E67E /* EZOutput.m */; };
|
||||
@@ -75,8 +74,6 @@
|
||||
667559711B3B78820013E67E /* EZAudioPlot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlot.m; sourceTree = "<group>"; };
|
||||
667559721B3B78820013E67E /* EZAudioPlotGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGL.h; sourceTree = "<group>"; };
|
||||
667559731B3B78820013E67E /* EZAudioPlotGL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGL.m; sourceTree = "<group>"; };
|
||||
667559741B3B78820013E67E /* EZAudioPlotGLKViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioPlotGLKViewController.h; sourceTree = "<group>"; };
|
||||
667559751B3B78820013E67E /* EZAudioPlotGLKViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioPlotGLKViewController.m; sourceTree = "<group>"; };
|
||||
667559761B3B78820013E67E /* EZAudioUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZAudioUtilities.h; sourceTree = "<group>"; };
|
||||
667559771B3B78820013E67E /* EZAudioUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EZAudioUtilities.m; sourceTree = "<group>"; };
|
||||
667559781B3B78820013E67E /* EZMicrophone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EZMicrophone.h; sourceTree = "<group>"; };
|
||||
@@ -163,8 +160,6 @@
|
||||
667559711B3B78820013E67E /* EZAudioPlot.m */,
|
||||
667559721B3B78820013E67E /* EZAudioPlotGL.h */,
|
||||
667559731B3B78820013E67E /* EZAudioPlotGL.m */,
|
||||
667559741B3B78820013E67E /* EZAudioPlotGLKViewController.h */,
|
||||
667559751B3B78820013E67E /* EZAudioPlotGLKViewController.m */,
|
||||
667559761B3B78820013E67E /* EZAudioUtilities.h */,
|
||||
667559771B3B78820013E67E /* EZAudioUtilities.m */,
|
||||
667559781B3B78820013E67E /* EZMicrophone.h */,
|
||||
@@ -374,7 +369,6 @@
|
||||
6675598C1B3B78820013E67E /* EZAudioPlayer.m in Sources */,
|
||||
9405706E185E69D400EB94BA /* AppDelegate.m in Sources */,
|
||||
6675598E1B3B78820013E67E /* EZAudioPlotGL.m in Sources */,
|
||||
6675598F1B3B78820013E67E /* EZAudioPlotGLKViewController.m in Sources */,
|
||||
667559891B3B78820013E67E /* EZAudioFile.m in Sources */,
|
||||
667559921B3B78820013E67E /* EZOutput.m in Sources */,
|
||||
667559901B3B78820013E67E /* EZAudioUtilities.m in Sources */,
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
#EZAudio
|
||||
A simple, intuitive audio framework for iOS and OSX.
|
||||
|
||||
# Note as of July 2, 2015
|
||||
Over the last week I've been rewriting the core components of EZAudio to be faster and much more flexible. As EZAudio gets closer its 1.0 release the API has changed a little bit for each component and as a result this repo's README for the [Examples](#Examples) and [Core Components](#CoreComponents) are in a deprecated state, but will be updated tomorrow <b>July 3rd, 2015</b>. As of the `0.7.1` release you should be able to use EZAudio and the Amazing Audio Engine by using the `EZAudio/Core` Cocoapod (see [Using EZAudio & The Amazing Audio Engine](#AmazingAudioEngineCocoapod))
|
||||
|
||||
##Features
|
||||

|
||||
|
||||
@@ -38,7 +41,7 @@ An OpenGL-based, GPU-accelerated audio waveform plot capable of visualizing any
|
||||
|
||||
`EZAudio` was designed to work transparently across all iOS and OSX devices. This means one universal API whether you're building for Mac or iOS. For instance, under the hood an `EZAudioPlot` knows that it will subclass a UIView for iOS or an NSView for OSX and the `EZMicrophone` knows to build on top of the RemoteIO AudioUnit for iOS, but defaults to the system defaults for input and output for OSX.
|
||||
|
||||
##Examples & Docs
|
||||
##<a name="Examples">Examples & Docs
|
||||
|
||||
Within this repo you'll find the examples for iOS and OSX to get you up to speed using each component and plugging them into each other. With just a few lines of code you'll be recording from the microphone, generating audio waveforms, and playing audio files like a boss. See the full Getting Started guide for an interactive look into each of components.
|
||||
|
||||
@@ -75,17 +78,16 @@ Shows how to calculate the real-time FFT of the audio data coming from the `EZMi
|
||||

|
||||
|
||||
### Documentation
|
||||
The official documentation for EZAudio can be found here: http://cocoadocs.org/docsets/EZAudio/0.0.5/
|
||||
The official documentation for EZAudio can be found here: http://cocoadocs.org/docsets/EZAudio/0.7.2/
|
||||
<br>You can also generate the docset yourself using appledocs by running the appledocs on the EZAudio source folder.
|
||||
|
||||
##Getting Started
|
||||
##<a name="GettingStarted">Getting Started
|
||||
To begin using `EZAudio` you must first make sure you have the proper build requirements and frameworks. Below you'll find explanations of each component and code snippets to show how to use each to perform common tasks like getting microphone data, updating audio waveform plots, reading/seeking through audio files, and performing playback.
|
||||
|
||||
###Build Requirements
|
||||
**iOS**
|
||||
- 6.0+
|
||||
|
||||
|
||||
**OSX**
|
||||
- 10.8+
|
||||
|
||||
@@ -95,7 +97,6 @@ To begin using `EZAudio` you must first make sure you have the proper build requ
|
||||
- AVFoundation
|
||||
- GLKit
|
||||
|
||||
|
||||
**OSX**
|
||||
- AudioToolbox
|
||||
- AudioUnit
|
||||
@@ -104,16 +105,24 @@ To begin using `EZAudio` you must first make sure you have the proper build requ
|
||||
- OpenGL
|
||||
- GLKit
|
||||
|
||||
###Adding To Project
|
||||
###<a name="AddingToProject">Adding To Project
|
||||
You can add EZAudio to your project in a few ways: <br><br>1.) The easiest way to use EZAudio is via <a href="http://cocoapods.org/", target="_blank">Cocoapods</a>. Simply add EZAudio to your <a href="http://guides.cocoapods.org/using/the-podfile.html", target="_blank">Podfile</a> like so:
|
||||
|
||||
`
|
||||
pod 'EZAudio', '~> 0.5.0'
|
||||
pod 'EZAudio', '~> 0.7.2'
|
||||
`
|
||||
|
||||
####<a name="AmazingAudioEngineCocoapod">Using EZAudio & The Amazing Audio Engine
|
||||
If you're also using the Amazing Audio Engine then use the `EZAudio/Core` subspec like so:
|
||||
|
||||
`
|
||||
pod 'EZAudio/Core', '~> 0.7.2'
|
||||
`
|
||||
|
||||
2.) Alternatively, you could clone or fork this repo and just drag and drop the source into your project.
|
||||
|
||||
##Core Components
|
||||
##<a name="CoreComponents"></a>Core Components
|
||||
|
||||
`EZAudio` currently offers four components that encompass a wide range of audio functionality. In addition to the functional aspects of these components such as pulling audio data, reading/writing from files, and performing playback they also take special care to hook into the interface components to allow developers to display visual feedback (see the Interface Components below).
|
||||
|
||||
###<a name="EZAudioFile"></a>EZAudioFile
|
||||
|
||||
Reference in New Issue
Block a user