├── .gitignore ├── .travis.yml ├── License.txt ├── README.markdown ├── TAAESample.xcodeproj ├── project.pbxproj └── xcshareddata │ └── xcschemes │ └── TAAESample.xcscheme ├── TAAESample ├── Audio │ ├── amen.m4a │ ├── bass.m4a │ ├── piano.m4a │ ├── sample1.m4a │ ├── sample2.m4a │ └── sweep.m4a ├── Classes │ ├── AEAudioController.h │ └── AEAudioController.m ├── Common Assets.xcassets │ ├── Active One Shot.imageset │ │ ├── Active One Shot.png │ │ ├── Active One Shot@2x.png │ │ ├── Active One Shot@3x.png │ │ └── Contents.json │ ├── Bass.imageset │ │ ├── Bass.png │ │ ├── Bass@2x.png │ │ ├── Bass@3x.png │ │ └── Contents.json │ ├── Beat.imageset │ │ ├── Beat.png │ │ ├── Beat@2x.png │ │ ├── Beat@3x.png │ │ └── Contents.json │ ├── Contents.json │ ├── Effect Bar.imageset │ │ ├── Contents.json │ │ ├── Effect Bar.png │ │ ├── Effect Bar@2x.png │ │ └── Effect Bar@3x.png │ ├── Export.imageset │ │ ├── Contents.json │ │ ├── Export.png │ │ ├── Export@2x.png │ │ └── Export@3x.png │ ├── Heart (Small).imageset │ │ ├── Contents.json │ │ ├── Heart (Small).png │ │ ├── Heart (Small)@2x.png │ │ └── Heart (Small)@3x.png │ ├── Heart.imageset │ │ ├── Contents.json │ │ ├── Heart.png │ │ ├── Heart@2x.png │ │ └── Heart@3x.png │ ├── Hit.imageset │ │ ├── Contents.json │ │ ├── Hit.png │ │ ├── Hit@2x.png │ │ └── Hit@3x.png │ ├── Icon.imageset │ │ ├── Contents.json │ │ ├── Icon.png │ │ ├── Icon@2x.png │ │ └── Icon@3x.png │ ├── Lower Background.imageset │ │ ├── Contents.json │ │ ├── Lower Background.png │ │ ├── Lower Background@2x.png │ │ └── Lower Background@3x.png │ ├── Mic, On.imageset │ │ ├── Contents.json │ │ ├── Mic, On.png │ │ ├── Mic, On@2x.png │ │ └── Mic, On@3x.png │ ├── Mic.imageset │ │ ├── Contents.json │ │ ├── Mic.png │ │ ├── Mic@2x.png │ │ └── Mic@3x.png │ ├── One Shot.imageset │ │ ├── Contents.json │ │ ├── One Shot.png │ │ ├── One Shot@2x.png │ │ └── One Shot@3x.png │ ├── Piano.imageset │ │ ├── Contents.json │ │ ├── Piano.png │ │ ├── Piano@2x.png │ │ └── Piano@3x.png │ ├── Play Slider Thumb.imageset │ │ ├── Contents.json │ │ ├── Play Slider Thumb.png │ │ ├── Play Slider Thumb@2x.png │ │ └── Play Slider Thumb@3x.png │ ├── Play Slider Track.imageset │ │ ├── Contents.json │ │ ├── Play Slider Track.png │ │ ├── Play Slider Track@2x.png │ │ └── Play Slider Track@3x.png │ ├── Play.imageset │ │ ├── Contents.json │ │ ├── Play.png │ │ ├── Play@2x.png │ │ └── Play@3x.png │ ├── Record, On.imageset │ │ ├── Contents.json │ │ ├── Record, On.png │ │ ├── Record, On@2x.png │ │ └── Record, On@3x.png │ ├── Record.imageset │ │ ├── Contents.json │ │ ├── Record.png │ │ ├── Record@2x.png │ │ └── Record@3x.png │ ├── Rocket.imageset │ │ ├── Contents.json │ │ ├── Rocket.png │ │ ├── Rocket@2x.png │ │ └── Rocket@3x.png │ ├── Smiley.imageset │ │ ├── Contents.json │ │ ├── Smiley.png │ │ ├── Smiley@2x.png │ │ └── Smiley@3x.png │ ├── Speed Handle.imageset │ │ ├── Contents.json │ │ ├── Speed Handle.png │ │ ├── Speed Handle@2x.png │ │ └── Speed Handle@3x.png │ ├── Speed Track.imageset │ │ ├── Contents.json │ │ ├── Speed Track.png │ │ ├── Speed Track@2x.png │ │ └── Speed Track@3x.png │ ├── Stereo Sweep.imageset │ │ ├── Contents.json │ │ ├── Stereo Sweep.png │ │ ├── Stereo Sweep@2x.png │ │ └── Stereo Sweep@3x.png │ ├── Stop.imageset │ │ ├── Contents.json │ │ ├── Stop.png │ │ ├── Stop@2x.png │ │ └── Stop@3x.png │ ├── Upper Background.imageset │ │ ├── Contents.json │ │ ├── Upper Background.png │ │ ├── Upper Background@2x.png │ │ └── Upper Background@3x.png │ └── Vinyl Highlight and Shadow.imageset │ │ ├── Contents.json │ │ ├── Vinyl Highlight and Shadow.png │ │ ├── Vinyl Highlight and Shadow@2x.png │ │ └── Vinyl Highlight and Shadow@3x.png ├── Platform │ ├── iOS │ │ ├── Classes │ │ │ ├── AppDelegate.swift │ │ │ ├── PlayerButton.swift │ │ │ ├── TriggerGestureRecognizer.swift │ │ │ └── ViewController.swift │ │ └── Support │ │ │ ├── Base.lproj │ │ │ ├── LaunchScreen.storyboard │ │ │ └── Main.storyboard │ │ │ ├── Info.plist │ │ │ └── iOS Assets.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon-120.png │ │ │ ├── Icon-152.png │ │ │ ├── Icon-167.png │ │ │ ├── Icon-180.png │ │ │ └── Icon-76.png │ │ │ └── Contents.json │ └── macOS │ │ ├── Classes │ │ ├── AppDelegate.swift │ │ └── ViewController.swift │ │ └── Support │ │ ├── Base.lproj │ │ └── Main.storyboard │ │ ├── Info.plist │ │ └── macOS Assets.xcassets │ │ └── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-1024.png │ │ ├── Icon-128.png │ │ ├── Icon-16.png │ │ ├── Icon-256.png │ │ ├── Icon-257.png │ │ ├── Icon-32.png │ │ ├── Icon-33.png │ │ ├── Icon-512.png │ │ ├── Icon-513.png │ │ └── Icon-64.png └── TAAESample-Bridging-Header.h ├── Tests ├── AEArrayTests.m ├── AEAudioBufferListUtilitiesTests.m ├── AEAudioFileReadWriteTests.m ├── AEBufferStackTests.m ├── AECrossThreadMessagingTests.m ├── AEDSPUtilitiesTests.m ├── AEManagedValueTests.m ├── AENewTimePitchModuleTests.m ├── AESampleRateConverterTests.m └── Info.plist ├── TheAmazingAudioEngine.xcodeproj ├── project.pbxproj └── xcshareddata │ └── xcschemes │ ├── TheAmazingAudioEngine OS X.xcscheme │ ├── TheAmazingAudioEngine tvOS.xcscheme │ └── TheAmazingAudioEngine.xcscheme ├── TheAmazingAudioEngine.xcworkspace └── contents.xcworkspacedata └── TheAmazingAudioEngine ├── Core ├── AEArray.h ├── AEArray.m ├── AEBufferStack.h ├── AEBufferStack.m ├── AEManagedValue.h ├── AEManagedValue.m ├── AERenderContext.h ├── AERenderContext.m ├── AETime.h ├── AETime.m ├── AETypes.h └── AETypes.m ├── Library └── TPCircularBuffer │ ├── README.markdown │ ├── TPCircularBuffer+AudioBufferList.c │ ├── TPCircularBuffer+AudioBufferList.h │ ├── TPCircularBuffer+MultiProducer.c │ ├── TPCircularBuffer+MultiProducer.h │ ├── TPCircularBuffer.c │ └── TPCircularBuffer.h ├── Modules ├── AEAudioUnitModule.h ├── AEAudioUnitModule.m ├── AEBlockModule.h ├── AEBlockModule.m ├── AEModule.h ├── AEModule.m ├── AESubrendererModule.h ├── AESubrendererModule.m ├── Generation │ ├── AEAudioFilePlayerModule.h │ ├── AEAudioFilePlayerModule.m │ ├── AEAudioUnitInputModule.h │ ├── AEAudioUnitInputModule.m │ ├── AEAudiobusInputModule.h │ ├── AEAudiobusInputModule.m │ ├── AEMixerModule.h │ ├── AEMixerModule.m │ ├── AEOscillatorModule.h │ ├── AEOscillatorModule.m │ ├── AESplitterModule.h │ └── AESplitterModule.m ├── Processing │ ├── AEBandpassModule.h │ ├── AEBandpassModule.m │ ├── AEDelayModule.h │ ├── AEDelayModule.m │ ├── AEDistortionModule.h │ ├── AEDistortionModule.m │ ├── AEDynamicsProcessorModule.h │ ├── AEDynamicsProcessorModule.m │ ├── AEHighPassModule.h │ ├── AEHighPassModule.m │ ├── AEHighShelfModule.h │ ├── AEHighShelfModule.m │ ├── AELowPassModule.h │ ├── AELowPassModule.m │ ├── AELowShelfModule.h │ ├── AELowShelfModule.m │ ├── AENewTimePitchModule.h │ ├── AENewTimePitchModule.m │ ├── AEParametricEqModule.h │ ├── AEParametricEqModule.m │ ├── AEPeakLimiterModule.h │ ├── AEPeakLimiterModule.m │ ├── AEReverbModule.h │ ├── AEReverbModule.m │ ├── AESampleRateConverter.h │ ├── AESampleRateConverter.m │ ├── AEVarispeedModule.h │ └── AEVarispeedModule.m └── Taps │ ├── AEAudioFileRecorderModule.h │ └── AEAudioFileRecorderModule.m ├── Outputs ├── AEAudioFileOutput.h ├── AEAudioFileOutput.m ├── AEAudioUnitOutput.h └── AEAudioUnitOutput.m ├── Renderers ├── AERenderer.h └── AERenderer.m ├── TheAmazingAudioEngine.h └── Utilities ├── AEAudioBufferListUtilities.h ├── AEAudioBufferListUtilities.m ├── AEAudioDevice.h ├── AEAudioDevice.m ├── AEAudioFileReader.h ├── AEAudioFileReader.m ├── AEAudioPasteboard.h ├── AEAudioPasteboard.m ├── AEAudioThreadEndpoint.h ├── AEAudioThreadEndpoint.m ├── AECircularBuffer.h ├── AECircularBuffer.m ├── AEDSPUtilities.h ├── AEDSPUtilities.m ├── AEIOAudioUnit.h ├── AEIOAudioUnit.m ├── AELevelsAnalyzer.h ├── AELevelsAnalyzer.m ├── AEMainThreadEndpoint.h ├── AEMainThreadEndpoint.m ├── AEMessageQueue.h ├── AEMessageQueue.m ├── AERealtimeWatchdog-arm64.s ├── AERealtimeWatchdog-simulator-x86_64.s ├── AERealtimeWatchdog.h ├── AERealtimeWatchdog.m ├── AEUtilities.h ├── AEUtilities.m ├── AEWeakRetainingProxy.h └── AEWeakRetainingProxy.m /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | xcuserdata 3 | project.xcworkspace 4 | build 5 | .git 6 | TheAmazingAudioEngine.xcscmblueprint 7 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: objective-c 2 | osx_image: xcode7.3 3 | xcode_project: TheAmazingAudioEngine.xcodeproj 4 | xcode_scheme: TheAmazingAudioEngine 5 | xcode_sdk: iphonesimulator9.3 6 | -------------------------------------------------------------------------------- /License.txt: -------------------------------------------------------------------------------- 1 | The Amazing Audio Engine Library License 2 | ---------------------------------------- 3 | 4 | Copyright (C) 2012-2016 A Tasty Pixel 5 | 6 | This software is provided 'as-is', without any express or implied 7 | warranty. In no event will the authors be held liable for any damages 8 | arising from the use of this software. 9 | 10 | Permission is granted to anyone to use this software for any purpose, 11 | including commercial applications, and to alter it and redistribute it 12 | freely, subject to the following restrictions: 13 | 14 | 1. The origin of this software must not be misrepresented; you must not 15 | claim that you wrote the original software. If you use this software 16 | in a product, an acknowledgment in the product documentation would be 17 | appreciated but is not required. 18 | 19 | 2. Altered source versions must be plainly marked as such, and must not be 20 | misrepresented as being the original software. 21 | 22 | 3. This notice may not be removed or altered from any source distribution. 23 | 24 | 25 | The Amazing Audio Engine Sample Code (TAAESample) License 26 | --------------------------------------------------------- 27 | 28 | Strictly for educational purposes only. No part of TAAESample is to be distributed 29 | in any form other than as source code within the TAAE2 repository. 30 | -------------------------------------------------------------------------------- /README.markdown: -------------------------------------------------------------------------------- 1 | **Important Notice: The Amazing Audio Engine has been retired. [See the announcement here](http://theamazingaudioengine.com/retirement/)** 2 | 3 | The Amazing Audio Engine 4 | ======================== 5 | 6 | The Amazing Audio Engine is a sophisticated framework for iOS audio applications, built so you don't have to. 7 | 8 | It is designed to be very easy to work with, and handles all of the intricacies of iOS audio on your behalf. 9 | 10 | Built upon the efficient and low-latency Core Audio Remote IO system, The Amazing Audio Engine lets you get to work on making your app great instead of reinventing the wheel. 11 | 12 | See https://youtu.be/OZQT4IGS8mA for introductory video. 13 | 14 | See http://theamazingaudioengine.com for details and http://theamazingaudioengine.com/doc2 for documentation. 15 | 16 | TAAE was written by developer of [Audiobus](http://audiob.us) and [Loopy](http://loopyapp.com) Michael Tyson, in consultation with Jonatan Liljedahl, developer of [AUM](http://kymatica.com/Software/AUM) and [AudioShare](http://kymatica.com/Software/AudioShare). 17 | 18 | The Amazing Audio Engine Library License 19 | ---------------------------------------- 20 | 21 | Copyright (C) 2012-2016 A Tasty Pixel 22 | 23 | This software is provided 'as-is', without any express or implied 24 | warranty. In no event will the authors be held liable for any damages 25 | arising from the use of this software. 26 | 27 | Permission is granted to anyone to use this software for any purpose, 28 | including commercial applications, and to alter it and redistribute it 29 | freely, subject to the following restrictions: 30 | 31 | 1. The origin of this software must not be misrepresented; you must not 32 | claim that you wrote the original software. If you use this software 33 | in a product, an acknowledgment in the product documentation would be 34 | appreciated but is not required. 35 | 36 | 2. Altered source versions must be plainly marked as such, and must not be 37 | misrepresented as being the original software. 38 | 39 | 3. This notice may not be removed or altered from any source distribution. 40 | 41 | 42 | The Amazing Audio Engine Sample Code (TAAESample) License 43 | --------------------------------------------------------- 44 | 45 | Strictly for educational purposes only. No part of TAAESample is to be distributed 46 | in any form other than as source code within the TAAE2 repository. 47 | 48 | -------------------------------------------------------------------------------- /TAAESample.xcodeproj/xcshareddata/xcschemes/TAAESample.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /TAAESample/Audio/amen.m4a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Audio/amen.m4a -------------------------------------------------------------------------------- /TAAESample/Audio/bass.m4a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Audio/bass.m4a -------------------------------------------------------------------------------- /TAAESample/Audio/piano.m4a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Audio/piano.m4a -------------------------------------------------------------------------------- /TAAESample/Audio/sample1.m4a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Audio/sample1.m4a -------------------------------------------------------------------------------- /TAAESample/Audio/sample2.m4a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Audio/sample2.m4a -------------------------------------------------------------------------------- /TAAESample/Audio/sweep.m4a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Audio/sweep.m4a -------------------------------------------------------------------------------- /TAAESample/Classes/AEAudioController.h: -------------------------------------------------------------------------------- 1 | // 2 | // AEAudioController.h 3 | // TAAESample 4 | // 5 | // Created by Michael Tyson on 24/03/2016. 6 | // Copyright © 2016 A Tasty Pixel. All rights reserved. 7 | // 8 | // Strictly for educational purposes only. No part of TAAESample is to be distributed 9 | // in any form other than as source code within the TAAE2 repository. 10 | 11 | #import 12 | #import 13 | 14 | extern NSString * _Nonnull const AEAudioControllerInputEnabledChangedNotification; 15 | extern NSString * _Nonnull const AEAudioControllerInputPermissionErrorNotification; 16 | 17 | @interface AEAudioController : NSObject 18 | - (BOOL)start:(NSError * _Nullable * _Nullable)error; 19 | - (void)stop; 20 | 21 | - (BOOL)beginRecordingAtTime:(AEHostTicks)time error:(NSError * _Nullable * _Nullable)error; 22 | - (void)stopRecordingAtTime:(AEHostTicks)time completionBlock:(void(^ _Nullable)())block; 23 | 24 | - (void)playRecordingWithCompletionBlock:(void(^ _Nullable)())block; 25 | - (void)stopPlayingRecording; 26 | 27 | - (AEHostTicks)nextSyncTimeForPlayer:(AEAudioFilePlayerModule * _Nonnull)player; 28 | 29 | @property (nonatomic, strong, readonly) AEVarispeedModule * _Nonnull varispeed; 30 | @property (nonatomic, strong, readonly) AEAudioFilePlayerModule * _Nonnull drums; 31 | @property (nonatomic, strong, readonly) AEAudioFilePlayerModule * _Nonnull bass; 32 | @property (nonatomic, strong, readonly) AEAudioFilePlayerModule * _Nonnull piano; 33 | @property (nonatomic, strong, readonly) AEAudioFilePlayerModule * _Nonnull sample1; 34 | @property (nonatomic, strong, readonly) AEAudioFilePlayerModule * _Nonnull sample2; 35 | @property (nonatomic, strong, readonly) AEAudioFilePlayerModule * _Nonnull sample3; 36 | @property (nonatomic, strong, readonly) AEAudioFilePlayerModule * _Nonnull sweep; 37 | @property (nonatomic, strong, readonly) AEAudioFilePlayerModule * _Nonnull hit; 38 | @property (nonatomic) double bandpassCenterFrequency; 39 | @property (nonatomic) double bandpassWetDry; 40 | @property (nonatomic) double balanceSweepRate; 41 | @property (nonatomic, readonly) BOOL recording; 42 | @property (nonatomic, readonly) NSString * _Nonnull recordingPath; 43 | @property (nonatomic, readonly) BOOL playingRecording; 44 | @property (nonatomic) double recordingPlaybackPosition; 45 | @property (nonatomic) BOOL inputEnabled; 46 | @end 47 | -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Active One Shot.imageset/Active One Shot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Active One Shot.imageset/Active One Shot.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Active One Shot.imageset/Active One Shot@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Active One Shot.imageset/Active One Shot@2x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Active One Shot.imageset/Active One Shot@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Active One Shot.imageset/Active One Shot@3x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Active One Shot.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Active One Shot.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Active One Shot@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Active One Shot@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Bass.imageset/Bass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Bass.imageset/Bass.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Bass.imageset/Bass@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Bass.imageset/Bass@2x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Bass.imageset/Bass@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Bass.imageset/Bass@3x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Bass.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Bass.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Bass@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Bass@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Beat.imageset/Beat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Beat.imageset/Beat.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Beat.imageset/Beat@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Beat.imageset/Beat@2x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Beat.imageset/Beat@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Beat.imageset/Beat@3x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Beat.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Beat.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Beat@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Beat@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Effect Bar.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Effect Bar.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Effect Bar@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Effect Bar@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Effect Bar.imageset/Effect Bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Effect Bar.imageset/Effect Bar.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Effect Bar.imageset/Effect Bar@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Effect Bar.imageset/Effect Bar@2x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Effect Bar.imageset/Effect Bar@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Effect Bar.imageset/Effect Bar@3x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Export.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Export.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Export@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Export@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Export.imageset/Export.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Export.imageset/Export.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Export.imageset/Export@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Export.imageset/Export@2x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Export.imageset/Export@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Export.imageset/Export@3x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Heart (Small).imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Heart (Small).png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Heart (Small)@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Heart (Small)@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Heart (Small).imageset/Heart (Small).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Heart (Small).imageset/Heart (Small).png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Heart (Small).imageset/Heart (Small)@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Heart (Small).imageset/Heart (Small)@2x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Heart (Small).imageset/Heart (Small)@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Heart (Small).imageset/Heart (Small)@3x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Heart.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Heart.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Heart@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Heart@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Heart.imageset/Heart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Heart.imageset/Heart.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Heart.imageset/Heart@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Heart.imageset/Heart@2x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Heart.imageset/Heart@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Heart.imageset/Heart@3x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Hit.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Hit.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Hit@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Hit@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Hit.imageset/Hit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Hit.imageset/Hit.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Hit.imageset/Hit@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Hit.imageset/Hit@2x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Hit.imageset/Hit@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Hit.imageset/Hit@3x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Icon.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Icon@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Icon@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Icon.imageset/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Icon.imageset/Icon.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Icon.imageset/Icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Icon.imageset/Icon@2x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Icon.imageset/Icon@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Icon.imageset/Icon@3x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Lower Background.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Lower Background.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Lower Background@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Lower Background@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Lower Background.imageset/Lower Background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Lower Background.imageset/Lower Background.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Lower Background.imageset/Lower Background@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Lower Background.imageset/Lower Background@2x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Lower Background.imageset/Lower Background@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Lower Background.imageset/Lower Background@3x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Mic, On.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Mic, On.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Mic, On@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Mic, On@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Mic, On.imageset/Mic, On.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Mic, On.imageset/Mic, On.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Mic, On.imageset/Mic, On@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Mic, On.imageset/Mic, On@2x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Mic, On.imageset/Mic, On@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Mic, On.imageset/Mic, On@3x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Mic.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Mic.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Mic@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Mic@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Mic.imageset/Mic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Mic.imageset/Mic.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Mic.imageset/Mic@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Mic.imageset/Mic@2x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Mic.imageset/Mic@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Mic.imageset/Mic@3x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/One Shot.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "One Shot.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "One Shot@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "One Shot@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/One Shot.imageset/One Shot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/One Shot.imageset/One Shot.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/One Shot.imageset/One Shot@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/One Shot.imageset/One Shot@2x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/One Shot.imageset/One Shot@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/One Shot.imageset/One Shot@3x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Piano.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Piano.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Piano@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Piano@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Piano.imageset/Piano.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Piano.imageset/Piano.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Piano.imageset/Piano@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Piano.imageset/Piano@2x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Piano.imageset/Piano@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Piano.imageset/Piano@3x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Play Slider Thumb.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Play Slider Thumb.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Play Slider Thumb@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Play Slider Thumb@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Play Slider Thumb.imageset/Play Slider Thumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Play Slider Thumb.imageset/Play Slider Thumb.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Play Slider Thumb.imageset/Play Slider Thumb@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Play Slider Thumb.imageset/Play Slider Thumb@2x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Play Slider Thumb.imageset/Play Slider Thumb@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Play Slider Thumb.imageset/Play Slider Thumb@3x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Play Slider Track.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Play Slider Track.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Play Slider Track@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Play Slider Track@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Play Slider Track.imageset/Play Slider Track.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Play Slider Track.imageset/Play Slider Track.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Play Slider Track.imageset/Play Slider Track@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Play Slider Track.imageset/Play Slider Track@2x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Play Slider Track.imageset/Play Slider Track@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Play Slider Track.imageset/Play Slider Track@3x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Play.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Play.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Play@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Play@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Play.imageset/Play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Play.imageset/Play.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Play.imageset/Play@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Play.imageset/Play@2x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Play.imageset/Play@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Play.imageset/Play@3x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Record, On.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Record, On.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Record, On@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Record, On@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Record, On.imageset/Record, On.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Record, On.imageset/Record, On.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Record, On.imageset/Record, On@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Record, On.imageset/Record, On@2x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Record, On.imageset/Record, On@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Record, On.imageset/Record, On@3x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Record.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Record.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Record@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Record@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Record.imageset/Record.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Record.imageset/Record.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Record.imageset/Record@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Record.imageset/Record@2x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Record.imageset/Record@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Record.imageset/Record@3x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Rocket.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Rocket.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Rocket@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Rocket@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Rocket.imageset/Rocket.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Rocket.imageset/Rocket.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Rocket.imageset/Rocket@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Rocket.imageset/Rocket@2x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Rocket.imageset/Rocket@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Rocket.imageset/Rocket@3x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Smiley.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Smiley.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Smiley@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Smiley@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Smiley.imageset/Smiley.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Smiley.imageset/Smiley.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Smiley.imageset/Smiley@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Smiley.imageset/Smiley@2x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Smiley.imageset/Smiley@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Smiley.imageset/Smiley@3x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Speed Handle.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Speed Handle.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Speed Handle@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Speed Handle@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Speed Handle.imageset/Speed Handle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Speed Handle.imageset/Speed Handle.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Speed Handle.imageset/Speed Handle@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Speed Handle.imageset/Speed Handle@2x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Speed Handle.imageset/Speed Handle@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Speed Handle.imageset/Speed Handle@3x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Speed Track.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Speed Track.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Speed Track@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Speed Track@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Speed Track.imageset/Speed Track.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Speed Track.imageset/Speed Track.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Speed Track.imageset/Speed Track@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Speed Track.imageset/Speed Track@2x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Speed Track.imageset/Speed Track@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Speed Track.imageset/Speed Track@3x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Stereo Sweep.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Stereo Sweep.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Stereo Sweep@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Stereo Sweep@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Stereo Sweep.imageset/Stereo Sweep.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Stereo Sweep.imageset/Stereo Sweep.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Stereo Sweep.imageset/Stereo Sweep@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Stereo Sweep.imageset/Stereo Sweep@2x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Stereo Sweep.imageset/Stereo Sweep@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Stereo Sweep.imageset/Stereo Sweep@3x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Stop.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Stop.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Stop@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Stop@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Stop.imageset/Stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Stop.imageset/Stop.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Stop.imageset/Stop@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Stop.imageset/Stop@2x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Stop.imageset/Stop@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Stop.imageset/Stop@3x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Upper Background.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Upper Background.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Upper Background@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Upper Background@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Upper Background.imageset/Upper Background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Upper Background.imageset/Upper Background.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Upper Background.imageset/Upper Background@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Upper Background.imageset/Upper Background@2x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Upper Background.imageset/Upper Background@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Upper Background.imageset/Upper Background@3x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Vinyl Highlight and Shadow.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Vinyl Highlight and Shadow.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Vinyl Highlight and Shadow@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "Vinyl Highlight and Shadow@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Vinyl Highlight and Shadow.imageset/Vinyl Highlight and Shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Vinyl Highlight and Shadow.imageset/Vinyl Highlight and Shadow.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Vinyl Highlight and Shadow.imageset/Vinyl Highlight and Shadow@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Vinyl Highlight and Shadow.imageset/Vinyl Highlight and Shadow@2x.png -------------------------------------------------------------------------------- /TAAESample/Common Assets.xcassets/Vinyl Highlight and Shadow.imageset/Vinyl Highlight and Shadow@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Common Assets.xcassets/Vinyl Highlight and Shadow.imageset/Vinyl Highlight and Shadow@3x.png -------------------------------------------------------------------------------- /TAAESample/Platform/iOS/Classes/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // TAAESample 4 | // 5 | // Created by Michael Tyson on 23/03/2016. 6 | // Copyright © 2016 A Tasty Pixel. All rights reserved. 7 | // 8 | // Strictly for educational purposes only. No part of TAAESample is to be distributed 9 | // in any form other than as source code within the TAAE2 repository. 10 | 11 | import UIKit 12 | 13 | @UIApplicationMain 14 | class AppDelegate: UIResponder, UIApplicationDelegate { 15 | 16 | var window: UIWindow? 17 | var audio: AEAudioController? 18 | 19 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 20 | self.audio = AEAudioController(); 21 | do { 22 | try self.audio!.start(); 23 | if let viewController = self.window?.rootViewController as? ViewController { 24 | viewController.audio = self.audio 25 | } 26 | } catch { 27 | print("Audio unavailable"); 28 | } 29 | 30 | return true 31 | } 32 | 33 | func applicationWillResignActive(_ application: UIApplication) { 34 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 35 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 36 | } 37 | 38 | func applicationDidEnterBackground(_ application: UIApplication) { 39 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 40 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 41 | } 42 | 43 | func applicationWillEnterForeground(_ application: UIApplication) { 44 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 45 | } 46 | 47 | func applicationDidBecomeActive(_ application: UIApplication) { 48 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 49 | } 50 | 51 | func applicationWillTerminate(_ application: UIApplication) { 52 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 53 | } 54 | 55 | 56 | } 57 | 58 | -------------------------------------------------------------------------------- /TAAESample/Platform/iOS/Classes/PlayerButton.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PlayerButton.swift 3 | // TAAESample 4 | // 5 | // Created by Michael Tyson on 31/03/2016. 6 | // Copyright © 2016 A Tasty Pixel. All rights reserved. 7 | // 8 | // Strictly for educational purposes only. No part of TAAESample is to be distributed 9 | // in any form other than as source code within the TAAE2 repository. 10 | 11 | import UIKit 12 | 13 | let IntrinsicSize = CGSize(width: 177.0, height: 186.0) 14 | let AnimationKey = "rotation" 15 | 16 | class PlayerButton: UIView { 17 | 18 | var image: UIImage? { 19 | willSet { 20 | imageLayer.contents = newValue?.cgImage 21 | } 22 | } 23 | 24 | var rotateSpeed: Double = 0 { 25 | willSet { 26 | if rotateAnimation != nil { 27 | let angle = positionForTime(CACurrentMediaTime(), speed: rotateSpeed) 28 | offset = angle 29 | imageLayer.transform = CATransform3DMakeRotation(CGFloat(angle), 0.0, 0.0, 1.0) 30 | imageLayer.removeAnimation(forKey: AnimationKey) 31 | rotateAnimation = nil 32 | } 33 | 34 | if newValue != 0 { 35 | let animation = CABasicAnimation(keyPath: "transform.rotation.z") 36 | animation.byValue = (newValue > 0 ? 1.0 : -1.0)*2.0*Double.pi 37 | animation.duration = 60.0 / fabs(newValue); 38 | animation.repeatCount = Float.infinity 39 | animation.fillMode = CAMediaTimingFillMode.forwards 40 | imageLayer.add(animation, forKey: AnimationKey) 41 | startTime = CACurrentMediaTime() 42 | rotateAnimation = animation 43 | } 44 | } 45 | } 46 | 47 | fileprivate var startTime = 0.0 48 | fileprivate var offset = 0.0 49 | fileprivate var imageLayer: CALayer = CALayer() 50 | fileprivate var rotateAnimation: CAAnimation? 51 | 52 | required init?(coder aDecoder: NSCoder) { 53 | super.init(coder: aDecoder) 54 | 55 | layer.addSublayer(imageLayer) 56 | imageLayer.frame = layer.bounds 57 | imageLayer.contentsGravity = CALayerContentsGravity.center 58 | imageLayer.contentsScale = UIScreen.main.scale 59 | 60 | let highlight = UIImageView(image: UIImage(named: "Vinyl Highlight and Shadow")) 61 | self.addSubview(highlight) 62 | self.addConstraint(NSLayoutConstraint(item: highlight, attribute: NSLayoutConstraint.Attribute.centerX, 63 | relatedBy: NSLayoutConstraint.Relation.equal, toItem: self, attribute: NSLayoutConstraint.Attribute.centerX, multiplier: 1, constant: 0)) 64 | self.addConstraint(NSLayoutConstraint(item: highlight, attribute: NSLayoutConstraint.Attribute.centerY, 65 | relatedBy: NSLayoutConstraint.Relation.equal, toItem: self, attribute: NSLayoutConstraint.Attribute.centerY, multiplier: 1, constant: 0)) 66 | } 67 | 68 | override var intrinsicContentSize : CGSize { 69 | return IntrinsicSize 70 | } 71 | 72 | override func layoutSubviews() { 73 | super.layoutSubviews() 74 | imageLayer.frame = layer.bounds 75 | } 76 | 77 | fileprivate func positionForTime(_ time: CFTimeInterval, speed: Double) -> Double { 78 | return offset + ((time - startTime) / (60.0 / speed)) * 2.0*Double.pi; 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /TAAESample/Platform/iOS/Classes/TriggerGestureRecognizer.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PadGestureRecognizer.swift 3 | // TAAESample 4 | // 5 | // Created by Michael Tyson on 1/04/2016. 6 | // Copyright © 2016 A Tasty Pixel. All rights reserved. 7 | // 8 | // Strictly for educational purposes only. No part of TAAESample is to be distributed 9 | // in any form other than as source code within the TAAE2 repository. 10 | 11 | import UIKit 12 | import UIKit.UIGestureRecognizerSubclass 13 | 14 | class TriggerGestureRecognizer : UIGestureRecognizer { 15 | var pressure: Double = 0 16 | fileprivate var location: CGPoint = CGPoint.zero 17 | 18 | override func touchesBegan(_ touches: Set, with event: UIEvent) { 19 | self.state = UIGestureRecognizer.State.began 20 | location = touches.first!.location(in: nil) 21 | pressure = Double(touches.first!.force / touches.first!.maximumPossibleForce) 22 | } 23 | 24 | override func touchesMoved(_ touches: Set, with event: UIEvent) { 25 | self.state = UIGestureRecognizer.State.changed 26 | location = touches.first!.location(in: nil) 27 | pressure = Double(touches.first!.force / touches.first!.maximumPossibleForce) 28 | } 29 | 30 | override func touchesEnded(_ touches: Set, with event: UIEvent) { 31 | self.state = UIGestureRecognizer.State.ended 32 | location = touches.first!.location(in: nil) 33 | } 34 | 35 | override func touchesCancelled(_ touches: Set, with event: UIEvent) { 36 | self.state = UIGestureRecognizer.State.cancelled 37 | } 38 | 39 | override func location(in view: UIView?) -> CGPoint { 40 | if let view = view { 41 | return view.convert(location, from: nil) 42 | } else { 43 | return location 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /TAAESample/Platform/iOS/Support/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /TAAESample/Platform/iOS/Support/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | TAAE 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSRequiresIPhoneOS 26 | 27 | NSMicrophoneUsageDescription 28 | This app will record audio from the microphone 29 | UILaunchStoryboardName 30 | LaunchScreen 31 | UIMainStoryboardFile 32 | Main 33 | UIRequiredDeviceCapabilities 34 | 35 | armv7 36 | 37 | UIRequiresFullScreen 38 | 39 | UIStatusBarHidden 40 | 41 | UISupportedInterfaceOrientations 42 | 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | UISupportedInterfaceOrientations~ipad 47 | 48 | UIInterfaceOrientationPortrait 49 | UIInterfaceOrientationPortraitUpsideDown 50 | UIInterfaceOrientationLandscapeLeft 51 | UIInterfaceOrientationLandscapeRight 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /TAAESample/Platform/iOS/Support/iOS Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "size" : "60x60", 25 | "idiom" : "iphone", 26 | "filename" : "Icon-120.png", 27 | "scale" : "2x" 28 | }, 29 | { 30 | "size" : "60x60", 31 | "idiom" : "iphone", 32 | "filename" : "Icon-180.png", 33 | "scale" : "3x" 34 | }, 35 | { 36 | "idiom" : "ipad", 37 | "size" : "29x29", 38 | "scale" : "1x" 39 | }, 40 | { 41 | "idiom" : "ipad", 42 | "size" : "29x29", 43 | "scale" : "2x" 44 | }, 45 | { 46 | "idiom" : "ipad", 47 | "size" : "40x40", 48 | "scale" : "1x" 49 | }, 50 | { 51 | "idiom" : "ipad", 52 | "size" : "40x40", 53 | "scale" : "2x" 54 | }, 55 | { 56 | "size" : "76x76", 57 | "idiom" : "ipad", 58 | "filename" : "Icon-76.png", 59 | "scale" : "1x" 60 | }, 61 | { 62 | "size" : "76x76", 63 | "idiom" : "ipad", 64 | "filename" : "Icon-152.png", 65 | "scale" : "2x" 66 | }, 67 | { 68 | "size" : "83.5x83.5", 69 | "idiom" : "ipad", 70 | "filename" : "Icon-167.png", 71 | "scale" : "2x" 72 | } 73 | ], 74 | "info" : { 75 | "version" : 1, 76 | "author" : "xcode" 77 | } 78 | } -------------------------------------------------------------------------------- /TAAESample/Platform/iOS/Support/iOS Assets.xcassets/AppIcon.appiconset/Icon-120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Platform/iOS/Support/iOS Assets.xcassets/AppIcon.appiconset/Icon-120.png -------------------------------------------------------------------------------- /TAAESample/Platform/iOS/Support/iOS Assets.xcassets/AppIcon.appiconset/Icon-152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Platform/iOS/Support/iOS Assets.xcassets/AppIcon.appiconset/Icon-152.png -------------------------------------------------------------------------------- /TAAESample/Platform/iOS/Support/iOS Assets.xcassets/AppIcon.appiconset/Icon-167.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Platform/iOS/Support/iOS Assets.xcassets/AppIcon.appiconset/Icon-167.png -------------------------------------------------------------------------------- /TAAESample/Platform/iOS/Support/iOS Assets.xcassets/AppIcon.appiconset/Icon-180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Platform/iOS/Support/iOS Assets.xcassets/AppIcon.appiconset/Icon-180.png -------------------------------------------------------------------------------- /TAAESample/Platform/iOS/Support/iOS Assets.xcassets/AppIcon.appiconset/Icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Platform/iOS/Support/iOS Assets.xcassets/AppIcon.appiconset/Icon-76.png -------------------------------------------------------------------------------- /TAAESample/Platform/iOS/Support/iOS Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /TAAESample/Platform/macOS/Classes/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // TAAESample macOS 4 | // 5 | // Created by Michael Tyson on 17/08/2016. 6 | // Copyright © 2016 A Tasty Pixel. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | @NSApplicationMain 12 | class AppDelegate: NSObject, NSApplicationDelegate { 13 | 14 | var audio: AEAudioController? 15 | 16 | func applicationDidFinishLaunching(aNotification: NSNotification) { 17 | self.audio = AEAudioController(); 18 | do { 19 | try self.audio!.start(); 20 | if let viewController = NSApplication.sharedApplication().mainWindow?.contentViewController as? ViewController { 21 | viewController.audio = self.audio 22 | } 23 | } catch { 24 | print("Audio unavailable"); 25 | } 26 | } 27 | 28 | func applicationWillTerminate(aNotification: NSNotification) { 29 | // Insert code here to tear down your application 30 | } 31 | 32 | 33 | } 34 | 35 | -------------------------------------------------------------------------------- /TAAESample/Platform/macOS/Classes/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // TAAESample macOS 4 | // 5 | // Created by Michael Tyson on 17/08/2016. 6 | // Copyright © 2016 A Tasty Pixel. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class ViewController: NSViewController { 12 | 13 | var audio: AEAudioController? 14 | 15 | override func viewDidLoad() { 16 | super.viewDidLoad() 17 | 18 | // Do any additional setup after loading the view. 19 | } 20 | 21 | override var representedObject: AnyObject? { 22 | didSet { 23 | // Update the view, if already loaded. 24 | } 25 | } 26 | 27 | 28 | } 29 | 30 | -------------------------------------------------------------------------------- /TAAESample/Platform/macOS/Support/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSMinimumSystemVersion 26 | $(MACOSX_DEPLOYMENT_TARGET) 27 | NSHumanReadableCopyright 28 | Copyright © 2016 A Tasty Pixel. All rights reserved. 29 | NSMainStoryboardFile 30 | Main 31 | NSPrincipalClass 32 | NSApplication 33 | 34 | 35 | -------------------------------------------------------------------------------- /TAAESample/Platform/macOS/Support/macOS Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "16x16", 5 | "idiom" : "mac", 6 | "filename" : "Icon-16.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "Icon-33.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "32x32", 17 | "idiom" : "mac", 18 | "filename" : "Icon-32.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "Icon-64.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "128x128", 29 | "idiom" : "mac", 30 | "filename" : "Icon-128.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "Icon-257.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "256x256", 41 | "idiom" : "mac", 42 | "filename" : "Icon-256.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "256x256", 47 | "idiom" : "mac", 48 | "filename" : "Icon-513.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "512x512", 53 | "idiom" : "mac", 54 | "filename" : "Icon-512.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "512x512", 59 | "idiom" : "mac", 60 | "filename" : "Icon-1024.png", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /TAAESample/Platform/macOS/Support/macOS Assets.xcassets/AppIcon.appiconset/Icon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Platform/macOS/Support/macOS Assets.xcassets/AppIcon.appiconset/Icon-1024.png -------------------------------------------------------------------------------- /TAAESample/Platform/macOS/Support/macOS Assets.xcassets/AppIcon.appiconset/Icon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Platform/macOS/Support/macOS Assets.xcassets/AppIcon.appiconset/Icon-128.png -------------------------------------------------------------------------------- /TAAESample/Platform/macOS/Support/macOS Assets.xcassets/AppIcon.appiconset/Icon-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Platform/macOS/Support/macOS Assets.xcassets/AppIcon.appiconset/Icon-16.png -------------------------------------------------------------------------------- /TAAESample/Platform/macOS/Support/macOS Assets.xcassets/AppIcon.appiconset/Icon-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Platform/macOS/Support/macOS Assets.xcassets/AppIcon.appiconset/Icon-256.png -------------------------------------------------------------------------------- /TAAESample/Platform/macOS/Support/macOS Assets.xcassets/AppIcon.appiconset/Icon-257.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Platform/macOS/Support/macOS Assets.xcassets/AppIcon.appiconset/Icon-257.png -------------------------------------------------------------------------------- /TAAESample/Platform/macOS/Support/macOS Assets.xcassets/AppIcon.appiconset/Icon-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Platform/macOS/Support/macOS Assets.xcassets/AppIcon.appiconset/Icon-32.png -------------------------------------------------------------------------------- /TAAESample/Platform/macOS/Support/macOS Assets.xcassets/AppIcon.appiconset/Icon-33.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Platform/macOS/Support/macOS Assets.xcassets/AppIcon.appiconset/Icon-33.png -------------------------------------------------------------------------------- /TAAESample/Platform/macOS/Support/macOS Assets.xcassets/AppIcon.appiconset/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Platform/macOS/Support/macOS Assets.xcassets/AppIcon.appiconset/Icon-512.png -------------------------------------------------------------------------------- /TAAESample/Platform/macOS/Support/macOS Assets.xcassets/AppIcon.appiconset/Icon-513.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Platform/macOS/Support/macOS Assets.xcassets/AppIcon.appiconset/Icon-513.png -------------------------------------------------------------------------------- /TAAESample/Platform/macOS/Support/macOS Assets.xcassets/AppIcon.appiconset/Icon-64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TheAmazingAudioEngine/TheAmazingAudioEngine2/55d9ed6a7107324d8f073e9c09cb3c3c35ec018a/TAAESample/Platform/macOS/Support/macOS Assets.xcassets/AppIcon.appiconset/Icon-64.png -------------------------------------------------------------------------------- /TAAESample/TAAESample-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // TAAESample-Bridging-Header.h 3 | // TAAESample 4 | // 5 | // Created by Michael Tyson on 23/03/2016. 6 | // Copyright © 2016 A Tasty Pixel. All rights reserved. 7 | // 8 | 9 | #import "AEAudioController.h" -------------------------------------------------------------------------------- /Tests/AENewTimePitchModuleTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // AENewTimePitchModuleTests.m 3 | // TheAmazingAudioEngine 4 | // 5 | // Created by Mark Anderson on 9/24/16. 6 | // Copyright © 2016 A Tasty Pixel. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AENewTimePitchModule.h" 11 | #import "AEManagedValue.h" 12 | #import "AEAudioBufferListUtilities.h" 13 | 14 | @interface AENewTimePitchModuleTests : XCTestCase 15 | 16 | @end 17 | 18 | @implementation AENewTimePitchModuleTests 19 | 20 | - (void)testDefaultParameterValues { 21 | AERenderer * renderer = [AERenderer new]; 22 | AERenderer * subrenderer = [AERenderer new]; 23 | 24 | AENewTimePitchModule * timePitchModule = [[AENewTimePitchModule alloc] initWithRenderer:renderer subrenderer:subrenderer]; 25 | 26 | XCTAssertEqual(timePitchModule.pitch, 0.0); 27 | XCTAssertEqual(timePitchModule.rate, 1.0); 28 | XCTAssertEqual(timePitchModule.overlap, 8.0); 29 | XCTAssertEqual(timePitchModule.enablePeakLocking, YES); 30 | } 31 | 32 | - (void)testParameterValueManipulation { 33 | AERenderer * renderer = [AERenderer new]; 34 | AERenderer * subrenderer = [AERenderer new]; 35 | 36 | AENewTimePitchModule * timePitchModule = [[AENewTimePitchModule alloc] initWithRenderer:renderer subrenderer:subrenderer]; 37 | 38 | AEManagedValue * timePitchValue = [AEManagedValue new]; 39 | timePitchValue.objectValue = timePitchModule; 40 | 41 | double pitchChange = -2400.0; 42 | double rateChange = 1.0/32.0; 43 | double overlapChange = 32.0; 44 | double enablePeakLockingChange = NO; 45 | 46 | renderer.block = ^(const AERenderContext * context) { 47 | __unsafe_unretained AENewTimePitchModule * timePitch 48 | = (__bridge AENewTimePitchModule *)AEManagedValueGetValue(timePitchValue); 49 | 50 | timePitch.pitch = pitchChange; 51 | timePitch.rate = rateChange; 52 | timePitch.overlap = overlapChange; 53 | timePitch.enablePeakLocking = enablePeakLockingChange; 54 | }; 55 | 56 | UInt32 frames = 1; 57 | AudioBufferList * abl = AEAudioBufferListCreate(frames); 58 | AudioTimeStamp timestamp = { .mFlags = kAudioTimeStampSampleTimeValid, .mSampleTime = 0 }; 59 | 60 | AERendererRun(renderer, abl, frames, ×tamp); 61 | 62 | XCTAssertEqual(timePitchModule.pitch, pitchChange); 63 | XCTAssertEqual(timePitchModule.rate, rateChange); 64 | XCTAssertEqual(timePitchModule.overlap, overlapChange); 65 | XCTAssertEqual(timePitchModule.enablePeakLocking, enablePeakLockingChange); 66 | } 67 | 68 | @end 69 | -------------------------------------------------------------------------------- /Tests/AESampleRateConverterTests.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "AESampleRateConverterModule.h" 4 | 5 | @interface AESampleRateConverterTests : XCTestCase 6 | @end 7 | 8 | @implementation AESampleRateConverterTests 9 | 10 | - (void)testSampleRateConverter { 11 | // Use stereo buffers because AEModuleProcess is currently hard-coded to use stereo buffers. 12 | // If we use a mono buffer, the conversion to/from stereo internal to AEModuleProcess ends up 13 | // doubling the amplitude of the samples. 14 | const AudioStreamBasicDescription inFormat = AEAudioDescriptionWithChannelsAndRate(2,44100); 15 | const AudioStreamBasicDescription outFormat = AEAudioDescriptionWithChannelsAndRate(2,48000); 16 | const UInt32 kOutFrames = 128; 17 | const UInt32 kInFrames = 18 | (UInt32) ceil((inFormat.mSampleRate / outFormat.mSampleRate) * kOutFrames); 19 | AudioBufferList * in = AEAudioBufferListCreateWithFormat(inFormat, kInFrames); 20 | AudioBufferList * out = AEAudioBufferListCreateWithFormat(outFormat, kOutFrames); 21 | 22 | AERenderer * renderer = [[AERenderer alloc] init]; 23 | renderer.isOffline = YES; 24 | renderer.sampleRate = outFormat.mSampleRate; 25 | renderer.numberOfOutputChannels = outFormat.mChannelsPerFrame; 26 | AERenderer * subrenderer = [[AERenderer alloc] init]; 27 | subrenderer.isOffline = YES; 28 | subrenderer.sampleRate = inFormat.mSampleRate; 29 | subrenderer.numberOfOutputChannels = inFormat.mChannelsPerFrame; 30 | 31 | GPMSampleRateConverterModule * converterModule = 32 | [[GPMSampleRateConverterModule alloc] initWithRenderer:renderer subrenderer:subrenderer]; 33 | 34 | renderer.block = ^(const AERenderContext * context) { 35 | AEModuleProcess(converterModule, context); 36 | AERenderContextOutput(context, 1); 37 | }; 38 | subrenderer.block = ^(const AERenderContext * context) { 39 | const AudioBufferList * abl = AEBufferStackPushWithChannels(context->stack, 1, 2); 40 | if ( !abl ) return; 41 | 42 | for ( int i=0; iframes; i++ ) { 43 | ((float*)abl->mBuffers[0].mData)[i] = 0.0; 44 | } 45 | 46 | ((float*)abl->mBuffers[0].mData)[0] = 1.0; 47 | 48 | AERenderContextOutput(context, 1); 49 | }; 50 | 51 | AudioTimeStamp timestamp = { .mFlags = kAudioTimeStampSampleTimeValid, .mSampleTime = 0 }; 52 | 53 | AERendererRun(renderer, out, kOutFrames, ×tamp); 54 | 55 | // Todo: Inspect the output, to see if it is a resampled version of the input. 56 | 57 | for ( int i=0; imBuffers[0].mData)[i]); 59 | } 60 | 61 | } 62 | 63 | @end 64 | -------------------------------------------------------------------------------- /Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine.xcodeproj/xcshareddata/xcschemes/TheAmazingAudioEngine OS X.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 42 | 48 | 49 | 50 | 51 | 52 | 62 | 63 | 69 | 70 | 71 | 72 | 78 | 79 | 85 | 86 | 87 | 88 | 90 | 91 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine.xcodeproj/xcshareddata/xcschemes/TheAmazingAudioEngine tvOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 42 | 48 | 49 | 50 | 51 | 52 | 62 | 63 | 69 | 70 | 71 | 72 | 78 | 79 | 85 | 86 | 87 | 88 | 90 | 91 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine.xcodeproj/xcshareddata/xcschemes/TheAmazingAudioEngine.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 42 | 48 | 49 | 50 | 51 | 52 | 62 | 63 | 69 | 70 | 71 | 72 | 78 | 79 | 85 | 86 | 87 | 88 | 90 | 91 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Core/AERenderContext.m: -------------------------------------------------------------------------------- 1 | // 2 | // AERenderContext.m 3 | // TheAmazingAudioEngine 4 | // 5 | // Created by Michael Tyson on 29/04/2016. 6 | // Copyright © 2016 A Tasty Pixel. All rights reserved. 7 | // 8 | // This software is provided 'as-is', without any express or implied 9 | // warranty. In no event will the authors be held liable for any damages 10 | // arising from the use of this software. 11 | // 12 | // Permission is granted to anyone to use this software for any purpose, 13 | // including commercial applications, and to alter it and redistribute it 14 | // freely, subject to the following restrictions: 15 | // 16 | // 1. The origin of this software must not be misrepresented; you must not 17 | // claim that you wrote the original software. If you use this software 18 | // in a product, an acknowledgment in the product documentation would be 19 | // appreciated but is not required. 20 | // 21 | // 2. Altered source versions must be plainly marked as such, and must not be 22 | // misrepresented as being the original software. 23 | // 24 | // 3. This notice may not be removed or altered from any source distribution. 25 | // 26 | 27 | #import "AERenderContext.h" 28 | #import "AEBufferStack.h" 29 | 30 | void AERenderContextOutput(const AERenderContext * context, int bufferCount) { 31 | AEBufferStackMixToBufferList(context->stack, bufferCount, context->output); 32 | } 33 | 34 | void AERenderContextOutputToChannels(const AERenderContext * _Nonnull context, int bufferCount, AEChannelSet channels) { 35 | AEBufferStackMixToBufferListChannels(context->stack, bufferCount, channels, context->output); 36 | } 37 | 38 | void AERenderContextRestoreBufferStack(const AERenderContext * context) { 39 | AEBufferStackSetFrameCount(context->stack, context->frames); 40 | AEBufferStackSetTimeStamp(context->stack, context->timestamp); 41 | } 42 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Core/AETime.h: -------------------------------------------------------------------------------- 1 | // 2 | // AETime.h 3 | // TheAmazingAudioEngine 4 | // 5 | // Created by Michael Tyson on 24/03/2016. 6 | // Copyright © 2016 A Tasty Pixel. All rights reserved. 7 | // 8 | // This software is provided 'as-is', without any express or implied 9 | // warranty. In no event will the authors be held liable for any damages 10 | // arising from the use of this software. 11 | // 12 | // Permission is granted to anyone to use this software for any purpose, 13 | // including commercial applications, and to alter it and redistribute it 14 | // freely, subject to the following restrictions: 15 | // 16 | // 1. The origin of this software must not be misrepresented; you must not 17 | // claim that you wrote the original software. If you use this software 18 | // in a product, an acknowledgment in the product documentation would be 19 | // appreciated but is not required. 20 | // 21 | // 2. Altered source versions must be plainly marked as such, and must not be 22 | // misrepresented as being the original software. 23 | // 24 | // 3. This notice may not be removed or altered from any source distribution. 25 | // 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | #import 32 | #import 33 | 34 | typedef uint64_t AEHostTicks; 35 | typedef double AESeconds; 36 | 37 | extern const AudioTimeStamp AETimeStampNone; //!< An empty timestamp 38 | 39 | /*! 40 | * Initialize 41 | */ 42 | void AETimeInit(void); 43 | 44 | /*! 45 | * Get current global timestamp, in host ticks 46 | */ 47 | AEHostTicks AECurrentTimeInHostTicks(void); 48 | 49 | /*! 50 | * Get current global timestamp, in seconds 51 | */ 52 | AESeconds AECurrentTimeInSeconds(void); 53 | 54 | /*! 55 | * Convert time in seconds to host ticks 56 | * 57 | * @param seconds The time in seconds 58 | * @return The time in host ticks 59 | */ 60 | AEHostTicks AEHostTicksFromSeconds(AESeconds seconds); 61 | 62 | /*! 63 | * Convert time in host ticks to seconds 64 | * 65 | * @param ticks The time in host ticks 66 | * @return The time in seconds 67 | */ 68 | AESeconds AESecondsFromHostTicks(AEHostTicks ticks); 69 | 70 | /*! 71 | * Create an AudioTimeStamps with a host ticks value 72 | * 73 | * If a zero value is provided, then AETimeStampNone will be returned. 74 | * 75 | * @param ticks The time in host ticks 76 | * @return The timestamp 77 | */ 78 | AudioTimeStamp AETimeStampWithHostTicks(AEHostTicks ticks); 79 | 80 | /*! 81 | * Create an AudioTimeStamps with a sample time value 82 | * 83 | * @param samples The time in samples 84 | * @return The timestamp 85 | */ 86 | AudioTimeStamp AETimeStampWithSamples(Float64 samples); 87 | 88 | #ifdef __cplusplus 89 | } 90 | #endif 91 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Core/AETime.m: -------------------------------------------------------------------------------- 1 | // 2 | // AETime.m 3 | // TheAmazingAudioEngine 4 | // 5 | // Created by Michael Tyson on 24/03/2016. 6 | // Copyright © 2016 A Tasty Pixel. All rights reserved. 7 | // 8 | // This software is provided 'as-is', without any express or implied 9 | // warranty. In no event will the authors be held liable for any damages 10 | // arising from the use of this software. 11 | // 12 | // Permission is granted to anyone to use this software for any purpose, 13 | // including commercial applications, and to alter it and redistribute it 14 | // freely, subject to the following restrictions: 15 | // 16 | // 1. The origin of this software must not be misrepresented; you must not 17 | // claim that you wrote the original software. If you use this software 18 | // in a product, an acknowledgment in the product documentation would be 19 | // appreciated but is not required. 20 | // 21 | // 2. Altered source versions must be plainly marked as such, and must not be 22 | // misrepresented as being the original software. 23 | // 24 | // 3. This notice may not be removed or altered from any source distribution. 25 | // 26 | 27 | #import "AETime.h" 28 | #import 29 | 30 | static double __hostTicksToSeconds = 0.0; 31 | static double __secondsToHostTicks = 0.0; 32 | 33 | const AudioTimeStamp AETimeStampNone = {}; 34 | 35 | void AETimeInit(void) { 36 | static dispatch_once_t onceToken; 37 | dispatch_once(&onceToken, ^{ 38 | mach_timebase_info_data_t tinfo; 39 | mach_timebase_info(&tinfo); 40 | __hostTicksToSeconds = ((double)tinfo.numer / tinfo.denom) * 1.0e-9; 41 | __secondsToHostTicks = 1.0 / __hostTicksToSeconds; 42 | }); 43 | } 44 | 45 | AEHostTicks AECurrentTimeInHostTicks(void) { 46 | return mach_absolute_time(); 47 | } 48 | 49 | AESeconds AECurrentTimeInSeconds(void) { 50 | if ( !__hostTicksToSeconds ) AETimeInit(); 51 | return mach_absolute_time() * __hostTicksToSeconds; 52 | } 53 | 54 | AEHostTicks AEHostTicksFromSeconds(AESeconds seconds) { 55 | if ( !__secondsToHostTicks ) AETimeInit(); 56 | assert(seconds >= 0); 57 | return round(seconds * __secondsToHostTicks); 58 | } 59 | 60 | AESeconds AESecondsFromHostTicks(AEHostTicks ticks) { 61 | if ( !__hostTicksToSeconds ) AETimeInit(); 62 | return ticks * __hostTicksToSeconds; 63 | } 64 | 65 | AudioTimeStamp AETimeStampWithHostTicks(AEHostTicks ticks) { 66 | if ( !ticks ) return AETimeStampNone; 67 | return (AudioTimeStamp) { .mFlags = kAudioTimeStampHostTimeValid, .mHostTime = ticks }; 68 | } 69 | 70 | AudioTimeStamp AETimeStampWithSamples(Float64 samples) { 71 | return (AudioTimeStamp) { .mFlags = kAudioTimeStampSampleTimeValid, .mSampleTime = samples }; 72 | } 73 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Core/AETypes.m: -------------------------------------------------------------------------------- 1 | // 2 | // AETypes.m 3 | // TheAmazingAudioEngine 4 | // 5 | // Created by Michael Tyson on 23/03/2016. 6 | // Copyright © 2016 A Tasty Pixel. All rights reserved. 7 | // 8 | // This software is provided 'as-is', without any express or implied 9 | // warranty. In no event will the authors be held liable for any damages 10 | // arising from the use of this software. 11 | // 12 | // Permission is granted to anyone to use this software for any purpose, 13 | // including commercial applications, and to alter it and redistribute it 14 | // freely, subject to the following restrictions: 15 | // 16 | // 1. The origin of this software must not be misrepresented; you must not 17 | // claim that you wrote the original software. If you use this software 18 | // in a product, an acknowledgment in the product documentation would be 19 | // appreciated but is not required. 20 | // 21 | // 2. Altered source versions must be plainly marked as such, and must not be 22 | // misrepresented as being the original software. 23 | // 24 | // 3. This notice may not be removed or altered from any source distribution. 25 | // 26 | 27 | #import "AETypes.h" 28 | 29 | NSString * const AEDidChangeMaxFramesPerSliceNotification = @"AEDidChangeMaxFramesPerSliceNotification"; 30 | 31 | UInt32 AEMaxFramesPerSlice = 4096; 32 | UInt32 AEGetMaxFramesPerSlice(void) { 33 | return AEMaxFramesPerSlice; 34 | } 35 | void AESetMaxFramesPerSlice(UInt32 maxFramesPerSlice) { 36 | AEMaxFramesPerSlice = maxFramesPerSlice; 37 | [NSNotificationCenter.defaultCenter postNotificationName:AEDidChangeMaxFramesPerSliceNotification object:nil]; 38 | } 39 | 40 | AudioStreamBasicDescription const AEAudioDescription = { 41 | .mFormatID = kAudioFormatLinearPCM, 42 | .mFormatFlags = kAudioFormatFlagIsFloat | kAudioFormatFlagIsPacked | kAudioFormatFlagIsNonInterleaved, 43 | .mChannelsPerFrame = 2, 44 | .mBytesPerPacket = sizeof(float), 45 | .mFramesPerPacket = 1, 46 | .mBytesPerFrame = sizeof(float), 47 | .mBitsPerChannel = 8 * sizeof(float), 48 | .mSampleRate = 0, 49 | }; 50 | 51 | AudioStreamBasicDescription AEAudioDescriptionWithChannelsAndRate(int channels, double rate) { 52 | AudioStreamBasicDescription description = AEAudioDescription; 53 | description.mChannelsPerFrame = channels; 54 | description.mSampleRate = rate; 55 | return description; 56 | } 57 | 58 | AEChannelSet AEChannelSetDefault = {0, 1}; 59 | 60 | AEChannelSet AEChannelSetNone = {-1, -1}; 61 | 62 | pthread_t AERealtimeThreadIdentifier = NULL; 63 | 64 | @implementation NSValue (AEChannelSet) 65 | + (NSValue *)valueWithChannelSet:(AEChannelSet)channelSet { 66 | return [NSValue valueWithBytes:&channelSet objCType:@encode(AEChannelSet)]; 67 | } 68 | - (AEChannelSet)channelSetValue { 69 | NSAssert(!strcmp(self.objCType, @encode(AEChannelSet)), @"Wrong type"); 70 | AEChannelSet set; 71 | [self getValue:&set]; 72 | return set; 73 | } 74 | @end 75 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Library/TPCircularBuffer/README.markdown: -------------------------------------------------------------------------------- 1 | A simple, fast circular buffer implementation for audio processing 2 | ================================================================== 3 | 4 | A simple C implementation for a circular (ring) buffer. Thread-safe with a single producer and a single consumer, using OSAtomic.h primitives, and avoids any need for buffer wrapping logic by using a virtual memory map technique to place a virtual copy of the buffer straight after the end of the real buffer. 5 | 6 | Usage 7 | ----- 8 | 9 | Initialisation and cleanup: `TPCircularBufferInit` and `TPCircularBufferCleanup` to allocate and free resources. 10 | 11 | Producing: Use `TPCircularBufferHead` to get a pointer to write to the buffer, followed by `TPCircularBufferProduce` to submit the written data. `TPCircularBufferProduceBytes` is a convenience routine for writing data straight to the buffer. 12 | 13 | Consuming: Use `TPCircularBufferTail` to get a pointer to the next data to read, followed by `TPCircularBufferConsume` to free up the space once processed. 14 | 15 | TPCircularBuffer+AudioBufferList.(c,h) contain helper functions to queue and dequeue AudioBufferList 16 | structures. These will automatically adjust the mData fields of each buffer to point to 16-byte aligned 17 | regions within the circular buffer. 18 | 19 | Thread safety 20 | ------------- 21 | 22 | As long as you restrict multithreaded access to just one producer, and just one consumer, this utility should be thread safe. 23 | 24 | Only one shared variable is used (the buffer fill count), and OSAtomic primitives are used to write to this value to ensure atomicity. 25 | 26 | License 27 | ------- 28 | 29 | Copyright (C) 2012-2013 A Tasty Pixel 30 | 31 | This software is provided 'as-is', without any express or implied 32 | warranty. In no event will the authors be held liable for any damages 33 | arising from the use of this software. 34 | 35 | Permission is granted to anyone to use this software for any purpose, 36 | including commercial applications, and to alter it and redistribute it 37 | freely, subject to the following restrictions: 38 | 39 | 1. The origin of this software must not be misrepresented; you must not 40 | claim that you wrote the original software. If you use this software 41 | in a product, an acknowledgment in the product documentation would be 42 | appreciated but is not required. 43 | 44 | 2. Altered source versions must be plainly marked as such, and must not be 45 | misrepresented as being the original software. 46 | 47 | 3. This notice may not be removed or altered from any source distribution. 48 | 49 | 50 | ----------------------------------------------------- 51 | 52 | Virtual memory technique originally proposed by [Philip Howard](http://vrb.slashusr.org/), and [adapted to Darwin](http://www.snoize.com/Code/PlayBufferedSoundFile.tar.gz) by [Kurt Revis](http://www.snoize.com) 53 | 54 | See more info at [atastypixel.com](http://atastypixel.com/blog/a-simple-fast-circular-buffer-implementation-for-audio-processing/) 55 | 56 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Modules/AEBlockModule.h: -------------------------------------------------------------------------------- 1 | // 2 | // AEBlockModule.h 3 | // TheAmazingAudioEngine 4 | // 5 | // Created by Michael Tyson on 15/7/19. 6 | // Copyright © 2019 A Tasty Pixel. All rights reserved. 7 | // 8 | // This software is provided 'as-is', without any express or implied 9 | // warranty. In no event will the authors be held liable for any damages 10 | // arising from the use of this software. 11 | // 12 | // Permission is granted to anyone to use this software for any purpose, 13 | // including commercial applications, and to alter it and redistribute it 14 | // freely, subject to the following restrictions: 15 | // 16 | // 1. The origin of this software must not be misrepresented; you must not 17 | // claim that you wrote the original software. If you use this software 18 | // in a product, an acknowledgment in the product documentation would be 19 | // appreciated but is not required. 20 | // 21 | // 2. Altered source versions must be plainly marked as such, and must not be 22 | // misrepresented as being the original software. 23 | // 24 | // 3. This notice may not be removed or altered from any source distribution. 25 | // 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | #import "AEModule.h" 32 | #import 33 | #import "AERenderer.h" 34 | 35 | /*! 36 | * Process block 37 | * 38 | * Block version of AEModuleProcessFunc (see this for details). 39 | * 40 | * @param context The rendering context 41 | */ 42 | typedef void (^AEModuleProcessBlock)(const AERenderContext * _Nonnull context); 43 | 44 | /*! 45 | * Active test block 46 | * 47 | * Block version of AEModuleIsActiveFunc (see this for details). 48 | */ 49 | typedef BOOL (^AEModuleIsActiveBlock)(void); 50 | 51 | /*! 52 | * Block module 53 | * 54 | * A module that uses blocks for processing, rather than function pointers, making it 55 | * easier to use in certain cases. 56 | */ 57 | @interface AEBlockModule : AEModule 58 | 59 | /*! 60 | * Initializer 61 | * 62 | * @param renderer The renderer. 63 | */ 64 | - (instancetype _Nullable)initWithRenderer:(AERenderer * _Nullable)renderer processBlock:(AEModuleProcessBlock _Nullable)processBlock NS_DESIGNATED_INITIALIZER; 65 | 66 | - (instancetype _Nullable)initWithRenderer:(AERenderer * _Nullable)renderer NS_UNAVAILABLE; 67 | 68 | //! Block for processing 69 | @property (nonatomic, copy, nullable) AEModuleProcessBlock processBlock; 70 | 71 | //! Block to determine whether module is currently active, or can be skipped during processing 72 | @property (nonatomic, copy, nullable) AEModuleIsActiveBlock isActiveBlock; 73 | 74 | //! Block to call when changing sample rate 75 | @property (nonatomic, copy, nullable) void (^sampleRateChangedBlock)(double newSampleRate); 76 | 77 | //! Block to call when changing renderer's channel count 78 | @property (nonatomic, copy, nullable) void (^rendererChannelCountChangedBlock)(int newChannelCount); 79 | 80 | @end 81 | 82 | 83 | #ifdef __cplusplus 84 | } 85 | #endif 86 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Modules/AEBlockModule.m: -------------------------------------------------------------------------------- 1 | // 2 | // AEBlockModule.m 3 | // TheAmazingAudioEngine 4 | // 5 | // Created by Michael Tyson on 15/7/19. 6 | // Copyright © 2019 A Tasty Pixel. All rights reserved. 7 | // 8 | 9 | #import "AEBlockModule.h" 10 | #import "AEManagedValue.h" 11 | #import "AERenderer.h" 12 | 13 | @interface AEBlockModule () 14 | @property (nonatomic, strong) AEManagedValue * processBlockValue; 15 | @property (nonatomic, strong) AEManagedValue * isActiveBlockValue; 16 | @end 17 | 18 | @implementation AEBlockModule 19 | @dynamic processBlock, isActiveBlock; 20 | 21 | - (instancetype)initWithRenderer:(AERenderer *)renderer processBlock:(AEModuleProcessBlock)processBlock { 22 | if ( !(self = [super initWithRenderer:renderer]) ) return nil; 23 | 24 | self.processBlockValue = [AEManagedValue new]; 25 | self.isActiveBlockValue = [AEManagedValue new]; 26 | 27 | self.processBlock = processBlock; 28 | 29 | self.processFunction = AEBlockModuleProcess; 30 | self.isActiveFunction = AEBlockModuleIsActive; 31 | 32 | return self; 33 | } 34 | 35 | - (void)setProcessBlock:(AEModuleProcessBlock)processBlock { 36 | self.processBlockValue.objectValue = processBlock; 37 | } 38 | 39 | - (AEModuleProcessBlock)processBlock { 40 | return self.processBlockValue.objectValue; 41 | } 42 | 43 | - (void)setIsActiveBlock:(AEModuleIsActiveBlock)isActiveBlock { 44 | self.isActiveBlockValue.objectValue = isActiveBlock; 45 | } 46 | 47 | - (AEModuleIsActiveBlock)isActiveBlock { 48 | return self.isActiveBlockValue.objectValue; 49 | } 50 | 51 | - (void)rendererDidChangeSampleRate { 52 | if ( self.sampleRateChangedBlock ) { 53 | self.sampleRateChangedBlock(self.renderer.sampleRate); 54 | } 55 | } 56 | 57 | - (void)rendererDidChangeNumberOfChannels { 58 | if ( self.rendererChannelCountChangedBlock ) { 59 | self.rendererChannelCountChangedBlock(self.renderer.numberOfOutputChannels); 60 | } 61 | } 62 | 63 | static void AEBlockModuleProcess(__unsafe_unretained AEBlockModule * THIS, const AERenderContext * context) { 64 | __unsafe_unretained AEModuleProcessBlock block = (__bridge AEModuleProcessBlock)AEManagedValueGetValue(THIS->_processBlockValue); 65 | if ( block ) block(context); 66 | } 67 | 68 | static BOOL AEBlockModuleIsActive(__unsafe_unretained AEBlockModule * THIS) { 69 | __unsafe_unretained AEModuleIsActiveBlock block = (__bridge AEModuleIsActiveBlock)AEManagedValueGetValue(THIS->_isActiveBlockValue); 70 | if ( block ) return block(); 71 | return AEManagedValueGetValue(THIS->_processBlockValue) != NULL; 72 | } 73 | 74 | 75 | 76 | @end 77 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Modules/AEModule.m: -------------------------------------------------------------------------------- 1 | // 2 | // AEModule.m 3 | // TheAmazingAudioEngine 4 | // 5 | // Created by Michael Tyson on 23/03/2016. 6 | // Copyright © 2016 A Tasty Pixel. All rights reserved. 7 | // 8 | // This software is provided 'as-is', without any express or implied 9 | // warranty. In no event will the authors be held liable for any damages 10 | // arising from the use of this software. 11 | // 12 | // Permission is granted to anyone to use this software for any purpose, 13 | // including commercial applications, and to alter it and redistribute it 14 | // freely, subject to the following restrictions: 15 | // 16 | // 1. The origin of this software must not be misrepresented; you must not 17 | // claim that you wrote the original software. If you use this software 18 | // in a product, an acknowledgment in the product documentation would be 19 | // appreciated but is not required. 20 | // 21 | // 2. Altered source versions must be plainly marked as such, and must not be 22 | // misrepresented as being the original software. 23 | // 24 | // 3. This notice may not be removed or altered from any source distribution. 25 | // 26 | 27 | #import "AEModule.h" 28 | #import "AERenderer.h" 29 | 30 | static void * kRendererSampleRateChanged = &kRendererSampleRateChanged; 31 | static void * kRendererOutputChannelsChanged = &kRendererOutputChannelsChanged; 32 | 33 | @implementation AEModule 34 | 35 | - (instancetype)initWithRenderer:(AERenderer *)renderer { 36 | if ( !(self = [super init]) ) return nil; 37 | self.renderer = renderer; 38 | return self; 39 | } 40 | 41 | - (void)dealloc { 42 | self.renderer = nil; 43 | } 44 | 45 | - (void)setRenderer:(AERenderer *)renderer { 46 | if ( _renderer == renderer ) return; 47 | 48 | if ( _renderer ) { 49 | [self stopObservingRenderer]; 50 | } 51 | 52 | _renderer = renderer; 53 | 54 | if ( _renderer ) { 55 | [self startObservingRenderer]; 56 | [self rendererDidChangeSampleRate]; 57 | [self rendererDidChangeNumberOfChannels]; 58 | } 59 | } 60 | 61 | - (void)startObservingRenderer { 62 | [_renderer addObserver:self forKeyPath:NSStringFromSelector(@selector(sampleRate)) options:0 context:kRendererSampleRateChanged]; 63 | [_renderer addObserver:self forKeyPath:NSStringFromSelector(@selector(numberOfOutputChannels)) options:0 context:kRendererOutputChannelsChanged]; 64 | } 65 | 66 | - (void)stopObservingRenderer { 67 | [_renderer removeObserver:self forKeyPath:NSStringFromSelector(@selector(sampleRate)) context:kRendererSampleRateChanged]; 68 | [_renderer removeObserver:self forKeyPath:NSStringFromSelector(@selector(numberOfOutputChannels)) context:kRendererOutputChannelsChanged]; 69 | } 70 | 71 | - (void)rendererDidChangeSampleRate { 72 | 73 | } 74 | 75 | - (void)rendererDidChangeNumberOfChannels { 76 | 77 | } 78 | 79 | void AEModuleProcess(__unsafe_unretained AEModule * module, const AERenderContext * _Nonnull context) { 80 | if ( module->_processFunction ) { 81 | module->_processFunction(module, context); 82 | } 83 | } 84 | 85 | BOOL AEModuleIsActive(__unsafe_unretained AEModule * _Nonnull module) { 86 | if ( module->_isActiveFunction ) { 87 | return module->_isActiveFunction(module); 88 | } else { 89 | return YES; 90 | } 91 | } 92 | 93 | void AEModuleReset(__unsafe_unretained AEModule * _Nonnull module) { 94 | if ( module->_resetFunction ) { 95 | module->_resetFunction(module); 96 | } 97 | } 98 | 99 | - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { 100 | if ( context == kRendererSampleRateChanged ) { 101 | [self rendererDidChangeSampleRate]; 102 | } else if ( context == kRendererOutputChannelsChanged ) { 103 | [self rendererDidChangeNumberOfChannels]; 104 | } else { 105 | [super observeValueForKeyPath:keyPath ofObject:object change:change context:context]; 106 | } 107 | } 108 | 109 | @end 110 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Modules/AESubrendererModule.h: -------------------------------------------------------------------------------- 1 | // 2 | // AESubrendererModule.h 3 | // TheAmazingAudioEngine 4 | // 5 | // Created by Michael Tyson on 23/04/2016. 6 | // Copyright © 2016 A Tasty Pixel. All rights reserved. 7 | // 8 | // This software is provided 'as-is', without any express or implied 9 | // warranty. In no event will the authors be held liable for any damages 10 | // arising from the use of this software. 11 | // 12 | // Permission is granted to anyone to use this software for any purpose, 13 | // including commercial applications, and to alter it and redistribute it 14 | // freely, subject to the following restrictions: 15 | // 16 | // 1. The origin of this software must not be misrepresented; you must not 17 | // claim that you wrote the original software. If you use this software 18 | // in a product, an acknowledgment in the product documentation would be 19 | // appreciated but is not required. 20 | // 21 | // 2. Altered source versions must be plainly marked as such, and must not be 22 | // misrepresented as being the original software. 23 | // 24 | // 3. This notice may not be removed or altered from any source distribution. 25 | // 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | #import "AEModule.h" 32 | 33 | /*! 34 | * Subrenderer module 35 | * 36 | * This module allows you to run a separate renderer. This can be useful for encapsulating 37 | * complex rendering behaviour. 38 | * 39 | * The subrenderer's sample rate will track the owning renderer's sample rate, and 40 | */ 41 | @interface AESubrendererModule : AEModule 42 | 43 | /*! 44 | * Initializer 45 | * 46 | * @param renderer Owning renderer 47 | * @param subrenderer Sub-renderer to use to provide input 48 | */ 49 | - (instancetype _Nullable)initWithRenderer:(AERenderer * _Nullable)renderer 50 | subrenderer:(AERenderer * _Nullable)subrenderer; 51 | 52 | 53 | //! The sub-renderer. You may change this value at any time; assignment is thread-safe. 54 | @property (nonatomic, strong) AERenderer * _Nullable subrenderer; 55 | 56 | //! The number of channels to use, or zero to track the owning renderer's channel count. Default is 2 (stereo) 57 | @property (nonatomic) int numberOfOutputChannels; 58 | 59 | @end 60 | 61 | #ifdef __cplusplus 62 | } 63 | #endif -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Modules/AESubrendererModule.m: -------------------------------------------------------------------------------- 1 | // 2 | // AESubrendererModule.m 3 | // TheAmazingAudioEngine 4 | // 5 | // Created by Michael Tyson on 23/04/2016. 6 | // Copyright © 2016 A Tasty Pixel. All rights reserved. 7 | // 8 | // This software is provided 'as-is', without any express or implied 9 | // warranty. In no event will the authors be held liable for any damages 10 | // arising from the use of this software. 11 | // 12 | // Permission is granted to anyone to use this software for any purpose, 13 | // including commercial applications, and to alter it and redistribute it 14 | // freely, subject to the following restrictions: 15 | // 16 | // 1. The origin of this software must not be misrepresented; you must not 17 | // claim that you wrote the original software. If you use this software 18 | // in a product, an acknowledgment in the product documentation would be 19 | // appreciated but is not required. 20 | // 21 | // 2. Altered source versions must be plainly marked as such, and must not be 22 | // misrepresented as being the original software. 23 | // 24 | // 3. This notice may not be removed or altered from any source distribution. 25 | // 26 | 27 | #import "AESubrendererModule.h" 28 | #import "AEManagedValue.h" 29 | #import "AEAudioBufferListUtilities.h" 30 | 31 | @interface AESubrendererModule () 32 | @property (nonatomic, strong) AEManagedValue * subrendererValue; 33 | @end 34 | 35 | @implementation AESubrendererModule 36 | @dynamic subrenderer; 37 | 38 | - (instancetype)initWithRenderer:(AERenderer *)renderer subrenderer:(AERenderer *)subrenderer { 39 | if ( !(self = [super initWithRenderer:renderer]) ) return nil; 40 | 41 | self.numberOfOutputChannels = 2; 42 | self.subrendererValue = [AEManagedValue new]; 43 | self.subrenderer = subrenderer; 44 | self.processFunction = AESubrendererModuleProcess; 45 | 46 | return self; 47 | } 48 | 49 | - (void)setSubrenderer:(AERenderer *)subrenderer { 50 | self.subrendererValue.objectValue = subrenderer; 51 | } 52 | 53 | - (AERenderer *)subrenderer { 54 | return self.subrendererValue.objectValue; 55 | } 56 | 57 | static void AESubrendererModuleProcess(__unsafe_unretained AESubrendererModule * THIS, const AERenderContext * _Nonnull context) { 58 | 59 | const AudioBufferList * abl = AEBufferStackPushWithChannels(context->stack, 1, THIS->_numberOfOutputChannels == 0 ? context->output->mNumberBuffers : THIS->_numberOfOutputChannels); 60 | if ( !abl ) return; 61 | 62 | __unsafe_unretained AERenderer * renderer = (__bridge AERenderer*)AEManagedValueGetValue(THIS->_subrendererValue); 63 | if ( renderer ) { 64 | AERendererRun(renderer, abl, context->frames, context->timestamp); 65 | } else { 66 | AEAudioBufferListSilence(abl, 0, context->frames); 67 | } 68 | } 69 | 70 | - (void)rendererDidChangeSampleRate { 71 | self.subrenderer.sampleRate = self.renderer.sampleRate; 72 | } 73 | 74 | @end 75 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Modules/Generation/AEAudiobusInputModule.h: -------------------------------------------------------------------------------- 1 | // 2 | // AEAudiobusInputModule.h 3 | // TheAmazingAudioEngine 4 | // 5 | // Created by Michael Tyson on 11/10/2016. 6 | // Copyright © 2016 A Tasty Pixel. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class AEAudioUnitInputModule; 12 | @class ABAudioReceiverPort; 13 | 14 | @interface AEAudiobusInputModule : AEModule 15 | 16 | /*! 17 | * Initializer 18 | * 19 | * @param renderer The renderer 20 | * @param port The Audiobus audio receiver port 21 | * @param input If not NULL, the Remote IO audio unit input to use when the Audiobus port is not in use 22 | */ 23 | - (instancetype)initWithRenderer:(AERenderer *)renderer 24 | audioReceiverPort:(ABAudioReceiverPort *)port 25 | audioUnitInputModule:(AEAudioUnitInputModule *)input; 26 | 27 | @property (nonatomic, strong, readonly) ABAudioReceiverPort * audioReceiverPort; 28 | @property (nonatomic, strong, readonly) AEAudioUnitInputModule * audioUnitInputModule; 29 | @property (nonatomic) BOOL audiobusEnabled; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Modules/Generation/AEMixerModule.h: -------------------------------------------------------------------------------- 1 | // 2 | // AEMixerModule.h 3 | // TheAmazingAudioEngine 4 | // 5 | // Created by Michael Tyson on 7/05/2016. 6 | // Copyright © 2016 A Tasty Pixel. All rights reserved. 7 | // 8 | // This software is provided 'as-is', without any express or implied 9 | // warranty. In no event will the authors be held liable for any damages 10 | // arising from the use of this software. 11 | // 12 | // Permission is granted to anyone to use this software for any purpose, 13 | // including commercial applications, and to alter it and redistribute it 14 | // freely, subject to the following restrictions: 15 | // 16 | // 1. The origin of this software must not be misrepresented; you must not 17 | // claim that you wrote the original software. If you use this software 18 | // in a product, an acknowledgment in the product documentation would be 19 | // appreciated but is not required. 20 | // 21 | // 2. Altered source versions must be plainly marked as such, and must not be 22 | // misrepresented as being the original software. 23 | // 24 | // 3. This notice may not be removed or altered from any source distribution. 25 | // 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | #import "AEModule.h" 32 | 33 | /*! 34 | * Mixer module 35 | * 36 | * This module provides a convenient way to aggregate multiple generator modules 37 | * together, with facilities for applying volume and balance per-generator module. 38 | * 39 | * You should use this with generator modules only - that is, modules that push 40 | * a buffer onto the stack when they are processed. 41 | */ 42 | @interface AEMixerModule : AEModule 43 | 44 | /*! 45 | * Initializer 46 | */ 47 | - (instancetype _Nullable)initWithRenderer:(AERenderer * _Nullable)renderer; 48 | 49 | /*! 50 | * Add a module 51 | * 52 | * @param module A generator module 53 | */ 54 | - (void)addModule:(AEModule * _Nonnull)module; 55 | 56 | /*! 57 | * Add a module, with mix parameters 58 | * 59 | * @param module A generator module 60 | * @param volume The module's initial volume (power ratio) 61 | * @param balance The module's initial balance (0 for center) 62 | */ 63 | - (void)addModule:(AEModule * _Nonnull)module volume:(float)volume balance:(float)balance; 64 | 65 | /*! 66 | * Remove a module 67 | * 68 | * @param module The module to remove 69 | */ 70 | - (void)removeModule:(AEModule * _Nonnull)module; 71 | 72 | /*! 73 | * Set mixing parameters for a module 74 | * 75 | * @param volume The module's volume (power ratio) 76 | * @param balance The module's balance (0 for center) 77 | * @param module A module 78 | */ 79 | - (void)setVolume:(float)volume balance:(float)balance forModule:(AEModule * _Nonnull)module; 80 | 81 | /*! 82 | * Get mixing parameters for a module 83 | * 84 | * @param volume On output, the module's volume (power ratio) 85 | * @param balance On output, the module's balance (0 for center) 86 | * @param module A module 87 | */ 88 | - (void)getVolume:(float * _Nonnull)volume balance:(float * _Nonnull)balance forModule:(AEModule * _Nonnull)module; 89 | 90 | 91 | //! The generator modules to aggregate 92 | @property (nonatomic, strong) NSArray * _Nonnull modules; 93 | 94 | //! The number of channels to use (2 by default) 95 | @property (nonatomic) int numberOfChannels; 96 | 97 | @end 98 | 99 | //! Temporary alias from AEAggregatorModule to AEMixerModule 100 | typedef AEMixerModule AEAggregatorModule __deprecated_msg("use AEMixerModule"); 101 | 102 | #ifdef __cplusplus 103 | } 104 | #endif 105 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Modules/Generation/AEOscillatorModule.h: -------------------------------------------------------------------------------- 1 | // 2 | // AEOscillatorModule.h 3 | // TheAmazingAudioEngine 4 | // 5 | // Created by Michael Tyson on 24/03/2016. 6 | // Copyright © 2016 A Tasty Pixel. All rights reserved. 7 | // 8 | // This software is provided 'as-is', without any express or implied 9 | // warranty. In no event will the authors be held liable for any damages 10 | // arising from the use of this software. 11 | // 12 | // Permission is granted to anyone to use this software for any purpose, 13 | // including commercial applications, and to alter it and redistribute it 14 | // freely, subject to the following restrictions: 15 | // 16 | // 1. The origin of this software must not be misrepresented; you must not 17 | // claim that you wrote the original software. If you use this software 18 | // in a product, an acknowledgment in the product documentation would be 19 | // appreciated but is not required. 20 | // 21 | // 2. Altered source versions must be plainly marked as such, and must not be 22 | // misrepresented as being the original software. 23 | // 24 | // 3. This notice may not be removed or altered from any source distribution. 25 | // 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | #import "AEModule.h" 32 | 33 | @interface AEOscillatorModule : AEModule 34 | @property (nonatomic) double frequency; 35 | @end 36 | 37 | #ifdef __cplusplus 38 | } 39 | #endif 40 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Modules/Generation/AEOscillatorModule.m: -------------------------------------------------------------------------------- 1 | // 2 | // AEOscillatorModule.m 3 | // TheAmazingAudioEngine 4 | // 5 | // Created by Michael Tyson on 24/03/2016. 6 | // Copyright © 2016 A Tasty Pixel. All rights reserved. 7 | // 8 | // This software is provided 'as-is', without any express or implied 9 | // warranty. In no event will the authors be held liable for any damages 10 | // arising from the use of this software. 11 | // 12 | // Permission is granted to anyone to use this software for any purpose, 13 | // including commercial applications, and to alter it and redistribute it 14 | // freely, subject to the following restrictions: 15 | // 16 | // 1. The origin of this software must not be misrepresented; you must not 17 | // claim that you wrote the original software. If you use this software 18 | // in a product, an acknowledgment in the product documentation would be 19 | // appreciated but is not required. 20 | // 21 | // 2. Altered source versions must be plainly marked as such, and must not be 22 | // misrepresented as being the original software. 23 | // 24 | // 3. This notice may not be removed or altered from any source distribution. 25 | // 26 | 27 | #import "AEOscillatorModule.h" 28 | #import "AEDSPUtilities.h" 29 | 30 | @interface AEOscillatorModule () { 31 | float _position; 32 | } 33 | @end 34 | 35 | @implementation AEOscillatorModule 36 | 37 | - (instancetype)initWithRenderer:(AERenderer *)renderer { 38 | if ( !(self = [super initWithRenderer:renderer]) ) return nil; 39 | self.frequency = 440; 40 | self.processFunction = AEOscillatorModuleProcess; 41 | return self; 42 | } 43 | 44 | static void AEOscillatorModuleProcess(__unsafe_unretained AEOscillatorModule * THIS, const AERenderContext * _Nonnull context) { 45 | const AudioBufferList * abl = AEBufferStackPushWithChannels(context->stack, 1, 1); 46 | if ( !abl ) return; 47 | 48 | float rate = THIS->_frequency / context->sampleRate; 49 | for ( int i=0; iframes; i++ ) { 50 | ((float*)abl->mBuffers[0].mData)[i] = AEDSPGenerateOscillator(rate, &THIS->_position) - 0.5; 51 | } 52 | } 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Modules/Generation/AESplitterModule.h: -------------------------------------------------------------------------------- 1 | // 2 | // AESplitterModule.h 3 | // TheAmazingAudioEngine 4 | // 5 | // Created by Michael Tyson on 30/05/2016. 6 | // Copyright © 2016 A Tasty Pixel. All rights reserved. 7 | // 8 | // This software is provided 'as-is', without any express or implied 9 | // warranty. In no event will the authors be held liable for any damages 10 | // arising from the use of this software. 11 | // 12 | // Permission is granted to anyone to use this software for any purpose, 13 | // including commercial applications, and to alter it and redistribute it 14 | // freely, subject to the following restrictions: 15 | // 16 | // 1. The origin of this software must not be misrepresented; you must not 17 | // claim that you wrote the original software. If you use this software 18 | // in a product, an acknowledgment in the product documentation would be 19 | // appreciated but is not required. 20 | // 21 | // 2. Altered source versions must be plainly marked as such, and must not be 22 | // misrepresented as being the original software. 23 | // 24 | // 3. This notice may not be removed or altered from any source distribution. 25 | // 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | #import "AEModule.h" 32 | 33 | /*! 34 | * Splitter module 35 | * 36 | * This generator module wraps another generator, and allows you to safely run 37 | * it multiple times in the same render cycle by buffering the first run, and 38 | * returning the buffered audio for the first and subsequent runs. This is useful 39 | * for situations where you are drawing input from the same module at multiple 40 | * points throughout your audio renderer. 41 | */ 42 | @interface AESplitterModule : AEModule 43 | 44 | /*! 45 | * Initializer 46 | * 47 | * @param renderer The renderer 48 | * @param module A generator module with which to generate audio 49 | */ 50 | - (instancetype)initWithRenderer:(AERenderer *)renderer module:(AEModule *)module; 51 | 52 | //! The module 53 | @property (nonatomic, strong) AEModule * module; 54 | 55 | //! The number of channels that will be generated (default 2). 56 | //! You should not change this value while the module is in use. 57 | @property (nonatomic) int numberOfChannels; 58 | 59 | @end 60 | 61 | #ifdef __cplusplus 62 | } 63 | #endif 64 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Modules/Processing/AEBandpassModule.h: -------------------------------------------------------------------------------- 1 | // 2 | // AEBandpassModule.h 3 | // The Amazing Audio Engine 4 | // 5 | // Created by Jeremy Flores on 4/25/13. 6 | // Copyright (c) 2015 Dream Engine Interactive, Inc and A Tasty Pixel Pty Ltd. All rights reserved. 7 | // 8 | // This software is provided 'as-is', without any express or implied 9 | // warranty. In no event will the authors be held liable for any damages 10 | // arising from the use of this software. 11 | // 12 | // Permission is granted to anyone to use this software for any purpose, 13 | // including commercial applications, and to alter it and redistribute it 14 | // freely, subject to the following restrictions: 15 | // 16 | // 1. The origin of this software must not be misrepresented; you must not 17 | // claim that you wrote the original software. If you use this software 18 | // in a product, an acknowledgment in the product documentation would be 19 | // appreciated but is not required. 20 | // 21 | // 2. Altered source versions must be plainly marked as such, and must not be 22 | // misrepresented as being the original software. 23 | // 24 | // 3. This notice may not be removed or altered from any source distribution. 25 | // 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | #import 32 | #import "AEAudioUnitModule.h" 33 | 34 | @interface AEBandpassModule : AEAudioUnitModule 35 | 36 | - (instancetype _Nullable)initWithRenderer:(AERenderer * _Nullable)renderer; 37 | 38 | //! range is from 20Hz to ($SAMPLERATE/2)Hz. Default is 5000Hz. 39 | @property (nonatomic) double centerFrequency; 40 | 41 | //! range is from 100 to 12000 cents. Default is 600 cents. 42 | @property (nonatomic) double bandwidth; 43 | 44 | @end 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Modules/Processing/AEBandpassModule.m: -------------------------------------------------------------------------------- 1 | // 2 | // AEBandpassModule.m 3 | // The Amazing Audio Engine 4 | // 5 | // Created by Jeremy Flores on 4/25/13. 6 | // Copyright (c) 2015 Dream Engine Interactive, Inc and A Tasty Pixel Pty Ltd. All rights reserved. 7 | // 8 | // This software is provided 'as-is', without any express or implied 9 | // warranty. In no event will the authors be held liable for any damages 10 | // arising from the use of this software. 11 | // 12 | // Permission is granted to anyone to use this software for any purpose, 13 | // including commercial applications, and to alter it and redistribute it 14 | // freely, subject to the following restrictions: 15 | // 16 | // 1. The origin of this software must not be misrepresented; you must not 17 | // claim that you wrote the original software. If you use this software 18 | // in a product, an acknowledgment in the product documentation would be 19 | // appreciated but is not required. 20 | // 21 | // 2. Altered source versions must be plainly marked as such, and must not be 22 | // misrepresented as being the original software. 23 | // 24 | // 3. This notice may not be removed or altered from any source distribution. 25 | // 26 | 27 | #import "AEBandpassModule.h" 28 | 29 | @implementation AEBandpassModule 30 | 31 | - (instancetype)initWithRenderer:(AERenderer *)renderer { 32 | return [super initWithRenderer:renderer componentDescription:(AudioComponentDescription) { 33 | kAudioUnitType_Effect, kAudioUnitSubType_BandPassFilter, kAudioUnitManufacturer_Apple 34 | }]; 35 | } 36 | 37 | #pragma mark - Getters 38 | 39 | - (double)centerFrequency { 40 | return [self getParameterValueForId:kBandpassParam_CenterFrequency]; 41 | } 42 | 43 | - (double)bandwidth { 44 | return [self getParameterValueForId:kBandpassParam_Bandwidth]; 45 | } 46 | 47 | #pragma mark - Setters 48 | 49 | - (void)setCenterFrequency:(double)centerFrequency { 50 | [self setParameterValue: centerFrequency 51 | forId: kBandpassParam_CenterFrequency]; 52 | } 53 | 54 | - (void)setBandwidth:(double)bandwidth { 55 | [self setParameterValue: bandwidth 56 | forId: kBandpassParam_Bandwidth]; 57 | } 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Modules/Processing/AEDelayModule.h: -------------------------------------------------------------------------------- 1 | // 2 | // AEDelayModule.h 3 | // The Amazing Audio Engine 4 | // 5 | // Created by Jeremy Flores on 4/25/13. 6 | // Copyright (c) 2015 Dream Engine Interactive, Inc and A Tasty Pixel Pty Ltd. All rights reserved. 7 | // 8 | // This software is provided 'as-is', without any express or implied 9 | // warranty. In no event will the authors be held liable for any damages 10 | // arising from the use of this software. 11 | // 12 | // Permission is granted to anyone to use this software for any purpose, 13 | // including commercial applications, and to alter it and redistribute it 14 | // freely, subject to the following restrictions: 15 | // 16 | // 1. The origin of this software must not be misrepresented; you must not 17 | // claim that you wrote the original software. If you use this software 18 | // in a product, an acknowledgment in the product documentation would be 19 | // appreciated but is not required. 20 | // 21 | // 2. Altered source versions must be plainly marked as such, and must not be 22 | // misrepresented as being the original software. 23 | // 24 | // 3. This notice may not be removed or altered from any source distribution. 25 | // 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | #import 32 | #import "AEAudioUnitModule.h" 33 | 34 | @interface AEDelayModule : AEAudioUnitModule 35 | 36 | - (instancetype _Nullable)initWithRenderer:(AERenderer * _Nullable)renderer; 37 | 38 | //! range is from 0 to 100 (percentage). Default is 50. 39 | @property (nonatomic) double wetDryMix; 40 | 41 | //! range is from 0 to 2 seconds. Default is 1 second. 42 | @property (nonatomic) double delayTime; 43 | 44 | //! range is from -100 to 100. default is 50. 45 | @property (nonatomic) double feedback; 46 | 47 | //! range is from 10 to ($SAMPLERATE/2). Default is 15000. 48 | @property (nonatomic) double lopassCutoff; 49 | 50 | @end 51 | 52 | #ifdef __cplusplus 53 | } 54 | #endif -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Modules/Processing/AEDelayModule.m: -------------------------------------------------------------------------------- 1 | // 2 | // AEDelayModule.m 3 | // The Amazing Audio Engine 4 | // 5 | // Created by Jeremy Flores on 4/25/13. 6 | // Copyright (c) 2015 Dream Engine Interactive, Inc and A Tasty Pixel Pty Ltd. All rights reserved. 7 | // 8 | // This software is provided 'as-is', without any express or implied 9 | // warranty. In no event will the authors be held liable for any damages 10 | // arising from the use of this software. 11 | // 12 | // Permission is granted to anyone to use this software for any purpose, 13 | // including commercial applications, and to alter it and redistribute it 14 | // freely, subject to the following restrictions: 15 | // 16 | // 1. The origin of this software must not be misrepresented; you must not 17 | // claim that you wrote the original software. If you use this software 18 | // in a product, an acknowledgment in the product documentation would be 19 | // appreciated but is not required. 20 | // 21 | // 2. Altered source versions must be plainly marked as such, and must not be 22 | // misrepresented as being the original software. 23 | // 24 | // 3. This notice may not be removed or altered from any source distribution. 25 | // 26 | 27 | #import "AEDelayModule.h" 28 | 29 | @implementation AEDelayModule 30 | 31 | - (instancetype)initWithRenderer:(AERenderer *)renderer { 32 | return [super initWithRenderer:renderer componentDescription:(AudioComponentDescription) { 33 | kAudioUnitType_Effect, kAudioUnitSubType_Delay, kAudioUnitManufacturer_Apple 34 | }]; 35 | } 36 | 37 | #pragma mark - Getters 38 | 39 | - (double)wetDryMix { 40 | return [self getParameterValueForId:kDelayParam_WetDryMix]; 41 | } 42 | 43 | - (double)delayTime { 44 | return [self getParameterValueForId:kDelayParam_DelayTime]; 45 | } 46 | 47 | - (double)feedback { 48 | return [self getParameterValueForId:kDelayParam_Feedback]; 49 | } 50 | 51 | - (double)lopassCutoff { 52 | return [self getParameterValueForId:kDelayParam_LopassCutoff]; 53 | } 54 | 55 | 56 | #pragma mark - Setters 57 | 58 | - (void)setWetDryMix:(double)wetDryMix { 59 | [self setParameterValue: wetDryMix 60 | forId: kDelayParam_WetDryMix]; 61 | } 62 | 63 | - (void)setDelayTime:(double)delayTime { 64 | [self setParameterValue: delayTime 65 | forId: kDelayParam_DelayTime]; 66 | } 67 | 68 | - (void)setFeedback:(double)feedback { 69 | [self setParameterValue: feedback 70 | forId: kDelayParam_Feedback]; 71 | } 72 | 73 | - (void)setLopassCutoff:(double)lopassCutoff { 74 | [self setParameterValue: lopassCutoff 75 | forId: kDelayParam_LopassCutoff]; 76 | } 77 | 78 | @end 79 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Modules/Processing/AEDistortionModule.h: -------------------------------------------------------------------------------- 1 | // 2 | // AEDistortionModule.h 3 | // The Amazing Audio Engine 4 | // 5 | // Created by Jeremy Flores on 4/25/13. 6 | // Copyright (c) 2015 Dream Engine Interactive, Inc and A Tasty Pixel Pty Ltd. All rights reserved. 7 | // 8 | // This software is provided 'as-is', without any express or implied 9 | // warranty. In no event will the authors be held liable for any damages 10 | // arising from the use of this software. 11 | // 12 | // Permission is granted to anyone to use this software for any purpose, 13 | // including commercial applications, and to alter it and redistribute it 14 | // freely, subject to the following restrictions: 15 | // 16 | // 1. The origin of this software must not be misrepresented; you must not 17 | // claim that you wrote the original software. If you use this software 18 | // in a product, an acknowledgment in the product documentation would be 19 | // appreciated but is not required. 20 | // 21 | // 2. Altered source versions must be plainly marked as such, and must not be 22 | // misrepresented as being the original software. 23 | // 24 | // 3. This notice may not be removed or altered from any source distribution. 25 | // 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | #import 32 | #import "AEAudioUnitModule.h" 33 | 34 | @interface AEDistortionModule : AEAudioUnitModule 35 | 36 | - (instancetype _Nullable)initWithRenderer:(AERenderer * _Nullable)renderer; 37 | 38 | //! range is from 0.1 to 500 milliseconds. Default is 0.1. 39 | @property (nonatomic) double delay; 40 | 41 | //! range is from 0.1 to 50 (rate). Default is 1.0. 42 | @property (nonatomic) double decay; 43 | 44 | //! range is from 0 to 100 (percentage). Default is 50. 45 | @property (nonatomic) double delayMix; 46 | 47 | 48 | 49 | //! range is from 0% to 100%. 50 | @property (nonatomic) double decimation; 51 | 52 | //! range is from 0% to 100%. Default is 0%. 53 | @property (nonatomic) double rounding; 54 | 55 | //! range is from 0% to 100%. Default is 50%. 56 | @property (nonatomic) double decimationMix; 57 | 58 | 59 | 60 | //! range is from 0 to 1 (linear gain). Default is 1. 61 | @property (nonatomic) double linearTerm; 62 | 63 | //! range is from 0 to 20 (linear gain). Default is 0. 64 | @property (nonatomic) double squaredTerm; 65 | 66 | //! range is from 0 to 20 (linear gain). Default is 0. 67 | @property (nonatomic) double cubicTerm; 68 | 69 | //! range is from 0% to 100%. Default is 50%. 70 | @property (nonatomic) double polynomialMix; 71 | 72 | 73 | 74 | //! range is from 0.5Hz to 8000Hz. Default is 100Hz. 75 | @property (nonatomic) double ringModFreq1; 76 | 77 | //! range is from 0.5Hz to 8000Hz. Default is 100Hz. 78 | @property (nonatomic) double ringModFreq2; 79 | 80 | //! range is from 0% to 100%. Default is 50%. 81 | @property (nonatomic) double ringModBalance; 82 | 83 | //! range is from 0% to 100%. Default is 0%. 84 | @property (nonatomic) double ringModMix; 85 | 86 | 87 | 88 | //! range is from -80dB to 20dB. Default is -6dB. 89 | @property (nonatomic) double softClipGain; 90 | 91 | 92 | 93 | //! range is from 0% to 100%. Default is 50%. 94 | @property (nonatomic) double finalMix; 95 | 96 | @end 97 | 98 | #ifdef __cplusplus 99 | } 100 | #endif 101 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Modules/Processing/AEDynamicsProcessorModule.h: -------------------------------------------------------------------------------- 1 | // 2 | // AEDynamicsProcessorModule.h 3 | // The Amazing Audio Engine 4 | // 5 | // Created by Jeremy Flores on 4/25/13. 6 | // Copyright (c) 2015 Dream Engine Interactive, Inc and A Tasty Pixel Pty Ltd. All rights reserved. 7 | // 8 | // This software is provided 'as-is', without any express or implied 9 | // warranty. In no event will the authors be held liable for any damages 10 | // arising from the use of this software. 11 | // 12 | // Permission is granted to anyone to use this software for any purpose, 13 | // including commercial applications, and to alter it and redistribute it 14 | // freely, subject to the following restrictions: 15 | // 16 | // 1. The origin of this software must not be misrepresented; you must not 17 | // claim that you wrote the original software. If you use this software 18 | // in a product, an acknowledgment in the product documentation would be 19 | // appreciated but is not required. 20 | // 21 | // 2. Altered source versions must be plainly marked as such, and must not be 22 | // misrepresented as being the original software. 23 | // 24 | // 3. This notice may not be removed or altered from any source distribution. 25 | // 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | #import 32 | #import "AEAudioUnitModule.h" 33 | 34 | @interface AEDynamicsProcessorModule : AEAudioUnitModule 35 | 36 | - (instancetype _Nullable)initWithRenderer:(AERenderer * _Nullable)renderer; 37 | 38 | //! range is from -40dB to 20dB. Default is -20dB. 39 | @property (nonatomic) double threshold; 40 | 41 | //! range is from 0.1dB to 40dB. Default is 5dB. 42 | @property (nonatomic) double headRoom; 43 | 44 | //! range is from 1 to 50 (rate). Default is 2. 45 | @property (nonatomic) double expansionRatio; 46 | 47 | // Value is in dB. 48 | @property (nonatomic) double expansionThreshold; 49 | 50 | //! range is from 0.0001 to 0.2. Default is 0.001. 51 | @property (nonatomic) double attackTime; 52 | 53 | //! range is from 0.01 to 3. Default is 0.05. 54 | @property (nonatomic) double releaseTime; 55 | 56 | //! range is from -40dB to 40dB. Default is 0dB. 57 | @property (nonatomic) double masterGain; 58 | 59 | @property (nonatomic, readonly) double compressionAmount; 60 | @property (nonatomic, readonly) double inputAmplitude; 61 | @property (nonatomic, readonly) double outputAmplitude; 62 | 63 | @end 64 | 65 | #ifdef __cplusplus 66 | } 67 | #endif 68 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Modules/Processing/AEHighPassModule.h: -------------------------------------------------------------------------------- 1 | // 2 | // AEHighPassModule.h 3 | // The Amazing Audio Engine 4 | // 5 | // Created by Jeremy Flores on 4/25/13. 6 | // Copyright (c) 2015 Dream Engine Interactive, Inc and A Tasty Pixel Pty Ltd. All rights reserved. 7 | // 8 | // This software is provided 'as-is', without any express or implied 9 | // warranty. In no event will the authors be held liable for any damages 10 | // arising from the use of this software. 11 | // 12 | // Permission is granted to anyone to use this software for any purpose, 13 | // including commercial applications, and to alter it and redistribute it 14 | // freely, subject to the following restrictions: 15 | // 16 | // 1. The origin of this software must not be misrepresented; you must not 17 | // claim that you wrote the original software. If you use this software 18 | // in a product, an acknowledgment in the product documentation would be 19 | // appreciated but is not required. 20 | // 21 | // 2. Altered source versions must be plainly marked as such, and must not be 22 | // misrepresented as being the original software. 23 | // 24 | // 3. This notice may not be removed or altered from any source distribution. 25 | // 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | #import 32 | #import "AEAudioUnitModule.h" 33 | 34 | @interface AEHighPassModule : AEAudioUnitModule 35 | 36 | - (instancetype _Nullable)initWithRenderer:(AERenderer * _Nullable)renderer; 37 | 38 | //! range is from 10Hz to ($SAMPLERATE/2) Hz. Default is 6900 Hz. 39 | @property (nonatomic) double cutoffFrequency; 40 | 41 | //! range is -20dB to 40dB. Default is 0dB. 42 | @property (nonatomic) double resonance; 43 | 44 | @end 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Modules/Processing/AEHighPassModule.m: -------------------------------------------------------------------------------- 1 | // 2 | // AEHighPassModule.m 3 | // The Amazing Audio Engine 4 | // 5 | // Created by Jeremy Flores on 4/25/13. 6 | // Copyright (c) 2015 Dream Engine Interactive, Inc and A Tasty Pixel Pty Ltd. All rights reserved. 7 | // 8 | // This software is provided 'as-is', without any express or implied 9 | // warranty. In no event will the authors be held liable for any damages 10 | // arising from the use of this software. 11 | // 12 | // Permission is granted to anyone to use this software for any purpose, 13 | // including commercial applications, and to alter it and redistribute it 14 | // freely, subject to the following restrictions: 15 | // 16 | // 1. The origin of this software must not be misrepresented; you must not 17 | // claim that you wrote the original software. If you use this software 18 | // in a product, an acknowledgment in the product documentation would be 19 | // appreciated but is not required. 20 | // 21 | // 2. Altered source versions must be plainly marked as such, and must not be 22 | // misrepresented as being the original software. 23 | // 24 | // 3. This notice may not be removed or altered from any source distribution. 25 | // 26 | 27 | #import "AEHighPassModule.h" 28 | 29 | @implementation AEHighPassModule 30 | 31 | - (instancetype)initWithRenderer:(AERenderer *)renderer { 32 | return [super initWithRenderer:renderer componentDescription:(AudioComponentDescription) { 33 | kAudioUnitType_Effect, kAudioUnitSubType_HighPassFilter, kAudioUnitManufacturer_Apple 34 | }]; 35 | } 36 | 37 | #pragma mark - Getters 38 | 39 | - (double)cutoffFrequency { 40 | return [self getParameterValueForId:kHipassParam_CutoffFrequency]; 41 | } 42 | 43 | - (double)resonance { 44 | return [self getParameterValueForId:kHipassParam_Resonance]; 45 | } 46 | 47 | 48 | #pragma mark - Setters 49 | 50 | - (void)setCutoffFrequency:(double)cutoffFrequency { 51 | [self setParameterValue: cutoffFrequency 52 | forId: kHipassParam_CutoffFrequency]; 53 | } 54 | 55 | - (void)setResonance:(double)resonance { 56 | [self setParameterValue: resonance 57 | forId: kHipassParam_Resonance]; 58 | } 59 | 60 | @end 61 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Modules/Processing/AEHighShelfModule.h: -------------------------------------------------------------------------------- 1 | // 2 | // AEHighShelfModule.h 3 | // The Amazing Audio Engine 4 | // 5 | // Created by Jeremy Flores on 4/25/13. 6 | // Copyright (c) 2015 Dream Engine Interactive, Inc and A Tasty Pixel Pty Ltd. All rights reserved. 7 | // 8 | // This software is provided 'as-is', without any express or implied 9 | // warranty. In no event will the authors be held liable for any damages 10 | // arising from the use of this software. 11 | // 12 | // Permission is granted to anyone to use this software for any purpose, 13 | // including commercial applications, and to alter it and redistribute it 14 | // freely, subject to the following restrictions: 15 | // 16 | // 1. The origin of this software must not be misrepresented; you must not 17 | // claim that you wrote the original software. If you use this software 18 | // in a product, an acknowledgment in the product documentation would be 19 | // appreciated but is not required. 20 | // 21 | // 2. Altered source versions must be plainly marked as such, and must not be 22 | // misrepresented as being the original software. 23 | // 24 | // 3. This notice may not be removed or altered from any source distribution. 25 | // 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | #import 32 | #import "AEAudioUnitModule.h" 33 | 34 | @interface AEHighShelfModule : AEAudioUnitModule 35 | 36 | - (instancetype _Nullable)initWithRenderer:(AERenderer * _Nullable)renderer; 37 | 38 | //! range is from 10000Hz to ($SAMPLERATE/2) Hz. Default is 10000 Hz. 39 | @property (nonatomic) double cutoffFrequency; 40 | 41 | //! range is -40dB to 40dB. Default is 0dB. 42 | @property (nonatomic) double gain; 43 | 44 | @end 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Modules/Processing/AEHighShelfModule.m: -------------------------------------------------------------------------------- 1 | // 2 | // AEHighShelfModule.m 3 | // The Amazing Audio Engine 4 | // 5 | // Created by Jeremy Flores on 4/25/13. 6 | // Copyright (c) 2015 Dream Engine Interactive, Inc and A Tasty Pixel Pty Ltd. All rights reserved. 7 | // 8 | // This software is provided 'as-is', without any express or implied 9 | // warranty. In no event will the authors be held liable for any damages 10 | // arising from the use of this software. 11 | // 12 | // Permission is granted to anyone to use this software for any purpose, 13 | // including commercial applications, and to alter it and redistribute it 14 | // freely, subject to the following restrictions: 15 | // 16 | // 1. The origin of this software must not be misrepresented; you must not 17 | // claim that you wrote the original software. If you use this software 18 | // in a product, an acknowledgment in the product documentation would be 19 | // appreciated but is not required. 20 | // 21 | // 2. Altered source versions must be plainly marked as such, and must not be 22 | // misrepresented as being the original software. 23 | // 24 | // 3. This notice may not be removed or altered from any source distribution. 25 | // 26 | 27 | #import "AEHighShelfModule.h" 28 | 29 | @implementation AEHighShelfModule 30 | 31 | - (instancetype)initWithRenderer:(AERenderer *)renderer { 32 | return [super initWithRenderer:renderer componentDescription:(AudioComponentDescription) { 33 | kAudioUnitType_Effect, kAudioUnitSubType_HighShelfFilter, kAudioUnitManufacturer_Apple 34 | }]; 35 | } 36 | 37 | #pragma mark - Getters 38 | 39 | - (double)cutoffFrequency { 40 | return [self getParameterValueForId:kHighShelfParam_CutOffFrequency]; 41 | } 42 | 43 | - (double)gain { 44 | return [self getParameterValueForId:kHighShelfParam_Gain]; 45 | } 46 | 47 | 48 | #pragma mark - Setters 49 | 50 | - (void)setCutoffFrequency:(double)cutoffFrequency { 51 | [self setParameterValue: cutoffFrequency 52 | forId: kHighShelfParam_CutOffFrequency]; 53 | } 54 | 55 | - (void)setGain:(double)gain { 56 | [self setParameterValue: gain 57 | forId: kHighShelfParam_Gain]; 58 | } 59 | 60 | @end 61 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Modules/Processing/AELowPassModule.h: -------------------------------------------------------------------------------- 1 | // 2 | // AELowPassModule.h 3 | // The Amazing Audio Engine 4 | // 5 | // Created by Jeremy Flores on 4/25/13. 6 | // Copyright (c) 2015 Dream Engine Interactive, Inc and A Tasty Pixel Pty Ltd. All rights reserved. 7 | // 8 | // This software is provided 'as-is', without any express or implied 9 | // warranty. In no event will the authors be held liable for any damages 10 | // arising from the use of this software. 11 | // 12 | // Permission is granted to anyone to use this software for any purpose, 13 | // including commercial applications, and to alter it and redistribute it 14 | // freely, subject to the following restrictions: 15 | // 16 | // 1. The origin of this software must not be misrepresented; you must not 17 | // claim that you wrote the original software. If you use this software 18 | // in a product, an acknowledgment in the product documentation would be 19 | // appreciated but is not required. 20 | // 21 | // 2. Altered source versions must be plainly marked as such, and must not be 22 | // misrepresented as being the original software. 23 | // 24 | // 3. This notice may not be removed or altered from any source distribution. 25 | // 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | #import 32 | #import "AEAudioUnitModule.h" 33 | 34 | @interface AELowPassModule : AEAudioUnitModule 35 | 36 | - (instancetype _Nullable)initWithRenderer:(AERenderer * _Nullable)renderer; 37 | 38 | //! range is from 10Hz to ($SAMPLERATE/2) Hz. Default is 6900 Hz. 39 | @property (nonatomic) double cutoffFrequency; 40 | 41 | //! range is -20dB to 40dB. Default is 0dB. 42 | @property (nonatomic) double resonance; 43 | 44 | @end 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Modules/Processing/AELowPassModule.m: -------------------------------------------------------------------------------- 1 | // 2 | // AELowPassModule.m 3 | // The Amazing Audio Engine 4 | // 5 | // Created by Jeremy Flores on 4/25/13. 6 | // Copyright (c) 2015 Dream Engine Interactive, Inc and A Tasty Pixel Pty Ltd. All rights reserved. 7 | // 8 | // This software is provided 'as-is', without any express or implied 9 | // warranty. In no event will the authors be held liable for any damages 10 | // arising from the use of this software. 11 | // 12 | // Permission is granted to anyone to use this software for any purpose, 13 | // including commercial applications, and to alter it and redistribute it 14 | // freely, subject to the following restrictions: 15 | // 16 | // 1. The origin of this software must not be misrepresented; you must not 17 | // claim that you wrote the original software. If you use this software 18 | // in a product, an acknowledgment in the product documentation would be 19 | // appreciated but is not required. 20 | // 21 | // 2. Altered source versions must be plainly marked as such, and must not be 22 | // misrepresented as being the original software. 23 | // 24 | // 3. This notice may not be removed or altered from any source distribution. 25 | // 26 | 27 | #import "AELowPassModule.h" 28 | 29 | @implementation AELowPassModule 30 | 31 | - (instancetype)initWithRenderer:(AERenderer *)renderer { 32 | return [super initWithRenderer:renderer componentDescription:(AudioComponentDescription) { 33 | kAudioUnitType_Effect, kAudioUnitSubType_LowPassFilter, kAudioUnitManufacturer_Apple 34 | }]; 35 | } 36 | 37 | #pragma mark - Getters 38 | 39 | - (double)cutoffFrequency { 40 | return [self getParameterValueForId:kLowPassParam_CutoffFrequency]; 41 | } 42 | 43 | - (double)resonance { 44 | return [self getParameterValueForId:kLowPassParam_Resonance]; 45 | } 46 | 47 | 48 | #pragma mark - Setters 49 | 50 | - (void)setCutoffFrequency:(double)cutoffFrequency { 51 | [self setParameterValue: cutoffFrequency 52 | forId: kLowPassParam_CutoffFrequency]; 53 | } 54 | 55 | - (void)setResonance:(double)resonance { 56 | [self setParameterValue: resonance 57 | forId: kLowPassParam_Resonance]; 58 | } 59 | 60 | @end 61 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Modules/Processing/AELowShelfModule.h: -------------------------------------------------------------------------------- 1 | // 2 | // AELowShelfModule.h 3 | // The Amazing Audio Engine 4 | // 5 | // Created by Jeremy Flores on 4/25/13. 6 | // Copyright (c) 2015 Dream Engine Interactive, Inc and A Tasty Pixel Pty Ltd. All rights reserved. 7 | // 8 | // This software is provided 'as-is', without any express or implied 9 | // warranty. In no event will the authors be held liable for any damages 10 | // arising from the use of this software. 11 | // 12 | // Permission is granted to anyone to use this software for any purpose, 13 | // including commercial applications, and to alter it and redistribute it 14 | // freely, subject to the following restrictions: 15 | // 16 | // 1. The origin of this software must not be misrepresented; you must not 17 | // claim that you wrote the original software. If you use this software 18 | // in a product, an acknowledgment in the product documentation would be 19 | // appreciated but is not required. 20 | // 21 | // 2. Altered source versions must be plainly marked as such, and must not be 22 | // misrepresented as being the original software. 23 | // 24 | // 3. This notice may not be removed or altered from any source distribution. 25 | // 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | #import 32 | #import "AEAudioUnitModule.h" 33 | 34 | @interface AELowShelfModule : AEAudioUnitModule 35 | 36 | - (instancetype _Nullable)initWithRenderer:(AERenderer * _Nullable)renderer; 37 | 38 | //! range is from 10Hz to 200Hz. Default is 80Hz. 39 | @property (nonatomic) double cutoffFrequency; 40 | 41 | //! range is -40dB to 40dB. Default is 0dB. 42 | @property (nonatomic) double gain; 43 | 44 | @end 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Modules/Processing/AELowShelfModule.m: -------------------------------------------------------------------------------- 1 | // 2 | // AELowShelfModule.m 3 | // The Amazing Audio Engine 4 | // 5 | // Created by Jeremy Flores on 4/25/13. 6 | // Copyright (c) 2015 Dream Engine Interactive, Inc and A Tasty Pixel Pty Ltd. All rights reserved. 7 | // 8 | // This software is provided 'as-is', without any express or implied 9 | // warranty. In no event will the authors be held liable for any damages 10 | // arising from the use of this software. 11 | // 12 | // Permission is granted to anyone to use this software for any purpose, 13 | // including commercial applications, and to alter it and redistribute it 14 | // freely, subject to the following restrictions: 15 | // 16 | // 1. The origin of this software must not be misrepresented; you must not 17 | // claim that you wrote the original software. If you use this software 18 | // in a product, an acknowledgment in the product documentation would be 19 | // appreciated but is not required. 20 | // 21 | // 2. Altered source versions must be plainly marked as such, and must not be 22 | // misrepresented as being the original software. 23 | // 24 | // 3. This notice may not be removed or altered from any source distribution. 25 | // 26 | 27 | #import "AELowShelfModule.h" 28 | 29 | @implementation AELowShelfModule 30 | 31 | - (instancetype)initWithRenderer:(AERenderer *)renderer { 32 | return [super initWithRenderer:renderer componentDescription:(AudioComponentDescription) { 33 | kAudioUnitType_Effect, kAudioUnitSubType_LowShelfFilter, kAudioUnitManufacturer_Apple 34 | }]; 35 | } 36 | 37 | #pragma mark - Getters 38 | 39 | - (double)cutoffFrequency { 40 | return [self getParameterValueForId:kAULowShelfParam_CutoffFrequency]; 41 | } 42 | 43 | - (double)gain { 44 | return [self getParameterValueForId:kAULowShelfParam_Gain]; 45 | } 46 | 47 | 48 | #pragma mark - Setters 49 | 50 | - (void)setCutoffFrequency:(double)cutoffFrequency { 51 | [self setParameterValue: cutoffFrequency 52 | forId: kAULowShelfParam_CutoffFrequency]; 53 | } 54 | 55 | - (void)setGain:(double)gain { 56 | [self setParameterValue: gain 57 | forId: kAULowShelfParam_Gain]; 58 | } 59 | 60 | @end 61 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Modules/Processing/AENewTimePitchModule.h: -------------------------------------------------------------------------------- 1 | // 2 | // AENewTimePitchModule.h 3 | // The Amazing Audio Engine 4 | // 5 | // Created by Jeremy Flores on 4/27/13. 6 | // Copyright (c) 2015 Dream Engine Interactive, Inc and A Tasty Pixel Pty Ltd. All rights reserved. 7 | // 8 | // This software is provided 'as-is', without any express or implied 9 | // warranty. In no event will the authors be held liable for any damages 10 | // arising from the use of this software. 11 | // 12 | // Permission is granted to anyone to use this software for any purpose, 13 | // including commercial applications, and to alter it and redistribute it 14 | // freely, subject to the following restrictions: 15 | // 16 | // 1. The origin of this software must not be misrepresented; you must not 17 | // claim that you wrote the original software. If you use this software 18 | // in a product, an acknowledgment in the product documentation would be 19 | // appreciated but is not required. 20 | // 21 | // 2. Altered source versions must be plainly marked as such, and must not be 22 | // misrepresented as being the original software. 23 | // 24 | // 3. This notice may not be removed or altered from any source distribution. 25 | // 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | #import 32 | #import "AEAudioUnitModule.h" 33 | 34 | @interface AENewTimePitchModule : AEAudioUnitModule 35 | 36 | - (instancetype _Nullable)initWithRenderer:(AERenderer * _Nullable)renderer subrenderer:(AERenderer * _Nonnull)subrenderer; 37 | 38 | //! range is from 1/32 to 32.0. Default is 1.0. 39 | @property (nonatomic) double rate; 40 | 41 | //! range is from -2400 cents to 2400 cents. Default is 0.0 cents. 42 | @property (nonatomic) double pitch; 43 | 44 | //! range is from 3.0 to 32.0. Default is 8.0. 45 | @property (nonatomic) double overlap; 46 | 47 | //! value is either YES or NO. Default is YES. 48 | @property (nonatomic) BOOL enablePeakLocking; 49 | 50 | @end 51 | 52 | #ifdef __cplusplus 53 | } 54 | #endif 55 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Modules/Processing/AENewTimePitchModule.m: -------------------------------------------------------------------------------- 1 | // 2 | // AENewTimePitchModule.m 3 | // The Amazing Audio Engine 4 | // 5 | // Created by Jeremy Flores on 4/27/13. 6 | // Copyright (c) 2015 Dream Engine Interactive, Inc and A Tasty Pixel Pty Ltd. All rights reserved. 7 | // 8 | // This software is provided 'as-is', without any express or implied 9 | // warranty. In no event will the authors be held liable for any damages 10 | // arising from the use of this software. 11 | // 12 | // Permission is granted to anyone to use this software for any purpose, 13 | // including commercial applications, and to alter it and redistribute it 14 | // freely, subject to the following restrictions: 15 | // 16 | // 1. The origin of this software must not be misrepresented; you must not 17 | // claim that you wrote the original software. If you use this software 18 | // in a product, an acknowledgment in the product documentation would be 19 | // appreciated but is not required. 20 | // 21 | // 2. Altered source versions must be plainly marked as such, and must not be 22 | // misrepresented as being the original software. 23 | // 24 | // 3. This notice may not be removed or altered from any source distribution. 25 | // 26 | 27 | #import "AENewTimePitchModule.h" 28 | 29 | @implementation AENewTimePitchModule 30 | 31 | - (instancetype)initWithRenderer:(AERenderer *)renderer subrenderer:(AERenderer *)subrenderer { 32 | return [super initWithRenderer:renderer componentDescription:(AudioComponentDescription) { 33 | kAudioUnitType_FormatConverter, kAudioUnitSubType_NewTimePitch, kAudioUnitManufacturer_Apple 34 | } subrenderer:subrenderer]; 35 | } 36 | 37 | #pragma mark - Getters 38 | 39 | - (double)rate { 40 | return [self getParameterValueForId:kNewTimePitchParam_Rate]; 41 | } 42 | 43 | - (double)pitch { 44 | return [self getParameterValueForId:kNewTimePitchParam_Pitch]; 45 | } 46 | 47 | - (double)overlap { 48 | return [self getParameterValueForId:kNewTimePitchParam_Overlap]; 49 | } 50 | 51 | - (BOOL)enablePeakLocking { 52 | return [self getParameterValueForId:kNewTimePitchParam_EnablePeakLocking]; 53 | } 54 | 55 | 56 | #pragma mark - Setters 57 | 58 | - (void)setRate:(double)rate { 59 | [self setParameterValue: rate 60 | forId: kNewTimePitchParam_Rate]; 61 | } 62 | 63 | - (void)setPitch:(double)pitch { 64 | [self setParameterValue: pitch 65 | forId: kNewTimePitchParam_Pitch]; 66 | } 67 | 68 | - (void)setOverlap:(double)overlap { 69 | [self setParameterValue: overlap 70 | forId: kNewTimePitchParam_Overlap]; 71 | } 72 | 73 | - (void)setEnablePeakLocking:(BOOL)enablePeakLocking { 74 | [self setParameterValue: enablePeakLocking 75 | forId: kNewTimePitchParam_EnablePeakLocking]; 76 | } 77 | 78 | @end 79 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Modules/Processing/AEParametricEqModule.h: -------------------------------------------------------------------------------- 1 | // 2 | // AEParametricEqModule.h 3 | // The Amazing Audio Engine 4 | // 5 | // Created by Jeremy Flores on 4/25/13. 6 | // Copyright (c) 2015 Dream Engine Interactive, Inc and A Tasty Pixel Pty Ltd. All rights reserved. 7 | // 8 | // This software is provided 'as-is', without any express or implied 9 | // warranty. In no event will the authors be held liable for any damages 10 | // arising from the use of this software. 11 | // 12 | // Permission is granted to anyone to use this software for any purpose, 13 | // including commercial applications, and to alter it and redistribute it 14 | // freely, subject to the following restrictions: 15 | // 16 | // 1. The origin of this software must not be misrepresented; you must not 17 | // claim that you wrote the original software. If you use this software 18 | // in a product, an acknowledgment in the product documentation would be 19 | // appreciated but is not required. 20 | // 21 | // 2. Altered source versions must be plainly marked as such, and must not be 22 | // misrepresented as being the original software. 23 | // 24 | // 3. This notice may not be removed or altered from any source distribution. 25 | // 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | #import 32 | #import "AEAudioUnitModule.h" 33 | 34 | @interface AEParametricEqModule : AEAudioUnitModule 35 | 36 | - (instancetype _Nullable)initWithRenderer:(AERenderer * _Nullable)renderer; 37 | 38 | //! range is from 20Hz to ($SAMPLERATE/2) Hz. Default is 2000 Hz. 39 | @property (nonatomic) double centerFrequency; 40 | 41 | //! range is from 0.1Hz to 20Hz. Default is 1.0Hz. 42 | @property (nonatomic) double qFactor; 43 | 44 | //! range is from -20dB to 20dB. Default is 0dB. 45 | @property (nonatomic) double gain; 46 | 47 | @end 48 | 49 | #ifdef __cplusplus 50 | } 51 | #endif 52 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Modules/Processing/AEParametricEqModule.m: -------------------------------------------------------------------------------- 1 | // 2 | // AEParametricEqModule.m 3 | // The Amazing Audio Engine 4 | // 5 | // Created by Jeremy Flores on 4/25/13. 6 | // Copyright (c) 2015 Dream Engine Interactive, Inc and A Tasty Pixel Pty Ltd. All rights reserved. 7 | // 8 | // This software is provided 'as-is', without any express or implied 9 | // warranty. In no event will the authors be held liable for any damages 10 | // arising from the use of this software. 11 | // 12 | // Permission is granted to anyone to use this software for any purpose, 13 | // including commercial applications, and to alter it and redistribute it 14 | // freely, subject to the following restrictions: 15 | // 16 | // 1. The origin of this software must not be misrepresented; you must not 17 | // claim that you wrote the original software. If you use this software 18 | // in a product, an acknowledgment in the product documentation would be 19 | // appreciated but is not required. 20 | // 21 | // 2. Altered source versions must be plainly marked as such, and must not be 22 | // misrepresented as being the original software. 23 | // 24 | // 3. This notice may not be removed or altered from any source distribution. 25 | // 26 | 27 | #import "AEParametricEqModule.h" 28 | 29 | @implementation AEParametricEqModule 30 | 31 | - (instancetype)initWithRenderer:(AERenderer *)renderer { 32 | return [super initWithRenderer:renderer componentDescription:(AudioComponentDescription) { 33 | kAudioUnitType_Effect, kAudioUnitSubType_ParametricEQ, kAudioUnitManufacturer_Apple 34 | }]; 35 | } 36 | 37 | #pragma mark - Getters 38 | 39 | - (double)centerFrequency { 40 | return [self getParameterValueForId:kParametricEQParam_CenterFreq]; 41 | } 42 | 43 | - (double)qFactor { 44 | return [self getParameterValueForId:kParametricEQParam_Q]; 45 | } 46 | 47 | - (double)gain { 48 | return [self getParameterValueForId:kParametricEQParam_Gain]; 49 | } 50 | 51 | 52 | #pragma mark - Setters 53 | 54 | - (void)setCenterFrequency:(double)centerFrequency { 55 | [self setParameterValue: centerFrequency 56 | forId: kParametricEQParam_CenterFreq]; 57 | } 58 | 59 | - (void)setQFactor:(double)qFactor { 60 | [self setParameterValue: qFactor 61 | forId: kParametricEQParam_Q]; 62 | } 63 | 64 | - (void)setGain:(double)gain { 65 | [self setParameterValue: gain 66 | forId: kParametricEQParam_Gain]; 67 | } 68 | 69 | @end 70 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Modules/Processing/AEPeakLimiterModule.h: -------------------------------------------------------------------------------- 1 | // 2 | // AEPeakLimiterModule.h 3 | // The Amazing Audio Engine 4 | // 5 | // Created by Jeremy Flores on 4/25/13. 6 | // Copyright (c) 2015 Dream Engine Interactive, Inc and A Tasty Pixel Pty Ltd. All rights reserved. 7 | // 8 | // This software is provided 'as-is', without any express or implied 9 | // warranty. In no event will the authors be held liable for any damages 10 | // arising from the use of this software. 11 | // 12 | // Permission is granted to anyone to use this software for any purpose, 13 | // including commercial applications, and to alter it and redistribute it 14 | // freely, subject to the following restrictions: 15 | // 16 | // 1. The origin of this software must not be misrepresented; you must not 17 | // claim that you wrote the original software. If you use this software 18 | // in a product, an acknowledgment in the product documentation would be 19 | // appreciated but is not required. 20 | // 21 | // 2. Altered source versions must be plainly marked as such, and must not be 22 | // misrepresented as being the original software. 23 | // 24 | // 3. This notice may not be removed or altered from any source distribution. 25 | // 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | #import 32 | #import "AEAudioUnitModule.h" 33 | 34 | @interface AEPeakLimiterModule : AEAudioUnitModule 35 | 36 | - (instancetype _Nullable)initWithRenderer:(AERenderer * _Nullable)renderer; 37 | 38 | //! range is from 0.001 to 0.03 seconds. Default is 0.012 seconds. 39 | @property (nonatomic) double attackTime; 40 | 41 | //! range is from 0.001 to 0.06 seconds. Default is 0.024 seconds. 42 | @property (nonatomic) double decayTime; 43 | 44 | //! range is from -40dB to 40dB. Default is 0dB. 45 | @property (nonatomic) double preGain; 46 | 47 | @end 48 | 49 | #ifdef __cplusplus 50 | } 51 | #endif 52 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Modules/Processing/AEPeakLimiterModule.m: -------------------------------------------------------------------------------- 1 | // 2 | // AEPeakLimiterModule.m 3 | // The Amazing Audio Engine 4 | // 5 | // Created by Jeremy Flores on 4/25/13. 6 | // Copyright (c) 2015 Dream Engine Interactive, Inc and A Tasty Pixel Pty Ltd. All rights reserved. 7 | // 8 | // This software is provided 'as-is', without any express or implied 9 | // warranty. In no event will the authors be held liable for any damages 10 | // arising from the use of this software. 11 | // 12 | // Permission is granted to anyone to use this software for any purpose, 13 | // including commercial applications, and to alter it and redistribute it 14 | // freely, subject to the following restrictions: 15 | // 16 | // 1. The origin of this software must not be misrepresented; you must not 17 | // claim that you wrote the original software. If you use this software 18 | // in a product, an acknowledgment in the product documentation would be 19 | // appreciated but is not required. 20 | // 21 | // 2. Altered source versions must be plainly marked as such, and must not be 22 | // misrepresented as being the original software. 23 | // 24 | // 3. This notice may not be removed or altered from any source distribution. 25 | // 26 | 27 | #import "AEPeakLimiterModule.h" 28 | 29 | @implementation AEPeakLimiterModule 30 | 31 | - (instancetype)initWithRenderer:(AERenderer *)renderer { 32 | return [super initWithRenderer:renderer componentDescription:(AudioComponentDescription) { 33 | kAudioUnitType_Effect, kAudioUnitSubType_PeakLimiter, kAudioUnitManufacturer_Apple 34 | }]; 35 | } 36 | 37 | #pragma mark - Getters 38 | 39 | - (double)attackTime { 40 | return [self getParameterValueForId:kLimiterParam_AttackTime]; 41 | } 42 | 43 | - (double)decayTime { 44 | return [self getParameterValueForId:kLimiterParam_DecayTime]; 45 | } 46 | 47 | - (double)preGain { 48 | return [self getParameterValueForId:kLimiterParam_PreGain]; 49 | } 50 | 51 | 52 | #pragma mark - Setters 53 | 54 | - (void)setAttackTime:(double)attackTime { 55 | [self setParameterValue: attackTime 56 | forId: kLimiterParam_AttackTime]; 57 | } 58 | 59 | - (void)setDecayTime:(double)decayTime { 60 | [self setParameterValue: decayTime 61 | forId: kLimiterParam_DecayTime]; 62 | } 63 | 64 | - (void)setPreGain:(double)preGain { 65 | [self setParameterValue: preGain 66 | forId: kLimiterParam_PreGain]; 67 | } 68 | 69 | @end 70 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Modules/Processing/AEReverbModule.h: -------------------------------------------------------------------------------- 1 | // 2 | // AEReverbModule.h 3 | // The Amazing Audio Engine 4 | // 5 | // Created by Jeremy Flores on 4/25/13. 6 | // Copyright (c) 2015 Dream Engine Interactive, Inc and A Tasty Pixel Pty Ltd. All rights reserved. 7 | // 8 | // This software is provided 'as-is', without any express or implied 9 | // warranty. In no event will the authors be held liable for any damages 10 | // arising from the use of this software. 11 | // 12 | // Permission is granted to anyone to use this software for any purpose, 13 | // including commercial applications, and to alter it and redistribute it 14 | // freely, subject to the following restrictions: 15 | // 16 | // 1. The origin of this software must not be misrepresented; you must not 17 | // claim that you wrote the original software. If you use this software 18 | // in a product, an acknowledgment in the product documentation would be 19 | // appreciated but is not required. 20 | // 21 | // 2. Altered source versions must be plainly marked as such, and must not be 22 | // misrepresented as being the original software. 23 | // 24 | // 3. This notice may not be removed or altered from any source distribution. 25 | // 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | #import 32 | #import "AEAudioUnitModule.h" 33 | 34 | @interface AEReverbModule : AEAudioUnitModule 35 | 36 | - (instancetype _Nullable)initWithRenderer:(AERenderer * _Nullable)renderer; 37 | 38 | //! range is from 0 to 100 (percentage). Default is 0. 39 | @property (nonatomic) double dryWetMix; 40 | 41 | //! range is from -20dB to 20dB. Default is 0dB. 42 | @property (nonatomic) double gain; 43 | 44 | //! range is from 0.0001 to 1.0 seconds. Default is 0.008 seconds. 45 | @property (nonatomic) double minDelayTime; 46 | 47 | //! range is from 0.0001 to 1.0 seconds. Default is 0.050 seconds. 48 | @property (nonatomic) double maxDelayTime; 49 | 50 | //! range is from 0.001 to 20.0 seconds. Default is 1.0 seconds. 51 | @property (nonatomic) double decayTimeAt0Hz; 52 | 53 | //! range is from 0.001 to 20.0 seconds. Default is 0.5 seconds. 54 | @property (nonatomic) double decayTimeAtNyquist; 55 | 56 | //! range is from 1 to 1000 (unitless). Default is 1. 57 | @property (nonatomic) double randomizeReflections; 58 | 59 | @end 60 | 61 | #ifdef __cplusplus 62 | } 63 | #endif 64 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Modules/Processing/AEReverbModule.m: -------------------------------------------------------------------------------- 1 | // 2 | // AEReverbModule.m 3 | // The Amazing Audio Engine 4 | // 5 | // Created by Jeremy Flores on 4/25/13. 6 | // Copyright (c) 2015 Dream Engine Interactive, Inc and A Tasty Pixel Pty Ltd. All rights reserved. 7 | // 8 | // This software is provided 'as-is', without any express or implied 9 | // warranty. In no event will the authors be held liable for any damages 10 | // arising from the use of this software. 11 | // 12 | // Permission is granted to anyone to use this software for any purpose, 13 | // including commercial applications, and to alter it and redistribute it 14 | // freely, subject to the following restrictions: 15 | // 16 | // 1. The origin of this software must not be misrepresented; you must not 17 | // claim that you wrote the original software. If you use this software 18 | // in a product, an acknowledgment in the product documentation would be 19 | // appreciated but is not required. 20 | // 21 | // 2. Altered source versions must be plainly marked as such, and must not be 22 | // misrepresented as being the original software. 23 | // 24 | // 3. This notice may not be removed or altered from any source distribution. 25 | // 26 | 27 | #import "AEReverbModule.h" 28 | 29 | @implementation AEReverbModule 30 | 31 | - (instancetype)initWithRenderer:(AERenderer *)renderer { 32 | return [super initWithRenderer:renderer componentDescription:(AudioComponentDescription) { 33 | kAudioUnitType_Effect, kAudioUnitSubType_Reverb2, kAudioUnitManufacturer_Apple 34 | }]; 35 | } 36 | 37 | #pragma mark - Getters 38 | 39 | - (double)dryWetMix { 40 | return [self getParameterValueForId:kReverb2Param_DryWetMix]; 41 | } 42 | 43 | - (double)gain { 44 | return [self getParameterValueForId:kReverb2Param_Gain]; 45 | } 46 | 47 | - (double)minDelayTime { 48 | return [self getParameterValueForId:kReverb2Param_MinDelayTime]; 49 | } 50 | 51 | - (double)maxDelayTime { 52 | return [self getParameterValueForId:kReverb2Param_MaxDelayTime]; 53 | } 54 | 55 | - (double)decayTimeAt0Hz { 56 | return [self getParameterValueForId:kReverb2Param_DecayTimeAt0Hz]; 57 | } 58 | 59 | - (double)decayTimeAtNyquist { 60 | return [self getParameterValueForId:kReverb2Param_DecayTimeAtNyquist]; 61 | } 62 | 63 | - (double)randomizeReflections { 64 | return [self getParameterValueForId:kReverb2Param_RandomizeReflections]; 65 | } 66 | 67 | #pragma mark - Setters 68 | 69 | - (void)setDryWetMix:(double)dryWetMix { 70 | [self setParameterValue: dryWetMix 71 | forId: kReverb2Param_DryWetMix]; 72 | } 73 | 74 | - (void)setGain:(double)gain { 75 | [self setParameterValue: gain 76 | forId: kReverb2Param_Gain]; 77 | } 78 | 79 | - (void)setMinDelayTime:(double)minDelayTime { 80 | [self setParameterValue: minDelayTime 81 | forId: kReverb2Param_MinDelayTime]; 82 | } 83 | 84 | - (void)setMaxDelayTime:(double)maxDelayTime { 85 | [self setParameterValue: maxDelayTime 86 | forId: kReverb2Param_MaxDelayTime]; 87 | } 88 | 89 | - (void)setDecayTimeAt0Hz:(double)decayTimeAt0Hz { 90 | [self setParameterValue: decayTimeAt0Hz 91 | forId: kReverb2Param_DecayTimeAt0Hz]; 92 | } 93 | 94 | - (void)setDecayTimeAtNyquist:(double)decayTimeAtNyquist { 95 | [self setParameterValue: decayTimeAtNyquist 96 | forId: kReverb2Param_DecayTimeAtNyquist]; 97 | } 98 | 99 | - (void)setRandomizeReflections:(double)randomizeReflections { 100 | [self setParameterValue: randomizeReflections 101 | forId: kReverb2Param_RandomizeReflections]; 102 | } 103 | 104 | @end 105 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Modules/Processing/AESampleRateConverter.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | /** 4 | * A processing module that converts the sample rate and number of channels. In this module the 5 | * subrenderer sample rate and number of channels is decoupled from the renderer sample rate and 6 | * number of channels. 7 | */ 8 | @interface AESampleRateConverterModule : AEAudioUnitModule 9 | 10 | - (instancetype _Nullable)initWithRenderer:(AERenderer* _Nullable)renderer 11 | subrenderer:(AERenderer* _Nonnull)subrenderer; 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Modules/Processing/AESampleRateConverter.m: -------------------------------------------------------------------------------- 1 | #import "AESampleRateConverterModule.h" 2 | 3 | @implementation AESampleRateConverterModule 4 | 5 | - (instancetype)initWithRenderer:(AERenderer *)renderer subrenderer:(AERenderer *)subrenderer { 6 | AudioComponentDescription description = {kAudioUnitType_FormatConverter, 7 | kAudioUnitSubType_AUConverter, 8 | kAudioUnitManufacturer_Apple, 0, 0}; 9 | // Superclass smashes subrenderer sample rate. Save it. 10 | double subrendererSampleRate = subrenderer.sampleRate; 11 | self = [super initWithRenderer:renderer componentDescription:description subrenderer:subrenderer]; 12 | if (self) { 13 | // Restore subrenderer sample rate. 14 | subrenderer.sampleRate = subrendererSampleRate; 15 | [self rendererDidChangeSampleRate]; 16 | } 17 | return self; 18 | } 19 | 20 | - (void)rendererDidChangeSampleRate { 21 | // Update the sample rate 22 | AECheckOSStatus(AudioUnitUninitialize(self.audioUnit), "AudioUnitUninitialize"); 23 | AudioStreamBasicDescription outputAudioDescription = AEAudioDescription; 24 | outputAudioDescription.mSampleRate = self.renderer.sampleRate; 25 | AECheckOSStatus( 26 | AudioUnitSetProperty(self.audioUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Output, 27 | 0, &outputAudioDescription, sizeof(outputAudioDescription)), 28 | "AudioUnitSetProperty(kAudioUnitProperty_StreamFormat)"); 29 | 30 | if (self.hasInput) { 31 | AudioStreamBasicDescription inputAudioDescription = outputAudioDescription; 32 | if (self.subrenderer) { 33 | inputAudioDescription.mSampleRate = self.subrenderer.sampleRate; 34 | inputAudioDescription.mChannelsPerFrame = self.subrenderer.numberOfOutputChannels; 35 | } 36 | AECheckOSStatus( 37 | AudioUnitSetProperty(self.audioUnit, kAudioUnitProperty_StreamFormat, kAudioUnitScope_Input, 38 | 0, &inputAudioDescription, sizeof(inputAudioDescription)), 39 | "AudioUnitSetProperty(kAudioUnitProperty_StreamFormat)"); 40 | } 41 | [self initialize]; 42 | } 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Modules/Processing/AEVarispeedModule.h: -------------------------------------------------------------------------------- 1 | // 2 | // AEVarispeedModule.h 3 | // The Amazing Audio Engine 4 | // 5 | // Created by Jeremy Flores on 4/26/13. 6 | // Copyright (c) 2015 Dream Engine Interactive, Inc and A Tasty Pixel Pty Ltd. All rights reserved. 7 | // 8 | // This software is provided 'as-is', without any express or implied 9 | // warranty. In no event will the authors be held liable for any damages 10 | // arising from the use of this software. 11 | // 12 | // Permission is granted to anyone to use this software for any purpose, 13 | // including commercial applications, and to alter it and redistribute it 14 | // freely, subject to the following restrictions: 15 | // 16 | // 1. The origin of this software must not be misrepresented; you must not 17 | // claim that you wrote the original software. If you use this software 18 | // in a product, an acknowledgment in the product documentation would be 19 | // appreciated but is not required. 20 | // 21 | // 2. Altered source versions must be plainly marked as such, and must not be 22 | // misrepresented as being the original software. 23 | // 24 | // 3. This notice may not be removed or altered from any source distribution. 25 | // 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | #import 32 | #import "AEAudioUnitModule.h" 33 | 34 | @interface AEVarispeedModule : AEAudioUnitModule 35 | 36 | - (instancetype _Nullable)initWithRenderer:(AERenderer * _Nullable)renderer subrenderer:(AERenderer * _Nonnull)subrenderer; 37 | 38 | //! documented range is from 0.25 to 4.0, but empircal testing shows it to be 0.25 to 2.0. Default is 1.0. 39 | @property (nonatomic) double playbackRate; 40 | 41 | //! range is from -2400 to 2400. Default is 0.0. 42 | @property (nonatomic) double playbackCents; 43 | 44 | @end 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Modules/Processing/AEVarispeedModule.m: -------------------------------------------------------------------------------- 1 | // 2 | // AEVarispeedModule.m 3 | // The Amazing Audio Engine 4 | // 5 | // Created by Jeremy Flores on 4/26/13. 6 | // Copyright (c) 2015 Dream Engine Interactive, Inc and A Tasty Pixel Pty Ltd. All rights reserved. 7 | // 8 | // This software is provided 'as-is', without any express or implied 9 | // warranty. In no event will the authors be held liable for any damages 10 | // arising from the use of this software. 11 | // 12 | // Permission is granted to anyone to use this software for any purpose, 13 | // including commercial applications, and to alter it and redistribute it 14 | // freely, subject to the following restrictions: 15 | // 16 | // 1. The origin of this software must not be misrepresented; you must not 17 | // claim that you wrote the original software. If you use this software 18 | // in a product, an acknowledgment in the product documentation would be 19 | // appreciated but is not required. 20 | // 21 | // 2. Altered source versions must be plainly marked as such, and must not be 22 | // misrepresented as being the original software. 23 | // 24 | // 3. This notice may not be removed or altered from any source distribution. 25 | // 26 | 27 | #import "AEVarispeedModule.h" 28 | 29 | @implementation AEVarispeedModule 30 | 31 | - (instancetype)initWithRenderer:(AERenderer *)renderer subrenderer:(AERenderer *)subrenderer { 32 | return [super initWithRenderer:renderer componentDescription:(AudioComponentDescription) { 33 | kAudioUnitType_FormatConverter, kAudioUnitSubType_Varispeed, kAudioUnitManufacturer_Apple 34 | } subrenderer:subrenderer]; 35 | } 36 | 37 | #pragma mark - Getters 38 | 39 | - (double)playbackRate { 40 | return [self getParameterValueForId:kVarispeedParam_PlaybackRate]; 41 | } 42 | 43 | - (double)playbackCents { 44 | return [self getParameterValueForId:kVarispeedParam_PlaybackCents]; 45 | } 46 | 47 | 48 | #pragma mark - Setters 49 | 50 | - (void)setPlaybackRate:(double)playbackRate { 51 | [self setParameterValue: playbackRate 52 | forId: kVarispeedParam_PlaybackRate]; 53 | } 54 | 55 | - (void)setPlaybackCents:(double)playbackCents { 56 | [self setParameterValue: playbackCents 57 | forId: kVarispeedParam_PlaybackCents]; 58 | } 59 | 60 | @end 61 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Utilities/AEAudioDevice.h: -------------------------------------------------------------------------------- 1 | // 2 | // AEAudioDevice.h 3 | // TheAmazingAudioEngine macOS 4 | // 5 | // Created by Michael Tyson on 28/7/2022. 6 | // Copyright © 2022 A Tasty Pixel. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | extern NSString * const AEAudioDeviceDefaultInputDeviceChangedNotification; 15 | extern NSString * const AEAudioDeviceDefaultOutputDeviceChangedNotification; 16 | extern NSString * const AEAudioDeviceAvailableDevicesChangedNotification; 17 | 18 | @interface AEAudioDevice : NSObject 19 | + (NSArray *)availableAudioDevices; 20 | + (AEAudioDevice *)defaultInputAudioDevice; 21 | + (AEAudioDevice *)defaultOutputAudioDevice; 22 | + (AEAudioDevice *)audioDeviceWithUID:(NSString *)UID; 23 | 24 | - (double)closestSupportedSampleRateTo:(double)sampleRate; 25 | 26 | @property (nonatomic, readonly) BOOL isDefault; 27 | @property (nonatomic, readonly) AudioObjectID objectID; 28 | @property (nonatomic, strong, readonly) NSString * UID; 29 | @property (nonatomic, strong, readonly) NSString * name; 30 | @property (nonatomic, readonly) BOOL hasInput; 31 | @property (nonatomic, readonly) BOOL hasOutput; 32 | @property (nonatomic, readonly) AudioStreamBasicDescription inputStreamFormat; 33 | @property (nonatomic, readonly) AudioStreamBasicDescription outputStreamFormat; 34 | @property (nonatomic) UInt32 inputBufferDuration; 35 | @property (nonatomic) UInt32 outputBufferDuration; 36 | @property (nonatomic, strong, readonly) NSArray * supportedSampleRates; //!< Array of AudioValueRange structs 37 | @property (nonatomic) double sampleRate; 38 | @end 39 | 40 | NS_ASSUME_NONNULL_END 41 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Utilities/AEAudioThreadEndpoint.h: -------------------------------------------------------------------------------- 1 | // 2 | // AEAudioThreadEndpoint.h 3 | // TheAmazingAudioEngine 4 | // 5 | // Created by Michael Tyson on 29/04/2016. 6 | // Copyright © 2016 A Tasty Pixel. All rights reserved. 7 | // 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | #import 14 | #import "AETime.h" 15 | 16 | /*! 17 | * Handler block 18 | * 19 | * Provide a block matching this description to the initializer to handle incoming 20 | * messages. It will be called on the audio thread. 21 | * 22 | * @param data Message data (or NULL) 23 | * @param length Length of message 24 | */ 25 | typedef void (^AEAudioThreadEndpointHandler)(const void * _Nullable data, size_t length); 26 | 27 | /*! 28 | * Audio thread message endpoint 29 | * 30 | * This class implements a mechanism to poll for messages from the main thread upon 31 | * the audio thread. Initialize an instance and begin calling AEAudioThreadEndpointPoll 32 | * from your render loop. Then use sendBytes:length: from the main thread to send a message 33 | * to the audio thread. 34 | * 35 | * Use this utility to perform synchronization across the audio and main threads. 36 | * 37 | * You can also use the AEMainThreadEndpoint class to perform messaging in the reverse 38 | * direction. 39 | */ 40 | @interface AEAudioThreadEndpoint : NSObject 41 | 42 | /*! 43 | * Default initializer 44 | * 45 | * @param handler The handler block to use for incoming messages 46 | */ 47 | - (instancetype _Nullable)initWithHandler:(AEAudioThreadEndpointHandler _Nonnull)handler; 48 | 49 | /*! 50 | * Initializer with custom buffer capacity 51 | * 52 | * @param handler The handler block to use for incoming messages 53 | * @param bufferCapacity The buffer capacity, in bytes (default is 8192 bytes). Note that 54 | * due to the underlying implementation, actual capacity may be larger. 55 | */ 56 | - (instancetype _Nullable)initWithHandler:(AEAudioThreadEndpointHandler _Nonnull)handler bufferCapacity:(size_t)bufferCapacity; 57 | 58 | /*! 59 | * Poll for messages 60 | * 61 | * Call this regularly from your render loop on the audio thread to check for incoming 62 | * messages. 63 | * 64 | * @param endpoint The endpoint instance 65 | */ 66 | void AEAudioThreadEndpointPoll(__unsafe_unretained AEAudioThreadEndpoint * _Nonnull endpoint); 67 | 68 | /*! 69 | * Send a message to the audio thread endpoint 70 | * 71 | * Use this on the main thread to send messages to the endpoint instance. It will be 72 | * received and handled on the audio thread at the next poll interval. 73 | * 74 | * @param bytes Message data (or NULL) to copy 75 | * @param length Length of message data 76 | * @return YES if message sent successfully, NO if there was insufficient buffer space 77 | */ 78 | - (BOOL)sendBytes:(const void * _Nullable)bytes length:(size_t)length; 79 | 80 | /*! 81 | * Prepare a new message 82 | * 83 | * Use this method to gain access to a writable message buffer of the given length, 84 | * to assemble the message in multiple parts. Then call dispatchMessage to 85 | * dispatch. 86 | * 87 | * @param length Length of message data 88 | * @return A pointer to message bytes ready for writing, or NULL if there was insufficient buffer space 89 | */ 90 | - (void * _Nullable)createMessageWithLength:(size_t)length; 91 | 92 | /*! 93 | * Dispatch a message created with createMessageWithLength: 94 | */ 95 | - (void)dispatchMessage; 96 | 97 | /*! 98 | * Begins a group of messages to be performed consecutively. 99 | * 100 | * Messages sent using sendBytes:length: between calls to this method and endMessageGroup 101 | * will be performed consecutively on the main thread during a single poll interval. 102 | */ 103 | - (void)beginMessageGroup; 104 | 105 | /*! 106 | * Ends a consecutive group of messages 107 | */ 108 | - (void)endMessageGroup; 109 | 110 | @end 111 | 112 | #ifdef __cplusplus 113 | } 114 | #endif 115 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Utilities/AEAudioThreadEndpoint.m: -------------------------------------------------------------------------------- 1 | // 2 | // AEAudioThreadEndpoint.m 3 | // TheAmazingAudioEngine 4 | // 5 | // Created by Michael Tyson on 29/04/2016. 6 | // Copyright © 2016 A Tasty Pixel. All rights reserved. 7 | // 8 | 9 | #import "AEAudioThreadEndpoint.h" 10 | #import "TPCircularBuffer.h" 11 | 12 | @interface AEAudioThreadEndpoint () { 13 | TPCircularBuffer _buffer; 14 | int _groupNestCount; 15 | int32_t _groupLength; 16 | } 17 | @property (nonatomic, copy) AEAudioThreadEndpointHandler handler; 18 | @end 19 | 20 | @implementation AEAudioThreadEndpoint 21 | 22 | - (instancetype)initWithHandler:(AEAudioThreadEndpointHandler)handler { 23 | return [self initWithHandler:handler bufferCapacity:8192]; 24 | } 25 | 26 | - (instancetype)initWithHandler:(AEAudioThreadEndpointHandler)handler bufferCapacity:(size_t)bufferCapacity { 27 | if ( !(self = [super init]) ) return nil; 28 | 29 | self.handler = handler; 30 | 31 | if ( !TPCircularBufferInit(&_buffer, (int32_t)bufferCapacity) ) { 32 | return nil; 33 | } 34 | 35 | return self; 36 | } 37 | 38 | - (void)dealloc { 39 | TPCircularBufferCleanup(&_buffer); 40 | } 41 | 42 | void AEAudioThreadEndpointPoll(__unsafe_unretained AEAudioThreadEndpoint * _Nonnull THIS) { 43 | while ( 1 ) { 44 | // Get pointer to readable bytes 45 | int32_t availableBytes; 46 | void * tail = TPCircularBufferTail(&THIS->_buffer, &availableBytes); 47 | if ( availableBytes == 0 ) return; 48 | 49 | // Get length and data 50 | size_t length = *((size_t*)tail); 51 | void * data = length > 0 ? (tail + sizeof(size_t)) : NULL; 52 | 53 | // Run handler 54 | THIS->_handler(data, length); 55 | 56 | // Mark as read 57 | TPCircularBufferConsume(&THIS->_buffer, (int32_t)(sizeof(size_t) + length)); 58 | } 59 | } 60 | 61 | - (BOOL)sendBytes:(const void *)bytes length:(size_t)length { 62 | // Prepare message 63 | void * message = [self createMessageWithLength:length]; 64 | if ( !message ) { 65 | return NO; 66 | } 67 | 68 | if ( length ) { 69 | // Copy data 70 | memcpy(message, bytes, length); 71 | } 72 | 73 | // Dispatch 74 | [self dispatchMessage]; 75 | 76 | return YES; 77 | } 78 | 79 | - (void *)createMessageWithLength:(size_t)length { 80 | // Get pointer to writable bytes 81 | int32_t size = (int32_t)(length + sizeof(size_t)); 82 | int32_t availableBytes; 83 | void * head = TPCircularBufferHead(&_buffer, &availableBytes); 84 | if ( availableBytes < size + (_groupNestCount > 0 ? _groupLength : 0) ) { 85 | return nil; 86 | } 87 | 88 | if ( _groupNestCount > 0 ) { 89 | // If we're grouping messages, write to end of group 90 | head += _groupLength; 91 | } 92 | 93 | // Write to buffer: the length of the message, and the message data 94 | *((size_t*)head) = length; 95 | 96 | // Return the following region ready for writing 97 | return head + sizeof(size_t); 98 | } 99 | 100 | -(void)dispatchMessage { 101 | // Get pointer to writable bytes 102 | int32_t availableBytes; 103 | void * head = TPCircularBufferHead(&_buffer, &availableBytes); 104 | if ( _groupNestCount > 0 ) { 105 | // If we're grouping messages, write to end of group 106 | head += _groupLength; 107 | } 108 | 109 | size_t size = *((size_t*)head) + sizeof(size_t); 110 | 111 | if ( _groupNestCount == 0 ) { 112 | TPCircularBufferProduce(&_buffer, (int32_t)size); 113 | } else { 114 | _groupLength += size; 115 | } 116 | } 117 | 118 | - (void)beginMessageGroup { 119 | _groupNestCount++; 120 | } 121 | 122 | - (void)endMessageGroup { 123 | _groupNestCount--; 124 | 125 | if ( _groupNestCount == 0 && _groupLength > 0 ) { 126 | TPCircularBufferProduce(&_buffer, _groupLength); 127 | _groupLength = 0; 128 | } 129 | } 130 | 131 | @end 132 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Utilities/AERealtimeWatchdog-arm64.s: -------------------------------------------------------------------------------- 1 | // 2 | // AERealtimeWatchdog-arm64.c 3 | // TheAmazingAudioEngine 4 | // 5 | // Created by Michael Tyson on 12/06/2016. 6 | // Copyright © 2016 A Tasty Pixel. All rights reserved. 7 | // 8 | // This software is provided 'as-is', without any express or implied 9 | // warranty. In no event will the authors be held liable for any damages 10 | // arising from the use of this software. 11 | // 12 | // Permission is granted to anyone to use this software for any purpose, 13 | // including commercial applications, and to alter it and redistribute it 14 | // freely, subject to the following restrictions: 15 | // 16 | // 1. The origin of this software must not be misrepresented; you must not 17 | // claim that you wrote the original software. If you use this software 18 | // in a product, an acknowledgment in the product documentation would be 19 | // appreciated but is not required. 20 | // 21 | // 2. Altered source versions must be plainly marked as such, and must not be 22 | // misrepresented as being the original software. 23 | // 24 | // 3. This notice may not be removed or altered from any source distribution. 25 | // 26 | // 27 | /* 28 | * Portions Copyright (c) 1999-2007 Apple Inc. All Rights Reserved. 29 | * 30 | * This file contains Original Code and/or Modifications of Original Code 31 | * as defined in and that are subject to the Apple Public Source License 32 | * Version 2.0 (the 'License'). You may not use this file except in 33 | * compliance with the License. Please obtain a copy of the License at 34 | * http://www.opensource.apple.com/apsl/ and read it before using this 35 | * file. 36 | * 37 | * The Original Code and all software distributed under the License are 38 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 39 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 40 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 41 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 42 | * Please see the License for the specific language governing rights and 43 | * limitations under the License. 44 | */ 45 | 46 | #include "AERealtimeWatchdog.h" 47 | #if __arm64__ && REALTIME_WATCHDOG_ENABLED 48 | 49 | #include 50 | 51 | .text 52 | .align 5 53 | .globl _objc_msgSend 54 | _objc_msgSend: 55 | // Push frame 56 | stp fp, lr, [sp, #-16]! 57 | mov fp, sp 58 | 59 | // Save the parameter registers: x0..x8, q0..q7 60 | sub sp, sp, #(10*8 + 8*16) 61 | stp q0, q1, [sp, #(0*16)] 62 | stp q2, q3, [sp, #(2*16)] 63 | stp q4, q5, [sp, #(4*16)] 64 | stp q6, q7, [sp, #(6*16)] 65 | stp x0, x1, [sp, #(8*16+0*8)] 66 | stp x2, x3, [sp, #(8*16+2*8)] 67 | stp x4, x5, [sp, #(8*16+4*8)] 68 | stp x6, x7, [sp, #(8*16+6*8)] 69 | str x8, [sp, #(8*16+8*8)] 70 | 71 | // Look up the real objc_msgSend 72 | bl _AERealtimeWatchdogLookupMsgSendAndWarn 73 | 74 | // imp in x0 75 | mov x17, x0 76 | 77 | // Restore registers and stack frame 78 | ldp q0, q1, [sp, #(0*16)] 79 | ldp q2, q3, [sp, #(2*16)] 80 | ldp q4, q5, [sp, #(4*16)] 81 | ldp q6, q7, [sp, #(6*16)] 82 | ldp x0, x1, [sp, #(8*16+0*8)] 83 | ldp x2, x3, [sp, #(8*16+2*8)] 84 | ldp x4, x5, [sp, #(8*16+4*8)] 85 | ldp x6, x7, [sp, #(8*16+6*8)] 86 | ldr x8, [sp, #(8*16+8*8)] 87 | 88 | mov sp, fp 89 | ldp fp, lr, [sp], #16 90 | 91 | // Call imp 92 | br x17 93 | 94 | #endif 95 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Utilities/AERealtimeWatchdog.h: -------------------------------------------------------------------------------- 1 | // 2 | // AERealtimeWatchdog.h 3 | // TheAmazingAudioEngine 4 | // 5 | // Created by Michael Tyson on 12/06/2016. 6 | // Idea by Taylor Holliday 7 | // Copyright © 2016 A Tasty Pixel. All rights reserved. 8 | // 9 | // This software is provided 'as-is', without any express or implied 10 | // warranty. In no event will the authors be held liable for any damages 11 | // arising from the use of this software. 12 | // 13 | // Permission is granted to anyone to use this software for any purpose, 14 | // including commercial applications, and to alter it and redistribute it 15 | // freely, subject to the following restrictions: 16 | // 17 | // 1. The origin of this software must not be misrepresented; you must not 18 | // claim that you wrote the original software. If you use this software 19 | // in a product, an acknowledgment in the product documentation would be 20 | // appreciated but is not required. 21 | // 22 | // 2. Altered source versions must be plainly marked as such, and must not be 23 | // misrepresented as being the original software. 24 | // 25 | // 3. This notice may not be removed or altered from any source distribution. 26 | // 27 | 28 | #ifdef DEBUG 29 | 30 | // Uncomment the following to enable the realtime watchdog 31 | // #define REALTIME_WATCHDOG_ENABLED 1 32 | 33 | #endif 34 | 35 | #ifndef __ASSEMBLER__ 36 | 37 | /*! 38 | * Pause monitoring until AERealtimeWatchdogResume called 39 | */ 40 | void AERealtimeWatchdogPause(void); 41 | 42 | /*! 43 | * Resume monitoring 44 | */ 45 | void AERealtimeWatchdogResume(void); 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Utilities/AEWeakRetainingProxy.h: -------------------------------------------------------------------------------- 1 | // 2 | // AEWeakRetainingProxy.h 3 | // TheAmazingAudioEngine 4 | // 5 | // Created by Michael Tyson on 8/06/2016. 6 | // Copyright © 2016 A Tasty Pixel. All rights reserved. 7 | // 8 | // This software is provided 'as-is', without any express or implied 9 | // warranty. In no event will the authors be held liable for any damages 10 | // arising from the use of this software. 11 | // 12 | // Permission is granted to anyone to use this software for any purpose, 13 | // including commercial applications, and to alter it and redistribute it 14 | // freely, subject to the following restrictions: 15 | // 16 | // 1. The origin of this software must not be misrepresented; you must not 17 | // claim that you wrote the original software. If you use this software 18 | // in a product, an acknowledgment in the product documentation would be 19 | // appreciated but is not required. 20 | // 21 | // 2. Altered source versions must be plainly marked as such, and must not be 22 | // misrepresented as being the original software. 23 | // 24 | // 3. This notice may not be removed or altered from any source distribution. 25 | // 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | #import 32 | 33 | /*! 34 | * Weak Retaining Proxy 35 | * 36 | * This proxy class is useful to avoid a retain cycle when using an NSTimer 37 | * retained by the instance that is the timer's target. It's used in a number 38 | * of places throughout TAAE. 39 | */ 40 | @interface AEWeakRetainingProxy : NSProxy 41 | 42 | + (instancetype _Nonnull)proxyWithTarget:(id _Nonnull)target; 43 | 44 | @property (nonatomic, unsafe_unretained, readonly) id _Nullable target; 45 | 46 | @end 47 | 48 | #ifdef __cplusplus 49 | } 50 | #endif 51 | -------------------------------------------------------------------------------- /TheAmazingAudioEngine/Utilities/AEWeakRetainingProxy.m: -------------------------------------------------------------------------------- 1 | // 2 | // AEWeakRetainingProxy.m 3 | // TheAmazingAudioEngine 4 | // 5 | // Created by Michael Tyson on 8/06/2016. 6 | // Copyright © 2016 A Tasty Pixel. All rights reserved. 7 | // 8 | // This software is provided 'as-is', without any express or implied 9 | // warranty. In no event will the authors be held liable for any damages 10 | // arising from the use of this software. 11 | // 12 | // Permission is granted to anyone to use this software for any purpose, 13 | // including commercial applications, and to alter it and redistribute it 14 | // freely, subject to the following restrictions: 15 | // 16 | // 1. The origin of this software must not be misrepresented; you must not 17 | // claim that you wrote the original software. If you use this software 18 | // in a product, an acknowledgment in the product documentation would be 19 | // appreciated but is not required. 20 | // 21 | // 2. Altered source versions must be plainly marked as such, and must not be 22 | // misrepresented as being the original software. 23 | // 24 | // 3. This notice may not be removed or altered from any source distribution. 25 | // 26 | 27 | #import "AEWeakRetainingProxy.h" 28 | 29 | @interface AEWeakRetainingProxy () 30 | @property (nonatomic, unsafe_unretained, readwrite) id target; 31 | @end 32 | 33 | @implementation AEWeakRetainingProxy 34 | 35 | + (instancetype)proxyWithTarget:(id)target { 36 | AEWeakRetainingProxy * proxy = [AEWeakRetainingProxy alloc]; 37 | proxy.target = target; 38 | return proxy; 39 | } 40 | 41 | - (NSMethodSignature *)methodSignatureForSelector:(SEL)selector { 42 | return [_target methodSignatureForSelector:selector]; 43 | } 44 | 45 | - (void)forwardInvocation:(NSInvocation *)invocation { 46 | __strong id target = _target; 47 | [invocation setTarget:target]; 48 | [invocation invoke]; 49 | } 50 | 51 | @end 52 | --------------------------------------------------------------------------------