diff --git a/.DS_Store b/.DS_Store
new file mode 100644
index 0000000..bdc0566
Binary files /dev/null and b/.DS_Store differ
diff --git a/EZAudio/EZAudio.m b/EZAudio/EZAudio.m
index 03fb8f9..351eac9 100644
--- a/EZAudio/EZAudio.m
+++ b/EZAudio/EZAudio.m
@@ -39,7 +39,7 @@
{
audioBufferList->mBuffers[i].mNumberChannels = channels;
audioBufferList->mBuffers[i].mDataByteSize = channels * outputBufferSize;
- audioBufferList->mBuffers[i].mData = (AudioUnitSampleType*)malloc(channels * sizeof(AudioUnitSampleType) *outputBufferSize);
+ audioBufferList->mBuffers[i].mData = (float*)malloc(channels * sizeof(float) *outputBufferSize);
}
return audioBufferList;
}
@@ -124,7 +124,7 @@
+(AudioStreamBasicDescription)monoFloatFormatWithSampleRate:(float)sampleRate
{
AudioStreamBasicDescription asbd;
- UInt32 byteSize = sizeof(AudioUnitSampleType);
+ UInt32 byteSize = sizeof(float);
asbd.mBitsPerChannel = 8 * byteSize;
asbd.mBytesPerFrame = byteSize;
asbd.mBytesPerPacket = byteSize;
@@ -139,7 +139,7 @@
+(AudioStreamBasicDescription)monoCanonicalFormatWithSampleRate:(float)sampleRate
{
AudioStreamBasicDescription asbd;
- UInt32 byteSize = sizeof(AudioUnitSampleType);
+ UInt32 byteSize = sizeof(float);
asbd.mBitsPerChannel = 8 * byteSize;
asbd.mBytesPerFrame = byteSize;
asbd.mBytesPerPacket = byteSize;
@@ -154,7 +154,7 @@
+(AudioStreamBasicDescription)stereoCanonicalNonInterleavedFormatWithSampleRate:(float)sampleRate
{
AudioStreamBasicDescription asbd;
- UInt32 byteSize = sizeof(AudioUnitSampleType);
+ UInt32 byteSize = sizeof(float);
asbd.mBitsPerChannel = 8 * byteSize;
asbd.mBytesPerFrame = byteSize;
asbd.mBytesPerPacket = byteSize;
@@ -217,7 +217,7 @@
asbd->mFormatID = kAudioFormatLinearPCM;
#if TARGET_OS_IPHONE
- int sampleSize = sizeof(AudioSampleType);
+ int sampleSize = sizeof(float);
asbd->mFormatFlags = kAudioFormatFlagsCanonical;
#elif TARGET_OS_MAC
int sampleSize = sizeof(Float32);
diff --git a/EZAudio/EZAudioFile.m b/EZAudio/EZAudioFile.m
index d3a03fa..2e0e75f 100644
--- a/EZAudio/EZAudioFile.m
+++ b/EZAudio/EZAudioFile.m
@@ -168,7 +168,7 @@
&frames,
audioBufferList)
operation:"Failed to read audio data from audio file"];
- *bufferSize = audioBufferList->mBuffers[0].mDataByteSize/sizeof(AudioUnitSampleType);
+ *bufferSize = audioBufferList->mBuffers[0].mDataByteSize/sizeof(float);
*eof = frames == 0;
_frameIndex += frames;
if( self.audioFileDelegate ){
@@ -236,7 +236,7 @@
&_waveformFrameRate,
bufferList)
operation:"Failed to read audio data from audio file"];
- bufferSize = bufferList->mBuffers[0].mDataByteSize/sizeof(AudioUnitSampleType);
+ bufferSize = bufferList->mBuffers[0].mDataByteSize/sizeof(float);
bufferSize = MAX(1, bufferSize);
eof = _waveformFrameRate == 0;
_frameIndex += _waveformFrameRate;
diff --git a/EZAudio/EZAudioPlot.m b/EZAudio/EZAudioPlot.m
index 2f17363..a1c4b9d 100644
--- a/EZAudio/EZAudioPlot.m
+++ b/EZAudio/EZAudioPlot.m
@@ -211,7 +211,7 @@
if(plotLength > 0) {
-// plotData[plotLength-1] = CGPointMake(plotLength-1,0.0f);
+ plotData[plotLength-1] = CGPointMake(plotLength-1,0.0f);
CGMutablePathRef halfPath = CGPathCreateMutable();
CGPathAddLines(halfPath,
diff --git a/EZAudio/EZAudioPlotGLKViewController.m b/EZAudio/EZAudioPlotGLKViewController.m
index 57c9f3a..c7500ca 100644
--- a/EZAudio/EZAudioPlotGLKViewController.m
+++ b/EZAudio/EZAudioPlotGLKViewController.m
@@ -390,18 +390,18 @@
glVertexAttribPointer(GLKVertexAttribPosition, 2, GL_FLOAT, GL_FALSE, sizeof(EZAudioPlotGLPoint), NULL);
// Normal plot
- glPushMatrix();
+
self.baseEffect.transform.modelviewMatrix = GLKMatrix4MakeXRotation(0);
glDrawArrays(_drawingType, 0, _bufferPlotGraphSize);
- glPopMatrix();
+
if( self.shouldMirror ){
// Mirrored plot
[self.baseEffect prepareToDraw];
- glPushMatrix();
+
self.baseEffect.transform.modelviewMatrix = GLKMatrix4MakeXRotation(M_PI);
glDrawArrays(_drawingType, 0, _bufferPlotGraphSize);
- glPopMatrix();
+
}
@@ -419,18 +419,18 @@
glVertexAttribPointer(GLKVertexAttribPosition, 2, GL_FLOAT, GL_FALSE, sizeof(EZAudioPlotGLPoint), NULL);
// Normal plot
- glPushMatrix();
+
self.baseEffect.transform.modelviewMatrix = GLKMatrix4MakeXRotation(0);
glDrawArrays(_drawingType, 0, _rollingPlotGraphSize);
- glPopMatrix();
+
if( self.shouldMirror ){
// Mirrored plot
[self.baseEffect prepareToDraw];
- glPushMatrix();
+
self.baseEffect.transform.modelviewMatrix = GLKMatrix4MakeXRotation(3.14159265359);
glDrawArrays(_drawingType, 0, _rollingPlotGraphSize);
- glPopMatrix();
+
}
glBindBuffer(GL_ARRAY_BUFFER,0);
diff --git a/EZAudio/EZOutput.m b/EZAudio/EZOutput.m
index 7f8c16b..ca8043b 100644
--- a/EZAudio/EZOutput.m
+++ b/EZAudio/EZOutput.m
@@ -61,8 +61,8 @@ static OSStatus OutputRenderCallback(void *inRefCon,
TPCircularBuffer *circularBuffer = [output.outputDataSource outputShouldUseCircularBuffer:output];
if( !circularBuffer ){
- AudioUnitSampleType *left = (AudioUnitSampleType*)ioData->mBuffers[0].mData;
- AudioUnitSampleType *right = (AudioUnitSampleType*)ioData->mBuffers[1].mData;
+ float *left = (float*)ioData->mBuffers[0].mData;
+ float *right = (float*)ioData->mBuffers[1].mData;
for(int i = 0; i < inNumberFrames; i++ ){
left[ i ] = 0.0f;
right[ i ] = 0.0f;
@@ -76,12 +76,12 @@ static OSStatus OutputRenderCallback(void *inRefCon,
// Get the desired amount of bytes to copy
int32_t bytesToCopy = ioData->mBuffers[0].mDataByteSize;
- AudioSampleType *left = (AudioSampleType*)ioData->mBuffers[0].mData;
- AudioSampleType *right = (AudioSampleType*)ioData->mBuffers[1].mData;
+ float *left = (float*)ioData->mBuffers[0].mData;
+ float *right = (float*)ioData->mBuffers[1].mData;
// Get the available bytes in the circular buffer
int32_t availableBytes;
- AudioSampleType *buffer = TPCircularBufferTail(circularBuffer,&availableBytes);
+ float *buffer = TPCircularBufferTail(circularBuffer,&availableBytes);
// Ideally we'd have all the bytes to be copied, but compare it against the available bytes (get min)
int32_t amount = MIN(bytesToCopy,availableBytes);
diff --git a/EZAudioExamples/.DS_Store b/EZAudioExamples/.DS_Store
new file mode 100644
index 0000000..8b5e26b
Binary files /dev/null and b/EZAudioExamples/.DS_Store differ
diff --git a/EZAudioExamples/OSX/.DS_Store b/EZAudioExamples/OSX/.DS_Store
index 88d0f2a..5a63f8f 100644
Binary files a/EZAudioExamples/OSX/.DS_Store and b/EZAudioExamples/OSX/.DS_Store differ
diff --git a/EZAudioExamples/OSX/EZAudioExamplesOSX.xcworkspace/xcuserdata/haris.xcuserdatad/UserInterfaceState.xcuserstate b/EZAudioExamples/OSX/EZAudioExamplesOSX.xcworkspace/xcuserdata/haris.xcuserdatad/UserInterfaceState.xcuserstate
index 32c55ad..a8a9093 100644
Binary files a/EZAudioExamples/OSX/EZAudioExamplesOSX.xcworkspace/xcuserdata/haris.xcuserdatad/UserInterfaceState.xcuserstate and b/EZAudioExamples/OSX/EZAudioExamplesOSX.xcworkspace/xcuserdata/haris.xcuserdatad/UserInterfaceState.xcuserstate differ
diff --git a/EZAudioExamples/OSX/EZAudioOpenGLWaveformExample/EZAudioOpenGLWaveformExample/AppDelegate.m b/EZAudioExamples/OSX/EZAudioOpenGLWaveformExample/EZAudioOpenGLWaveformExample/AppDelegate.m
index acdc118..b1bcda0 100644
--- a/EZAudioExamples/OSX/EZAudioOpenGLWaveformExample/EZAudioOpenGLWaveformExample/AppDelegate.m
+++ b/EZAudioExamples/OSX/EZAudioOpenGLWaveformExample/EZAudioOpenGLWaveformExample/AppDelegate.m
@@ -30,7 +30,6 @@
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
-
// Swap in our view controller in the window's content view
self.openGLWaveformViewController = [[OpenGLWaveformViewController alloc] init];
// Resize view controller to content view's current size
diff --git a/EZAudioExamples/OSX/EZAudioOpenGLWaveformExample/EZAudioOpenGLWaveformExample/OpenGLWaveformViewController.xib b/EZAudioExamples/OSX/EZAudioOpenGLWaveformExample/EZAudioOpenGLWaveformExample/OpenGLWaveformViewController.xib
index 9c79aec..4fb4c37 100644
--- a/EZAudioExamples/OSX/EZAudioOpenGLWaveformExample/EZAudioOpenGLWaveformExample/OpenGLWaveformViewController.xib
+++ b/EZAudioExamples/OSX/EZAudioOpenGLWaveformExample/EZAudioOpenGLWaveformExample/OpenGLWaveformViewController.xib
@@ -1,8 +1,8 @@
-
+
-
+
@@ -12,18 +12,16 @@
-
+
-
-
-
+
@@ -66,4 +63,4 @@
-
\ No newline at end of file
+
diff --git a/EZAudioExamples/OSX/EZAudioPlayFileExample/.DS_Store b/EZAudioExamples/OSX/EZAudioPlayFileExample/.DS_Store
new file mode 100644
index 0000000..068f467
Binary files /dev/null and b/EZAudioExamples/OSX/EZAudioPlayFileExample/.DS_Store differ
diff --git a/EZAudioExamples/iOS/.DS_Store b/EZAudioExamples/iOS/.DS_Store
index b1f73f8..2504b97 100644
Binary files a/EZAudioExamples/iOS/.DS_Store and b/EZAudioExamples/iOS/.DS_Store differ
diff --git a/EZAudioExamples/iOS/EZAudioExamplesiOS.xcworkspace/xcuserdata/haris.xcuserdatad/UserInterfaceState.xcuserstate b/EZAudioExamples/iOS/EZAudioExamplesiOS.xcworkspace/xcuserdata/haris.xcuserdatad/UserInterfaceState.xcuserstate
index 4e3136b..d3d609d 100644
Binary files a/EZAudioExamples/iOS/EZAudioExamplesiOS.xcworkspace/xcuserdata/haris.xcuserdatad/UserInterfaceState.xcuserstate and b/EZAudioExamples/iOS/EZAudioExamplesiOS.xcworkspace/xcuserdata/haris.xcuserdatad/UserInterfaceState.xcuserstate differ
diff --git a/EZAudioExamples/iOS/EZAudioFFTExample/EZAudioFFTExample/Base.lproj/Main_iPhone.storyboard b/EZAudioExamples/iOS/EZAudioFFTExample/EZAudioFFTExample/Base.lproj/Main_iPhone.storyboard
index 616f9b6..a21407a 100644
--- a/EZAudioExamples/iOS/EZAudioFFTExample/EZAudioFFTExample/Base.lproj/Main_iPhone.storyboard
+++ b/EZAudioExamples/iOS/EZAudioFFTExample/EZAudioFFTExample/Base.lproj/Main_iPhone.storyboard
@@ -1,7 +1,8 @@
-
+
-
+
+
@@ -18,30 +19,23 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -56,6 +50,9 @@
-
+
+
+
+
-
\ No newline at end of file
+
diff --git a/EZAudioExamples/iOS/EZAudioPlayFileExample/.DS_Store b/EZAudioExamples/iOS/EZAudioPlayFileExample/.DS_Store
new file mode 100644
index 0000000..59b9a8b
Binary files /dev/null and b/EZAudioExamples/iOS/EZAudioPlayFileExample/.DS_Store differ
diff --git a/EZAudioExamples/iOS/EZAudioPlayFileExample/EZAudioPlayFileExample/Base.lproj/Main_iPad.storyboard b/EZAudioExamples/iOS/EZAudioPlayFileExample/EZAudioPlayFileExample/Base.lproj/Main_iPad.storyboard
index c6fb4b6..c9f9522 100644
--- a/EZAudioExamples/iOS/EZAudioPlayFileExample/EZAudioPlayFileExample/Base.lproj/Main_iPad.storyboard
+++ b/EZAudioExamples/iOS/EZAudioPlayFileExample/EZAudioPlayFileExample/Base.lproj/Main_iPad.storyboard
@@ -1,7 +1,7 @@
-
+
-
+
@@ -48,7 +48,7 @@
-
+
@@ -95,4 +95,4 @@
-
\ No newline at end of file
+
diff --git a/EZAudioExamples/iOS/EZAudioPlayFileExample/EZAudioPlayFileExample/Base.lproj/Main_iPhone.storyboard b/EZAudioExamples/iOS/EZAudioPlayFileExample/EZAudioPlayFileExample/Base.lproj/Main_iPhone.storyboard
index 57c32d8..66ddbf5 100644
--- a/EZAudioExamples/iOS/EZAudioPlayFileExample/EZAudioPlayFileExample/Base.lproj/Main_iPhone.storyboard
+++ b/EZAudioExamples/iOS/EZAudioPlayFileExample/EZAudioPlayFileExample/Base.lproj/Main_iPhone.storyboard
@@ -1,7 +1,7 @@
-
+
-
+
@@ -48,7 +48,7 @@
-
+
@@ -95,4 +95,4 @@
-
\ No newline at end of file
+
diff --git a/EZAudioExamples/iOS/EZAudioPlayFileExample/EZAudioPlayFileExample/PlayFileViewController.h b/EZAudioExamples/iOS/EZAudioPlayFileExample/EZAudioPlayFileExample/PlayFileViewController.h
index cc661a5..f87ad47 100644
--- a/EZAudioExamples/iOS/EZAudioPlayFileExample/EZAudioPlayFileExample/PlayFileViewController.h
+++ b/EZAudioExamples/iOS/EZAudioPlayFileExample/EZAudioPlayFileExample/PlayFileViewController.h
@@ -15,6 +15,7 @@
Here's the default audio file included with the example
*/
#define kAudioFileDefault [[NSBundle mainBundle] pathForResource:@"simple-drum-beat" ofType:@"wav"]
+//#define kAudioFileDefault [[NSBundle mainBundle] pathForResource:@"Röyksopp - Röyksopp Forever" ofType:@"mp3"]
/**
Using the EZOutputDataSource to provide output data to the EZOutput component.
diff --git a/EZAudioExamples/iOS/EZAudioRecordExample/.DS_Store b/EZAudioExamples/iOS/EZAudioRecordExample/.DS_Store
new file mode 100644
index 0000000..c08cf12
Binary files /dev/null and b/EZAudioExamples/iOS/EZAudioRecordExample/.DS_Store differ