├── .gitignore ├── example ├── Makefile ├── Project.xcconfig ├── addons.make ├── bin │ └── data │ │ └── demo.mp3 ├── config.make ├── example.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ ├── example Debug.xcscheme │ │ └── example Release.xcscheme ├── ofApp.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ ├── ofApp Debug.xcscheme │ │ └── ofApp Release.xcscheme ├── openFrameworks-Info.plist └── src │ ├── main.cpp │ ├── ofApp.cpp │ └── ofApp.h ├── libs ├── include │ ├── apple │ │ ├── CADebugMacros.h │ │ └── CAStreamBasicDescription.h │ ├── audiodecoder.h │ ├── audiodecoderbase.h │ └── audiodecodercoreaudio.h └── src │ ├── audiodecoderbase.cpp │ └── audiodecodercoreaudio.cpp ├── license.md ├── readme.md └── src ├── ofxAudioDecoder.cpp └── ofxAudioDecoder.h /.gitignore: -------------------------------------------------------------------------------- 1 | # Some general ignore patterns 2 | build/ 3 | obj/ 4 | *.o 5 | Debug*/ 6 | Release*/ 7 | *.mode* 8 | *.app/ 9 | *.pyc 10 | .svn/ 11 | 12 | 13 | #XCode 14 | *.pbxuser 15 | *.perspective 16 | *.perspectivev3 17 | *.mode1v3 18 | *.mode2v3 19 | #XCode 4 20 | xcuserdata 21 | *.xcworkspace 22 | 23 | #Code::Blocks 24 | *.depend 25 | *.layout 26 | 27 | #Visual Studio 28 | *.sdf 29 | *.opensdf 30 | *.suo 31 | ipch/ 32 | 33 | #Eclipse 34 | .metadata 35 | local.properties 36 | .externalToolBuilders 37 | 38 | 39 | # OS-specific ignore patterns 40 | 41 | #Linux 42 | *~ 43 | # KDE 44 | .directory 45 | 46 | #OSX 47 | .DS_Store 48 | *.swp 49 | *~.nib 50 | # Thumbnails 51 | ._* 52 | 53 | #Windows 54 | # Windows image file caches 55 | Thumbs.db 56 | # Folder config file 57 | Desktop.ini 58 | 59 | #Android 60 | .csettings 61 | /libs/openFrameworksCompiled/project/android/paths.make 62 | 63 | # Miscellaneous 64 | .mailmap 65 | 66 | 67 | # Compiled Object files 68 | *.slo 69 | *.lo 70 | *.o 71 | 72 | # Compiled Dynamic libraries 73 | *.so 74 | *.dylib 75 | 76 | # Compiled Static libraries 77 | *.lai 78 | *.la 79 | *.a 80 | -------------------------------------------------------------------------------- /example/Makefile: -------------------------------------------------------------------------------- 1 | # Attempt to load a config.make file. 2 | # If none is found, project defaults in config.project.make will be used. 3 | ifneq ($(wildcard config.make),) 4 | include config.make 5 | endif 6 | 7 | # make sure the the OF_ROOT location is defined 8 | ifndef OF_ROOT 9 | OF_ROOT=$(realpath ../../..) 10 | endif 11 | 12 | # call the project makefile! 13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk 14 | -------------------------------------------------------------------------------- /example/Project.xcconfig: -------------------------------------------------------------------------------- 1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT. 2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED 3 | OF_PATH = ../../.. 4 | 5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE 6 | #include "../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig" 7 | 8 | //ICONS - NEW IN 0072 9 | ICON_NAME_DEBUG = icon-debug.icns 10 | ICON_NAME_RELEASE = icon.icns 11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/ 12 | 13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to: 14 | //ICON_FILE_PATH = bin/data/ 15 | 16 | OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) 17 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 18 | -------------------------------------------------------------------------------- /example/addons.make: -------------------------------------------------------------------------------- 1 | ofxAudioDecoder 2 | -------------------------------------------------------------------------------- /example/bin/data/demo.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kylemcdonald/ofxAudioDecoder/24b7318d74dc282944c8dadb731b56ab4ffa2e1b/example/bin/data/demo.mp3 -------------------------------------------------------------------------------- /example/config.make: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # CONFIGURE PROJECT MAKEFILE (optional) 3 | # This file is where we make project specific configurations. 4 | ################################################################################ 5 | 6 | ################################################################################ 7 | # OF ROOT 8 | # The location of your root openFrameworks installation 9 | # (default) OF_ROOT = ../../.. 10 | ################################################################################ 11 | # OF_ROOT = ../../.. 12 | 13 | ################################################################################ 14 | # PROJECT ROOT 15 | # The location of the project - a starting place for searching for files 16 | # (default) PROJECT_ROOT = . (this directory) 17 | # 18 | ################################################################################ 19 | # PROJECT_ROOT = . 20 | 21 | ################################################################################ 22 | # PROJECT SPECIFIC CHECKS 23 | # This is a project defined section to create internal makefile flags to 24 | # conditionally enable or disable the addition of various features within 25 | # this makefile. For instance, if you want to make changes based on whether 26 | # GTK is installed, one might test that here and create a variable to check. 27 | ################################################################################ 28 | # None 29 | 30 | ################################################################################ 31 | # PROJECT EXTERNAL SOURCE PATHS 32 | # These are fully qualified paths that are not within the PROJECT_ROOT folder. 33 | # Like source folders in the PROJECT_ROOT, these paths are subject to 34 | # exlclusion via the PROJECT_EXLCUSIONS list. 35 | # 36 | # (default) PROJECT_EXTERNAL_SOURCE_PATHS = (blank) 37 | # 38 | # Note: Leave a leading space when adding list items with the += operator 39 | ################################################################################ 40 | # PROJECT_EXTERNAL_SOURCE_PATHS = 41 | 42 | ################################################################################ 43 | # PROJECT EXCLUSIONS 44 | # These makefiles assume that all folders in your current project directory 45 | # and any listed in the PROJECT_EXTERNAL_SOURCH_PATHS are are valid locations 46 | # to look for source code. The any folders or files that match any of the 47 | # items in the PROJECT_EXCLUSIONS list below will be ignored. 48 | # 49 | # Each item in the PROJECT_EXCLUSIONS list will be treated as a complete 50 | # string unless teh user adds a wildcard (%) operator to match subdirectories. 51 | # GNU make only allows one wildcard for matching. The second wildcard (%) is 52 | # treated literally. 53 | # 54 | # (default) PROJECT_EXCLUSIONS = (blank) 55 | # 56 | # Will automatically exclude the following: 57 | # 58 | # $(PROJECT_ROOT)/bin% 59 | # $(PROJECT_ROOT)/obj% 60 | # $(PROJECT_ROOT)/%.xcodeproj 61 | # 62 | # Note: Leave a leading space when adding list items with the += operator 63 | ################################################################################ 64 | # PROJECT_EXCLUSIONS = 65 | 66 | ################################################################################ 67 | # PROJECT LINKER FLAGS 68 | # These flags will be sent to the linker when compiling the executable. 69 | # 70 | # (default) PROJECT_LDFLAGS = -Wl,-rpath=./libs 71 | # 72 | # Note: Leave a leading space when adding list items with the += operator 73 | ################################################################################ 74 | 75 | # Currently, shared libraries that are needed are copied to the 76 | # $(PROJECT_ROOT)/bin/libs directory. The following LDFLAGS tell the linker to 77 | # add a runtime path to search for those shared libraries, since they aren't 78 | # incorporated directly into the final executable application binary. 79 | # TODO: should this be a default setting? 80 | # PROJECT_LDFLAGS=-Wl,-rpath=./libs 81 | 82 | ################################################################################ 83 | # PROJECT DEFINES 84 | # Create a space-delimited list of DEFINES. The list will be converted into 85 | # CFLAGS with the "-D" flag later in the makefile. 86 | # 87 | # (default) PROJECT_DEFINES = (blank) 88 | # 89 | # Note: Leave a leading space when adding list items with the += operator 90 | ################################################################################ 91 | # PROJECT_DEFINES = 92 | 93 | ################################################################################ 94 | # PROJECT CFLAGS 95 | # This is a list of fully qualified CFLAGS required when compiling for this 96 | # project. These CFLAGS will be used IN ADDITION TO the PLATFORM_CFLAGS 97 | # defined in your platform specific core configuration files. These flags are 98 | # presented to the compiler BEFORE the PROJECT_OPTIMIZATION_CFLAGS below. 99 | # 100 | # (default) PROJECT_CFLAGS = (blank) 101 | # 102 | # Note: Before adding PROJECT_CFLAGS, note that the PLATFORM_CFLAGS defined in 103 | # your platform specific configuration file will be applied by default and 104 | # further flags here may not be needed. 105 | # 106 | # Note: Leave a leading space when adding list items with the += operator 107 | ################################################################################ 108 | # PROJECT_CFLAGS = 109 | 110 | ################################################################################ 111 | # PROJECT OPTIMIZATION CFLAGS 112 | # These are lists of CFLAGS that are target-specific. While any flags could 113 | # be conditionally added, they are usually limited to optimization flags. 114 | # These flags are added BEFORE the PROJECT_CFLAGS. 115 | # 116 | # PROJECT_OPTIMIZATION_CFLAGS_RELEASE flags are only applied to RELEASE targets. 117 | # 118 | # (default) PROJECT_OPTIMIZATION_CFLAGS_RELEASE = (blank) 119 | # 120 | # PROJECT_OPTIMIZATION_CFLAGS_DEBUG flags are only applied to DEBUG targets. 121 | # 122 | # (default) PROJECT_OPTIMIZATION_CFLAGS_DEBUG = (blank) 123 | # 124 | # Note: Before adding PROJECT_OPTIMIZATION_CFLAGS, please note that the 125 | # PLATFORM_OPTIMIZATION_CFLAGS defined in your platform specific configuration 126 | # file will be applied by default and further optimization flags here may not 127 | # be needed. 128 | # 129 | # Note: Leave a leading space when adding list items with the += operator 130 | ################################################################################ 131 | # PROJECT_OPTIMIZATION_CFLAGS_RELEASE = 132 | # PROJECT_OPTIMIZATION_CFLAGS_DEBUG = 133 | 134 | ################################################################################ 135 | # PROJECT COMPILERS 136 | # Custom compilers can be set for CC and CXX 137 | # (default) PROJECT_CXX = (blank) 138 | # (default) PROJECT_CC = (blank) 139 | # Note: Leave a leading space when adding list items with the += operator 140 | ################################################################################ 141 | # PROJECT_CXX = 142 | # PROJECT_CC = 143 | -------------------------------------------------------------------------------- /example/example.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 8BFD3CDF1C302DCE003705D9 /* audiodecoderbase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BFD3CDD1C302DCE003705D9 /* audiodecoderbase.cpp */; }; 11 | 8BFD3CE01C302DCE003705D9 /* audiodecodercoreaudio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BFD3CDE1C302DCE003705D9 /* audiodecodercoreaudio.cpp */; }; 12 | 8BFD3CE41C302F79003705D9 /* ofxAudioDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BFD3CE31C302F79003705D9 /* ofxAudioDecoder.cpp */; }; 13 | E4328149138ABC9F0047C5CB /* openFrameworksDebug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4328148138ABC890047C5CB /* openFrameworksDebug.a */; }; 14 | E4B69E200A3A1BDC003C02F2 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4B69E1D0A3A1BDC003C02F2 /* main.cpp */; }; 15 | E4B69E210A3A1BDC003C02F2 /* ofApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4B69E1E0A3A1BDC003C02F2 /* ofApp.cpp */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXContainerItemProxy section */ 19 | E4328147138ABC890047C5CB /* PBXContainerItemProxy */ = { 20 | isa = PBXContainerItemProxy; 21 | containerPortal = E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */; 22 | proxyType = 2; 23 | remoteGlobalIDString = E4B27C1510CBEB8E00536013; 24 | remoteInfo = openFrameworks; 25 | }; 26 | E4EEB9AB138B136A00A80321 /* PBXContainerItemProxy */ = { 27 | isa = PBXContainerItemProxy; 28 | containerPortal = E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */; 29 | proxyType = 1; 30 | remoteGlobalIDString = E4B27C1410CBEB8E00536013; 31 | remoteInfo = openFrameworks; 32 | }; 33 | /* End PBXContainerItemProxy section */ 34 | 35 | /* Begin PBXCopyFilesBuildPhase section */ 36 | E4C2427710CC5ABF004149E2 /* CopyFiles */ = { 37 | isa = PBXCopyFilesBuildPhase; 38 | buildActionMask = 2147483647; 39 | dstPath = ""; 40 | dstSubfolderSpec = 10; 41 | files = ( 42 | ); 43 | runOnlyForDeploymentPostprocessing = 0; 44 | }; 45 | /* End PBXCopyFilesBuildPhase section */ 46 | 47 | /* Begin PBXFileReference section */ 48 | 19B6C350D9FAA9277E9345CF /* ofxAudioDecoder.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 30; name = ofxAudioDecoder.h; path = ../../../addons/ofxAudioDecoder/src/ofxAudioDecoder.h; sourceTree = SOURCE_ROOT; }; 49 | 8BFD3CD71C302DCE003705D9 /* CADebugMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CADebugMacros.h; sourceTree = ""; }; 50 | 8BFD3CD81C302DCE003705D9 /* CAStreamBasicDescription.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAStreamBasicDescription.h; sourceTree = ""; }; 51 | 8BFD3CD91C302DCE003705D9 /* audiodecoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = audiodecoder.h; sourceTree = ""; }; 52 | 8BFD3CDA1C302DCE003705D9 /* audiodecoderbase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = audiodecoderbase.h; sourceTree = ""; }; 53 | 8BFD3CDB1C302DCE003705D9 /* audiodecodercoreaudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = audiodecodercoreaudio.h; sourceTree = ""; }; 54 | 8BFD3CDD1C302DCE003705D9 /* audiodecoderbase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = audiodecoderbase.cpp; sourceTree = ""; }; 55 | 8BFD3CDE1C302DCE003705D9 /* audiodecodercoreaudio.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = audiodecodercoreaudio.cpp; sourceTree = ""; }; 56 | 8BFD3CE31C302F79003705D9 /* ofxAudioDecoder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ofxAudioDecoder.cpp; path = ../src/ofxAudioDecoder.cpp; sourceTree = ""; }; 57 | E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = openFrameworksLib.xcodeproj; path = ../../../libs/openFrameworksCompiled/project/osx/openFrameworksLib.xcodeproj; sourceTree = SOURCE_ROOT; }; 58 | E4B69B5B0A3A1756003C02F2 /* exampleDebug.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = exampleDebug.app; sourceTree = BUILT_PRODUCTS_DIR; }; 59 | E4B69E1D0A3A1BDC003C02F2 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = src/main.cpp; sourceTree = SOURCE_ROOT; }; 60 | E4B69E1E0A3A1BDC003C02F2 /* ofApp.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = ofApp.cpp; path = src/ofApp.cpp; sourceTree = SOURCE_ROOT; }; 61 | E4B69E1F0A3A1BDC003C02F2 /* ofApp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ofApp.h; path = src/ofApp.h; sourceTree = SOURCE_ROOT; }; 62 | E4B6FCAD0C3E899E008CF71C /* openFrameworks-Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; path = "openFrameworks-Info.plist"; sourceTree = ""; }; 63 | E4EB691F138AFCF100A09F29 /* CoreOF.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = CoreOF.xcconfig; path = ../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig; sourceTree = SOURCE_ROOT; }; 64 | E4EB6923138AFD0F00A09F29 /* Project.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Project.xcconfig; sourceTree = ""; }; 65 | /* End PBXFileReference section */ 66 | 67 | /* Begin PBXFrameworksBuildPhase section */ 68 | E4B69B590A3A1756003C02F2 /* Frameworks */ = { 69 | isa = PBXFrameworksBuildPhase; 70 | buildActionMask = 2147483647; 71 | files = ( 72 | E4328149138ABC9F0047C5CB /* openFrameworksDebug.a in Frameworks */, 73 | ); 74 | runOnlyForDeploymentPostprocessing = 0; 75 | }; 76 | /* End PBXFrameworksBuildPhase section */ 77 | 78 | /* Begin PBXGroup section */ 79 | 6948EE371B920CB800B5AC1A /* local_addons */ = { 80 | isa = PBXGroup; 81 | children = ( 82 | ); 83 | name = local_addons; 84 | sourceTree = ""; 85 | }; 86 | 8BFD3CD41C302DC1003705D9 /* lib */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 8BFD3CD51C302DCE003705D9 /* include */, 90 | 8BFD3CDC1C302DCE003705D9 /* src */, 91 | ); 92 | name = lib; 93 | sourceTree = ""; 94 | }; 95 | 8BFD3CD51C302DCE003705D9 /* include */ = { 96 | isa = PBXGroup; 97 | children = ( 98 | 8BFD3CD61C302DCE003705D9 /* apple */, 99 | 8BFD3CD91C302DCE003705D9 /* audiodecoder.h */, 100 | 8BFD3CDA1C302DCE003705D9 /* audiodecoderbase.h */, 101 | 8BFD3CDB1C302DCE003705D9 /* audiodecodercoreaudio.h */, 102 | ); 103 | name = include; 104 | path = ../lib/include; 105 | sourceTree = ""; 106 | }; 107 | 8BFD3CD61C302DCE003705D9 /* apple */ = { 108 | isa = PBXGroup; 109 | children = ( 110 | 8BFD3CD71C302DCE003705D9 /* CADebugMacros.h */, 111 | 8BFD3CD81C302DCE003705D9 /* CAStreamBasicDescription.h */, 112 | ); 113 | path = apple; 114 | sourceTree = ""; 115 | }; 116 | 8BFD3CDC1C302DCE003705D9 /* src */ = { 117 | isa = PBXGroup; 118 | children = ( 119 | 8BFD3CDD1C302DCE003705D9 /* audiodecoderbase.cpp */, 120 | 8BFD3CDE1C302DCE003705D9 /* audiodecodercoreaudio.cpp */, 121 | ); 122 | name = src; 123 | path = ../lib/src; 124 | sourceTree = ""; 125 | }; 126 | A5F870D5915B31AB56254EA7 /* src */ = { 127 | isa = PBXGroup; 128 | children = ( 129 | 19B6C350D9FAA9277E9345CF /* ofxAudioDecoder.h */, 130 | 8BFD3CE31C302F79003705D9 /* ofxAudioDecoder.cpp */, 131 | ); 132 | name = src; 133 | sourceTree = ""; 134 | }; 135 | BB4B014C10F69532006C3DED /* addons */ = { 136 | isa = PBXGroup; 137 | children = ( 138 | E57BA9F5B131DD75E7F6B1AC /* ofxAudioDecoder */, 139 | ); 140 | name = addons; 141 | sourceTree = ""; 142 | }; 143 | E4328144138ABC890047C5CB /* Products */ = { 144 | isa = PBXGroup; 145 | children = ( 146 | E4328148138ABC890047C5CB /* openFrameworksDebug.a */, 147 | ); 148 | name = Products; 149 | sourceTree = ""; 150 | }; 151 | E4B69B4A0A3A1720003C02F2 = { 152 | isa = PBXGroup; 153 | children = ( 154 | E4B6FCAD0C3E899E008CF71C /* openFrameworks-Info.plist */, 155 | E4EB6923138AFD0F00A09F29 /* Project.xcconfig */, 156 | E4B69E1C0A3A1BDC003C02F2 /* src */, 157 | E4EEC9E9138DF44700A80321 /* openFrameworks */, 158 | BB4B014C10F69532006C3DED /* addons */, 159 | 6948EE371B920CB800B5AC1A /* local_addons */, 160 | E4B69B5B0A3A1756003C02F2 /* exampleDebug.app */, 161 | ); 162 | sourceTree = ""; 163 | }; 164 | E4B69E1C0A3A1BDC003C02F2 /* src */ = { 165 | isa = PBXGroup; 166 | children = ( 167 | E4B69E1D0A3A1BDC003C02F2 /* main.cpp */, 168 | E4B69E1E0A3A1BDC003C02F2 /* ofApp.cpp */, 169 | E4B69E1F0A3A1BDC003C02F2 /* ofApp.h */, 170 | ); 171 | path = src; 172 | sourceTree = SOURCE_ROOT; 173 | }; 174 | E4EEC9E9138DF44700A80321 /* openFrameworks */ = { 175 | isa = PBXGroup; 176 | children = ( 177 | E4EB691F138AFCF100A09F29 /* CoreOF.xcconfig */, 178 | E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */, 179 | ); 180 | name = openFrameworks; 181 | sourceTree = ""; 182 | }; 183 | E57BA9F5B131DD75E7F6B1AC /* ofxAudioDecoder */ = { 184 | isa = PBXGroup; 185 | children = ( 186 | 8BFD3CD41C302DC1003705D9 /* lib */, 187 | A5F870D5915B31AB56254EA7 /* src */, 188 | ); 189 | name = ofxAudioDecoder; 190 | sourceTree = ""; 191 | }; 192 | /* End PBXGroup section */ 193 | 194 | /* Begin PBXNativeTarget section */ 195 | E4B69B5A0A3A1756003C02F2 /* example */ = { 196 | isa = PBXNativeTarget; 197 | buildConfigurationList = E4B69B5F0A3A1757003C02F2 /* Build configuration list for PBXNativeTarget "example" */; 198 | buildPhases = ( 199 | E4B69B580A3A1756003C02F2 /* Sources */, 200 | E4B69B590A3A1756003C02F2 /* Frameworks */, 201 | E4B6FFFD0C3F9AB9008CF71C /* ShellScript */, 202 | E4C2427710CC5ABF004149E2 /* CopyFiles */, 203 | 8466F1851C04CA0E00918B1C /* ShellScript */, 204 | ); 205 | buildRules = ( 206 | ); 207 | dependencies = ( 208 | E4EEB9AC138B136A00A80321 /* PBXTargetDependency */, 209 | ); 210 | name = example; 211 | productName = myOFApp; 212 | productReference = E4B69B5B0A3A1756003C02F2 /* exampleDebug.app */; 213 | productType = "com.apple.product-type.application"; 214 | }; 215 | /* End PBXNativeTarget section */ 216 | 217 | /* Begin PBXProject section */ 218 | E4B69B4C0A3A1720003C02F2 /* Project object */ = { 219 | isa = PBXProject; 220 | attributes = { 221 | LastUpgradeCheck = 0600; 222 | }; 223 | buildConfigurationList = E4B69B4D0A3A1720003C02F2 /* Build configuration list for PBXProject "example" */; 224 | compatibilityVersion = "Xcode 3.2"; 225 | developmentRegion = English; 226 | hasScannedForEncodings = 0; 227 | knownRegions = ( 228 | English, 229 | Japanese, 230 | French, 231 | German, 232 | ); 233 | mainGroup = E4B69B4A0A3A1720003C02F2; 234 | productRefGroup = E4B69B4A0A3A1720003C02F2; 235 | projectDirPath = ""; 236 | projectReferences = ( 237 | { 238 | ProductGroup = E4328144138ABC890047C5CB /* Products */; 239 | ProjectRef = E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */; 240 | }, 241 | ); 242 | projectRoot = ""; 243 | targets = ( 244 | E4B69B5A0A3A1756003C02F2 /* example */, 245 | ); 246 | }; 247 | /* End PBXProject section */ 248 | 249 | /* Begin PBXReferenceProxy section */ 250 | E4328148138ABC890047C5CB /* openFrameworksDebug.a */ = { 251 | isa = PBXReferenceProxy; 252 | fileType = archive.ar; 253 | path = openFrameworksDebug.a; 254 | remoteRef = E4328147138ABC890047C5CB /* PBXContainerItemProxy */; 255 | sourceTree = BUILT_PRODUCTS_DIR; 256 | }; 257 | /* End PBXReferenceProxy section */ 258 | 259 | /* Begin PBXShellScriptBuildPhase section */ 260 | 8466F1851C04CA0E00918B1C /* ShellScript */ = { 261 | isa = PBXShellScriptBuildPhase; 262 | buildActionMask = 12; 263 | files = ( 264 | ); 265 | inputPaths = ( 266 | ); 267 | outputPaths = ( 268 | ); 269 | runOnlyForDeploymentPostprocessing = 0; 270 | shellPath = /bin/sh; 271 | shellScript = "# ---- Code Sign App Package ----\n \n# WARNING: You may have to run Clean in Xcode after changing CODE_SIGN_IDENTITY!\n\n# Verify that $CODE_SIGN_IDENTITY is set\nif [ -z \"${CODE_SIGN_IDENTITY}\" ] ; then\necho \"CODE_SIGN_IDENTITY needs to be set for framework code-signing\"\nexit 0\nfi\n\nif [ -z \"${CODE_SIGN_ENTITLEMENTS}\" ] ; then\necho \"CODE_SIGN_ENTITLEMENTS needs to be set for framework code-signing!\"\n\nif [ \"${CONFIGURATION}\" = \"Release\" ] ; then\nexit 1\nelse\n# Code-signing is optional for non-release builds.\nexit 0\nfi\nfi\n\nITEMS=\"\"\n\nFRAMEWORKS_DIR=\"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}\"\necho \"$FRAMEWORKS_DIR\"\nif [ -d \"$FRAMEWORKS_DIR\" ] ; then\nFRAMEWORKS=$(find \"${FRAMEWORKS_DIR}\" -depth -type d -name \"*.framework\" -or -name \"*.dylib\" -or -name \"*.bundle\" | sed -e \"s/\\(.*framework\\)/\\1\\/Versions\\/A\\//\")\nRESULT=$?\nif [[ $RESULT != 0 ]] ; then\nexit 1\nfi\n\nITEMS=\"${FRAMEWORKS}\"\nfi\n\nLOGINITEMS_DIR=\"${TARGET_BUILD_DIR}/${CONTENTS_FOLDER_PATH}/Library/LoginItems/\"\nif [ -d \"$LOGINITEMS_DIR\" ] ; then\nLOGINITEMS=$(find \"${LOGINITEMS_DIR}\" -depth -type d -name \"*.app\")\nRESULT=$?\nif [[ $RESULT != 0 ]] ; then\nexit 1\nfi\n\nITEMS=\"${ITEMS}\"$'\\n'\"${LOGINITEMS}\"\nfi\n\n# Prefer the expanded name, if available.\nCODE_SIGN_IDENTITY_FOR_ITEMS=\"${EXPANDED_CODE_SIGN_IDENTITY_NAME}\"\nif [ \"${CODE_SIGN_IDENTITY_FOR_ITEMS}\" = \"\" ] ; then\n# Fall back to old behavior.\nCODE_SIGN_IDENTITY_FOR_ITEMS=\"${CODE_SIGN_IDENTITY}\"\nfi\n\necho \"Identity:\"\necho \"${CODE_SIGN_IDENTITY_FOR_ITEMS}\"\n\necho \"Entitlements:\"\necho \"${CODE_SIGN_ENTITLEMENTS}\"\n\necho \"Found:\"\necho \"${ITEMS}\"\n\n# Change the Internal Field Separator (IFS) so that spaces in paths will not cause problems below.\nSAVED_IFS=$IFS\nIFS=$(echo -en \"\\n\\b\")\n\n# Loop through all items.\nfor ITEM in $ITEMS;\ndo\necho \"Signing '${ITEM}'\"\ncodesign --force --verbose --sign \"${CODE_SIGN_IDENTITY_FOR_ITEMS}\" --entitlements \"${CODE_SIGN_ENTITLEMENTS}\" \"${ITEM}\"\nRESULT=$?\nif [[ $RESULT != 0 ]] ; then\necho \"Failed to sign '${ITEM}'.\"\nIFS=$SAVED_IFS\nexit 1\nfi\ndone\n\n# Restore $IFS.\nIFS=$SAVED_IFS\n"; 272 | }; 273 | E4B6FFFD0C3F9AB9008CF71C /* ShellScript */ = { 274 | isa = PBXShellScriptBuildPhase; 275 | buildActionMask = 2147483647; 276 | files = ( 277 | ); 278 | inputPaths = ( 279 | ); 280 | outputPaths = ( 281 | ); 282 | runOnlyForDeploymentPostprocessing = 0; 283 | shellPath = /bin/sh; 284 | shellScript = "mkdir -p \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/Resources/\"\n# Copy default icon file into App/Resources\nrsync -aved \"$ICON_FILE\" \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/Resources/\"\n# Copy bin/data into App/Resources\nrsync -avz --exclude='.DS_Store' \"${SRCROOT}/bin/data/\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/data/\"\n# Copy libfmod and change install directory for fmod to run\nrsync -aved ../../../libs/fmodex/lib/osx/libfmodex.dylib \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/Frameworks/\";\ninstall_name_tool -change @executable_path/libfmodex.dylib @executable_path/../Frameworks/libfmodex.dylib \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/$PRODUCT_NAME\";\n# Copy GLUT framework (must remove for AppStore submissions)\nrsync -aved ../../../libs/glut/lib/osx/GLUT.framework \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/Frameworks/\"\n"; 285 | }; 286 | /* End PBXShellScriptBuildPhase section */ 287 | 288 | /* Begin PBXSourcesBuildPhase section */ 289 | E4B69B580A3A1756003C02F2 /* Sources */ = { 290 | isa = PBXSourcesBuildPhase; 291 | buildActionMask = 2147483647; 292 | files = ( 293 | E4B69E200A3A1BDC003C02F2 /* main.cpp in Sources */, 294 | 8BFD3CE01C302DCE003705D9 /* audiodecodercoreaudio.cpp in Sources */, 295 | 8BFD3CDF1C302DCE003705D9 /* audiodecoderbase.cpp in Sources */, 296 | E4B69E210A3A1BDC003C02F2 /* ofApp.cpp in Sources */, 297 | 8BFD3CE41C302F79003705D9 /* ofxAudioDecoder.cpp in Sources */, 298 | ); 299 | runOnlyForDeploymentPostprocessing = 0; 300 | }; 301 | /* End PBXSourcesBuildPhase section */ 302 | 303 | /* Begin PBXTargetDependency section */ 304 | E4EEB9AC138B136A00A80321 /* PBXTargetDependency */ = { 305 | isa = PBXTargetDependency; 306 | name = openFrameworks; 307 | targetProxy = E4EEB9AB138B136A00A80321 /* PBXContainerItemProxy */; 308 | }; 309 | /* End PBXTargetDependency section */ 310 | 311 | /* Begin XCBuildConfiguration section */ 312 | E4B69B4E0A3A1720003C02F2 /* Debug */ = { 313 | isa = XCBuildConfiguration; 314 | baseConfigurationReference = E4EB6923138AFD0F00A09F29 /* Project.xcconfig */; 315 | buildSettings = { 316 | CONFIGURATION_BUILD_DIR = "$(SRCROOT)/bin/"; 317 | COPY_PHASE_STRIP = NO; 318 | DEAD_CODE_STRIPPING = YES; 319 | GCC_AUTO_VECTORIZATION = YES; 320 | GCC_ENABLE_SSE3_EXTENSIONS = YES; 321 | GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS = YES; 322 | GCC_INLINES_ARE_PRIVATE_EXTERN = NO; 323 | GCC_OPTIMIZATION_LEVEL = 0; 324 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 325 | GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES; 326 | GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = NO; 327 | GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = NO; 328 | GCC_WARN_UNINITIALIZED_AUTOS = NO; 329 | GCC_WARN_UNUSED_VALUE = NO; 330 | GCC_WARN_UNUSED_VARIABLE = NO; 331 | HEADER_SEARCH_PATHS = ( 332 | "$(OF_CORE_HEADERS)", 333 | src, 334 | ../../../addons/ofxAudioDecoder/src, 335 | ); 336 | MACOSX_DEPLOYMENT_TARGET = 10.8; 337 | ONLY_ACTIVE_ARCH = YES; 338 | OTHER_CPLUSPLUSFLAGS = ( 339 | "-D__MACOSX_CORE__", 340 | "-mtune=native", 341 | ); 342 | SDKROOT = macosx; 343 | }; 344 | name = Debug; 345 | }; 346 | E4B69B4F0A3A1720003C02F2 /* Release */ = { 347 | isa = XCBuildConfiguration; 348 | baseConfigurationReference = E4EB6923138AFD0F00A09F29 /* Project.xcconfig */; 349 | buildSettings = { 350 | CONFIGURATION_BUILD_DIR = "$(SRCROOT)/bin/"; 351 | COPY_PHASE_STRIP = YES; 352 | DEAD_CODE_STRIPPING = YES; 353 | GCC_AUTO_VECTORIZATION = YES; 354 | GCC_ENABLE_SSE3_EXTENSIONS = YES; 355 | GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS = YES; 356 | GCC_INLINES_ARE_PRIVATE_EXTERN = NO; 357 | GCC_OPTIMIZATION_LEVEL = 3; 358 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 359 | GCC_UNROLL_LOOPS = YES; 360 | GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES; 361 | GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = NO; 362 | GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = NO; 363 | GCC_WARN_UNINITIALIZED_AUTOS = NO; 364 | GCC_WARN_UNUSED_VALUE = NO; 365 | GCC_WARN_UNUSED_VARIABLE = NO; 366 | HEADER_SEARCH_PATHS = ( 367 | "$(OF_CORE_HEADERS)", 368 | src, 369 | ../../../addons/ofxAudioDecoder/src, 370 | ); 371 | MACOSX_DEPLOYMENT_TARGET = 10.8; 372 | OTHER_CPLUSPLUSFLAGS = ( 373 | "-D__MACOSX_CORE__", 374 | "-mtune=native", 375 | ); 376 | SDKROOT = macosx; 377 | }; 378 | name = Release; 379 | }; 380 | E4B69B600A3A1757003C02F2 /* Debug */ = { 381 | isa = XCBuildConfiguration; 382 | baseConfigurationReference = E4EB6923138AFD0F00A09F29 /* Project.xcconfig */; 383 | buildSettings = { 384 | COMBINE_HIDPI_IMAGES = YES; 385 | COPY_PHASE_STRIP = NO; 386 | FRAMEWORK_SEARCH_PATHS = ( 387 | "$(inherited)", 388 | "$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", 389 | ); 390 | FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../../libs/glut/lib/osx\""; 391 | GCC_DYNAMIC_NO_PIC = NO; 392 | GCC_GENERATE_DEBUGGING_SYMBOLS = YES; 393 | GCC_MODEL_TUNING = NONE; 394 | HEADER_SEARCH_PATHS = ( 395 | "$(OF_CORE_HEADERS)", 396 | src, 397 | ../../../addons/ofxAudioDecoder/src, 398 | ); 399 | ICON = "$(ICON_NAME_DEBUG)"; 400 | ICON_FILE = "$(ICON_FILE_PATH)$(ICON)"; 401 | INFOPLIST_FILE = "openFrameworks-Info.plist"; 402 | INSTALL_PATH = /Applications; 403 | LIBRARY_SEARCH_PATHS = "$(inherited)"; 404 | PRODUCT_NAME = "$(TARGET_NAME)Debug"; 405 | WRAPPER_EXTENSION = app; 406 | }; 407 | name = Debug; 408 | }; 409 | E4B69B610A3A1757003C02F2 /* Release */ = { 410 | isa = XCBuildConfiguration; 411 | baseConfigurationReference = E4EB6923138AFD0F00A09F29 /* Project.xcconfig */; 412 | buildSettings = { 413 | COMBINE_HIDPI_IMAGES = YES; 414 | COPY_PHASE_STRIP = YES; 415 | FRAMEWORK_SEARCH_PATHS = ( 416 | "$(inherited)", 417 | "$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", 418 | ); 419 | FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../../libs/glut/lib/osx\""; 420 | GCC_GENERATE_DEBUGGING_SYMBOLS = YES; 421 | GCC_MODEL_TUNING = NONE; 422 | HEADER_SEARCH_PATHS = ( 423 | "$(OF_CORE_HEADERS)", 424 | src, 425 | ../../../addons/ofxAudioDecoder/src, 426 | ); 427 | ICON = "$(ICON_NAME_RELEASE)"; 428 | ICON_FILE = "$(ICON_FILE_PATH)$(ICON)"; 429 | INFOPLIST_FILE = "openFrameworks-Info.plist"; 430 | INSTALL_PATH = /Applications; 431 | LIBRARY_SEARCH_PATHS = "$(inherited)"; 432 | PRODUCT_NAME = "$(TARGET_NAME)"; 433 | WRAPPER_EXTENSION = app; 434 | baseConfigurationReference = E4EB6923138AFD0F00A09F29; 435 | }; 436 | name = Release; 437 | }; 438 | /* End XCBuildConfiguration section */ 439 | 440 | /* Begin XCConfigurationList section */ 441 | E4B69B4D0A3A1720003C02F2 /* Build configuration list for PBXProject "example" */ = { 442 | isa = XCConfigurationList; 443 | buildConfigurations = ( 444 | E4B69B4E0A3A1720003C02F2 /* Debug */, 445 | E4B69B4F0A3A1720003C02F2 /* Release */, 446 | ); 447 | defaultConfigurationIsVisible = 0; 448 | defaultConfigurationName = Release; 449 | }; 450 | E4B69B5F0A3A1757003C02F2 /* Build configuration list for PBXNativeTarget "example" */ = { 451 | isa = XCConfigurationList; 452 | buildConfigurations = ( 453 | E4B69B600A3A1757003C02F2 /* Debug */, 454 | E4B69B610A3A1757003C02F2 /* Release */, 455 | ); 456 | defaultConfigurationIsVisible = 0; 457 | defaultConfigurationName = Release; 458 | }; 459 | /* End XCConfigurationList section */ 460 | }; 461 | rootObject = E4B69B4C0A3A1720003C02F2 /* Project object */; 462 | } 463 | -------------------------------------------------------------------------------- /example/example.xcodeproj/xcshareddata/xcschemes/example Debug.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 51 | 52 | 58 | 59 | 60 | 61 | 62 | 63 | 69 | 70 | 76 | 77 | 78 | 79 | 81 | 82 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /example/example.xcodeproj/xcshareddata/xcschemes/example Release.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 51 | 52 | 58 | 59 | 60 | 61 | 62 | 63 | 69 | 70 | 76 | 77 | 78 | 79 | 81 | 82 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /example/ofApp.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 42; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 2705FFFB1757D2420006CB22 /* audiodecoderbase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2705FFF41757D2420006CB22 /* audiodecoderbase.cpp */; }; 11 | 2705FFFC1757D2420006CB22 /* audiodecodercoreaudio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2705FFF51757D2420006CB22 /* audiodecodercoreaudio.cpp */; }; 12 | 27ED8F4D1616472D00C3003B /* ofApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 27ED8F4B1616472D00C3003B /* ofApp.cpp */; }; 13 | BBAB23CB13894F3D00AA2426 /* GLUT.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = BBAB23BE13894E4700AA2426 /* GLUT.framework */; }; 14 | E4328149138ABC9F0047C5CB /* openFrameworks.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4328148138ABC890047C5CB /* openFrameworks.a */; }; 15 | E45BE97B0E8CC7DD009D7055 /* AGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9710E8CC7DD009D7055 /* AGL.framework */; }; 16 | E45BE97C0E8CC7DD009D7055 /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9720E8CC7DD009D7055 /* ApplicationServices.framework */; }; 17 | E45BE97D0E8CC7DD009D7055 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9730E8CC7DD009D7055 /* AudioToolbox.framework */; }; 18 | E45BE97E0E8CC7DD009D7055 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9740E8CC7DD009D7055 /* Carbon.framework */; }; 19 | E45BE97F0E8CC7DD009D7055 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9750E8CC7DD009D7055 /* CoreAudio.framework */; }; 20 | E45BE9800E8CC7DD009D7055 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9760E8CC7DD009D7055 /* CoreFoundation.framework */; }; 21 | E45BE9810E8CC7DD009D7055 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9770E8CC7DD009D7055 /* CoreServices.framework */; }; 22 | E45BE9830E8CC7DD009D7055 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9790E8CC7DD009D7055 /* OpenGL.framework */; }; 23 | E45BE9840E8CC7DD009D7055 /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE97A0E8CC7DD009D7055 /* QuickTime.framework */; }; 24 | E4B69E200A3A1BDC003C02F2 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4B69E1D0A3A1BDC003C02F2 /* main.cpp */; }; 25 | E4C2424710CC5A17004149E2 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2424410CC5A17004149E2 /* AppKit.framework */; }; 26 | E4C2424810CC5A17004149E2 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2424510CC5A17004149E2 /* Cocoa.framework */; }; 27 | E4C2424910CC5A17004149E2 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2424610CC5A17004149E2 /* IOKit.framework */; }; 28 | E4EB6799138ADC1D00A09F29 /* GLUT.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBAB23BE13894E4700AA2426 /* GLUT.framework */; }; 29 | E7E077E515D3B63C0020DFD4 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E7E077E415D3B63C0020DFD4 /* CoreVideo.framework */; }; 30 | E7E077E815D3B6510020DFD4 /* QTKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E7E077E715D3B6510020DFD4 /* QTKit.framework */; }; 31 | E7F985F815E0DEA3003869B5 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E7F985F515E0DE99003869B5 /* Accelerate.framework */; }; 32 | /* End PBXBuildFile section */ 33 | 34 | /* Begin PBXContainerItemProxy section */ 35 | E4328147138ABC890047C5CB /* PBXContainerItemProxy */ = { 36 | isa = PBXContainerItemProxy; 37 | containerPortal = E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */; 38 | proxyType = 2; 39 | remoteGlobalIDString = E4B27C1510CBEB8E00536013; 40 | remoteInfo = openFrameworks; 41 | }; 42 | E4EEB9AB138B136A00A80321 /* PBXContainerItemProxy */ = { 43 | isa = PBXContainerItemProxy; 44 | containerPortal = E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */; 45 | proxyType = 1; 46 | remoteGlobalIDString = E4B27C1410CBEB8E00536013; 47 | remoteInfo = openFrameworks; 48 | }; 49 | /* End PBXContainerItemProxy section */ 50 | 51 | /* Begin PBXCopyFilesBuildPhase section */ 52 | E4C2427710CC5ABF004149E2 /* CopyFiles */ = { 53 | isa = PBXCopyFilesBuildPhase; 54 | buildActionMask = 2147483647; 55 | dstPath = ""; 56 | dstSubfolderSpec = 10; 57 | files = ( 58 | BBAB23CB13894F3D00AA2426 /* GLUT.framework in CopyFiles */, 59 | ); 60 | runOnlyForDeploymentPostprocessing = 0; 61 | }; 62 | /* End PBXCopyFilesBuildPhase section */ 63 | 64 | /* Begin PBXFileReference section */ 65 | 2705FFCA1757D1150006CB22 /* ofxAudioDecoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxAudioDecoder.h; sourceTree = ""; }; 66 | 2705FFE91757D2420006CB22 /* CADebugMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CADebugMacros.h; sourceTree = ""; }; 67 | 2705FFEA1757D2420006CB22 /* CAStreamBasicDescription.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAStreamBasicDescription.h; sourceTree = ""; }; 68 | 2705FFEB1757D2420006CB22 /* audiodecoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = audiodecoder.h; sourceTree = ""; }; 69 | 2705FFEC1757D2420006CB22 /* audiodecoderbase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = audiodecoderbase.h; sourceTree = ""; }; 70 | 2705FFED1757D2420006CB22 /* audiodecodercoreaudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = audiodecodercoreaudio.h; sourceTree = ""; }; 71 | 2705FFF41757D2420006CB22 /* audiodecoderbase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = audiodecoderbase.cpp; sourceTree = ""; }; 72 | 2705FFF51757D2420006CB22 /* audiodecodercoreaudio.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = audiodecodercoreaudio.cpp; sourceTree = ""; }; 73 | 27ED8F4B1616472D00C3003B /* ofApp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ofApp.cpp; path = src/ofApp.cpp; sourceTree = SOURCE_ROOT; }; 74 | 27ED8F4C1616472D00C3003B /* ofApp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ofApp.h; path = src/ofApp.h; sourceTree = SOURCE_ROOT; }; 75 | BBAB23BE13894E4700AA2426 /* GLUT.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLUT.framework; path = ../../../libs/glut/lib/osx/GLUT.framework; sourceTree = ""; }; 76 | E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = openFrameworksLib.xcodeproj; path = ../../../libs/openFrameworksCompiled/project/osx/openFrameworksLib.xcodeproj; sourceTree = SOURCE_ROOT; }; 77 | E45BE9710E8CC7DD009D7055 /* AGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AGL.framework; path = /System/Library/Frameworks/AGL.framework; sourceTree = ""; }; 78 | E45BE9720E8CC7DD009D7055 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = ""; }; 79 | E45BE9730E8CC7DD009D7055 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = /System/Library/Frameworks/AudioToolbox.framework; sourceTree = ""; }; 80 | E45BE9740E8CC7DD009D7055 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = ""; }; 81 | E45BE9750E8CC7DD009D7055 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = ""; }; 82 | E45BE9760E8CC7DD009D7055 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = ""; }; 83 | E45BE9770E8CC7DD009D7055 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = ""; }; 84 | E45BE9790E8CC7DD009D7055 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = ""; }; 85 | E45BE97A0E8CC7DD009D7055 /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = ""; }; 86 | E4B69B5B0A3A1756003C02F2 /* ofAppDebug.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ofAppDebug.app; sourceTree = BUILT_PRODUCTS_DIR; }; 87 | E4B69E1D0A3A1BDC003C02F2 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = src/main.cpp; sourceTree = SOURCE_ROOT; }; 88 | E4B6FCAD0C3E899E008CF71C /* openFrameworks-Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; path = "openFrameworks-Info.plist"; sourceTree = ""; }; 89 | E4C2424410CC5A17004149E2 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; 90 | E4C2424510CC5A17004149E2 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; 91 | E4C2424610CC5A17004149E2 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = ""; }; 92 | E4EB691F138AFCF100A09F29 /* CoreOF.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = CoreOF.xcconfig; path = ../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig; sourceTree = SOURCE_ROOT; }; 93 | E4EB6923138AFD0F00A09F29 /* Project.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Project.xcconfig; sourceTree = ""; }; 94 | E7E077E415D3B63C0020DFD4 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = /System/Library/Frameworks/CoreVideo.framework; sourceTree = ""; }; 95 | E7E077E715D3B6510020DFD4 /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = /System/Library/Frameworks/QTKit.framework; sourceTree = ""; }; 96 | E7F985F515E0DE99003869B5 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = /System/Library/Frameworks/Accelerate.framework; sourceTree = ""; }; 97 | /* End PBXFileReference section */ 98 | 99 | /* Begin PBXFrameworksBuildPhase section */ 100 | E4B69B590A3A1756003C02F2 /* Frameworks */ = { 101 | isa = PBXFrameworksBuildPhase; 102 | buildActionMask = 2147483647; 103 | files = ( 104 | E7F985F815E0DEA3003869B5 /* Accelerate.framework in Frameworks */, 105 | E7E077E815D3B6510020DFD4 /* QTKit.framework in Frameworks */, 106 | E4EB6799138ADC1D00A09F29 /* GLUT.framework in Frameworks */, 107 | E4328149138ABC9F0047C5CB /* openFrameworks.a in Frameworks */, 108 | E45BE97B0E8CC7DD009D7055 /* AGL.framework in Frameworks */, 109 | E45BE97C0E8CC7DD009D7055 /* ApplicationServices.framework in Frameworks */, 110 | E45BE97D0E8CC7DD009D7055 /* AudioToolbox.framework in Frameworks */, 111 | E45BE97E0E8CC7DD009D7055 /* Carbon.framework in Frameworks */, 112 | E45BE97F0E8CC7DD009D7055 /* CoreAudio.framework in Frameworks */, 113 | E45BE9800E8CC7DD009D7055 /* CoreFoundation.framework in Frameworks */, 114 | E45BE9810E8CC7DD009D7055 /* CoreServices.framework in Frameworks */, 115 | E45BE9830E8CC7DD009D7055 /* OpenGL.framework in Frameworks */, 116 | E45BE9840E8CC7DD009D7055 /* QuickTime.framework in Frameworks */, 117 | E4C2424710CC5A17004149E2 /* AppKit.framework in Frameworks */, 118 | E4C2424810CC5A17004149E2 /* Cocoa.framework in Frameworks */, 119 | E4C2424910CC5A17004149E2 /* IOKit.framework in Frameworks */, 120 | E7E077E515D3B63C0020DFD4 /* CoreVideo.framework in Frameworks */, 121 | ); 122 | runOnlyForDeploymentPostprocessing = 0; 123 | }; 124 | /* End PBXFrameworksBuildPhase section */ 125 | 126 | /* Begin PBXGroup section */ 127 | 2705FFB01757D0D40006CB22 /* ofxAudioDecoder */ = { 128 | isa = PBXGroup; 129 | children = ( 130 | 2705FFE61757D2420006CB22 /* lib */, 131 | 2705FFC31757D0E20006CB22 /* src */, 132 | ); 133 | name = ofxAudioDecoder; 134 | sourceTree = ""; 135 | }; 136 | 2705FFC31757D0E20006CB22 /* src */ = { 137 | isa = PBXGroup; 138 | children = ( 139 | 2705FFCA1757D1150006CB22 /* ofxAudioDecoder.h */, 140 | ); 141 | name = src; 142 | path = ../src; 143 | sourceTree = ""; 144 | }; 145 | 2705FFE61757D2420006CB22 /* lib */ = { 146 | isa = PBXGroup; 147 | children = ( 148 | 2705FFE71757D2420006CB22 /* include */, 149 | 2705FFEF1757D2420006CB22 /* src */, 150 | ); 151 | name = lib; 152 | path = ../lib; 153 | sourceTree = ""; 154 | }; 155 | 2705FFE71757D2420006CB22 /* include */ = { 156 | isa = PBXGroup; 157 | children = ( 158 | 2705FFE81757D2420006CB22 /* apple */, 159 | 2705FFEB1757D2420006CB22 /* audiodecoder.h */, 160 | 2705FFEC1757D2420006CB22 /* audiodecoderbase.h */, 161 | 2705FFED1757D2420006CB22 /* audiodecodercoreaudio.h */, 162 | ); 163 | path = include; 164 | sourceTree = ""; 165 | }; 166 | 2705FFE81757D2420006CB22 /* apple */ = { 167 | isa = PBXGroup; 168 | children = ( 169 | 2705FFE91757D2420006CB22 /* CADebugMacros.h */, 170 | 2705FFEA1757D2420006CB22 /* CAStreamBasicDescription.h */, 171 | ); 172 | path = apple; 173 | sourceTree = ""; 174 | }; 175 | 2705FFEF1757D2420006CB22 /* src */ = { 176 | isa = PBXGroup; 177 | children = ( 178 | 2705FFF41757D2420006CB22 /* audiodecoderbase.cpp */, 179 | 2705FFF51757D2420006CB22 /* audiodecodercoreaudio.cpp */, 180 | ); 181 | path = src; 182 | sourceTree = ""; 183 | }; 184 | BB4B014C10F69532006C3DED /* addons */ = { 185 | isa = PBXGroup; 186 | children = ( 187 | 2705FFB01757D0D40006CB22 /* ofxAudioDecoder */, 188 | ); 189 | name = addons; 190 | sourceTree = ""; 191 | }; 192 | BBAB23C913894ECA00AA2426 /* system frameworks */ = { 193 | isa = PBXGroup; 194 | children = ( 195 | E7F985F515E0DE99003869B5 /* Accelerate.framework */, 196 | E4C2424410CC5A17004149E2 /* AppKit.framework */, 197 | E4C2424510CC5A17004149E2 /* Cocoa.framework */, 198 | E4C2424610CC5A17004149E2 /* IOKit.framework */, 199 | E45BE9710E8CC7DD009D7055 /* AGL.framework */, 200 | E45BE9720E8CC7DD009D7055 /* ApplicationServices.framework */, 201 | E45BE9730E8CC7DD009D7055 /* AudioToolbox.framework */, 202 | E45BE9740E8CC7DD009D7055 /* Carbon.framework */, 203 | E45BE9750E8CC7DD009D7055 /* CoreAudio.framework */, 204 | E45BE9760E8CC7DD009D7055 /* CoreFoundation.framework */, 205 | E45BE9770E8CC7DD009D7055 /* CoreServices.framework */, 206 | E45BE9790E8CC7DD009D7055 /* OpenGL.framework */, 207 | E45BE97A0E8CC7DD009D7055 /* QuickTime.framework */, 208 | E7E077E415D3B63C0020DFD4 /* CoreVideo.framework */, 209 | E7E077E715D3B6510020DFD4 /* QTKit.framework */, 210 | ); 211 | name = "system frameworks"; 212 | sourceTree = ""; 213 | }; 214 | BBAB23CA13894EDB00AA2426 /* 3rd party frameworks */ = { 215 | isa = PBXGroup; 216 | children = ( 217 | BBAB23BE13894E4700AA2426 /* GLUT.framework */, 218 | ); 219 | name = "3rd party frameworks"; 220 | sourceTree = ""; 221 | }; 222 | E4328144138ABC890047C5CB /* Products */ = { 223 | isa = PBXGroup; 224 | children = ( 225 | E4328148138ABC890047C5CB /* openFrameworks.a */, 226 | ); 227 | name = Products; 228 | sourceTree = ""; 229 | }; 230 | E45BE5980E8CC70C009D7055 /* frameworks */ = { 231 | isa = PBXGroup; 232 | children = ( 233 | BBAB23CA13894EDB00AA2426 /* 3rd party frameworks */, 234 | BBAB23C913894ECA00AA2426 /* system frameworks */, 235 | ); 236 | name = frameworks; 237 | sourceTree = ""; 238 | }; 239 | E4B69B4A0A3A1720003C02F2 = { 240 | isa = PBXGroup; 241 | children = ( 242 | E4B6FCAD0C3E899E008CF71C /* openFrameworks-Info.plist */, 243 | E4EB6923138AFD0F00A09F29 /* Project.xcconfig */, 244 | E4B69E1C0A3A1BDC003C02F2 /* src */, 245 | E4EEC9E9138DF44700A80321 /* openFrameworks */, 246 | BB4B014C10F69532006C3DED /* addons */, 247 | E45BE5980E8CC70C009D7055 /* frameworks */, 248 | E4B69B5B0A3A1756003C02F2 /* ofAppDebug.app */, 249 | ); 250 | sourceTree = ""; 251 | }; 252 | E4B69E1C0A3A1BDC003C02F2 /* src */ = { 253 | isa = PBXGroup; 254 | children = ( 255 | 27ED8F4B1616472D00C3003B /* ofApp.cpp */, 256 | 27ED8F4C1616472D00C3003B /* ofApp.h */, 257 | E4B69E1D0A3A1BDC003C02F2 /* main.cpp */, 258 | ); 259 | path = src; 260 | sourceTree = SOURCE_ROOT; 261 | }; 262 | E4EEC9E9138DF44700A80321 /* openFrameworks */ = { 263 | isa = PBXGroup; 264 | children = ( 265 | E4EB691F138AFCF100A09F29 /* CoreOF.xcconfig */, 266 | E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */, 267 | ); 268 | name = openFrameworks; 269 | sourceTree = ""; 270 | }; 271 | /* End PBXGroup section */ 272 | 273 | /* Begin PBXNativeTarget section */ 274 | E4B69B5A0A3A1756003C02F2 /* ofApp */ = { 275 | isa = PBXNativeTarget; 276 | buildConfigurationList = E4B69B5F0A3A1757003C02F2 /* Build configuration list for PBXNativeTarget "ofApp" */; 277 | buildPhases = ( 278 | E4B69B580A3A1756003C02F2 /* Sources */, 279 | E4B69B590A3A1756003C02F2 /* Frameworks */, 280 | E4B6FFFD0C3F9AB9008CF71C /* ShellScript */, 281 | E4C2427710CC5ABF004149E2 /* CopyFiles */, 282 | ); 283 | buildRules = ( 284 | ); 285 | dependencies = ( 286 | E4EEB9AC138B136A00A80321 /* PBXTargetDependency */, 287 | ); 288 | name = ofApp; 289 | productName = myOFApp; 290 | productReference = E4B69B5B0A3A1756003C02F2 /* ofAppDebug.app */; 291 | productType = "com.apple.product-type.application"; 292 | }; 293 | /* End PBXNativeTarget section */ 294 | 295 | /* Begin PBXProject section */ 296 | E4B69B4C0A3A1720003C02F2 /* Project object */ = { 297 | isa = PBXProject; 298 | buildConfigurationList = E4B69B4D0A3A1720003C02F2 /* Build configuration list for PBXProject "ofApp" */; 299 | compatibilityVersion = "Xcode 2.4"; 300 | developmentRegion = English; 301 | hasScannedForEncodings = 0; 302 | knownRegions = ( 303 | English, 304 | Japanese, 305 | French, 306 | German, 307 | ); 308 | mainGroup = E4B69B4A0A3A1720003C02F2; 309 | productRefGroup = E4B69B4A0A3A1720003C02F2; 310 | projectDirPath = ""; 311 | projectReferences = ( 312 | { 313 | ProductGroup = E4328144138ABC890047C5CB /* Products */; 314 | ProjectRef = E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */; 315 | }, 316 | ); 317 | projectRoot = ""; 318 | targets = ( 319 | E4B69B5A0A3A1756003C02F2 /* ofApp */, 320 | ); 321 | }; 322 | /* End PBXProject section */ 323 | 324 | /* Begin PBXReferenceProxy section */ 325 | E4328148138ABC890047C5CB /* openFrameworks.a */ = { 326 | isa = PBXReferenceProxy; 327 | fileType = archive.ar; 328 | path = openFrameworks.a; 329 | remoteRef = E4328147138ABC890047C5CB /* PBXContainerItemProxy */; 330 | sourceTree = BUILT_PRODUCTS_DIR; 331 | }; 332 | /* End PBXReferenceProxy section */ 333 | 334 | /* Begin PBXShellScriptBuildPhase section */ 335 | E4B6FFFD0C3F9AB9008CF71C /* ShellScript */ = { 336 | isa = PBXShellScriptBuildPhase; 337 | buildActionMask = 2147483647; 338 | files = ( 339 | ); 340 | inputPaths = ( 341 | ); 342 | outputPaths = ( 343 | ); 344 | runOnlyForDeploymentPostprocessing = 0; 345 | shellPath = /bin/sh; 346 | shellScript = "cp -f ../../../libs/fmodex/lib/osx/libfmodex.dylib \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/libfmodex.dylib\"; install_name_tool -change ./libfmodex.dylib @executable_path/libfmodex.dylib \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/$PRODUCT_NAME\";"; 347 | }; 348 | /* End PBXShellScriptBuildPhase section */ 349 | 350 | /* Begin PBXSourcesBuildPhase section */ 351 | E4B69B580A3A1756003C02F2 /* Sources */ = { 352 | isa = PBXSourcesBuildPhase; 353 | buildActionMask = 2147483647; 354 | files = ( 355 | E4B69E200A3A1BDC003C02F2 /* main.cpp in Sources */, 356 | 27ED8F4D1616472D00C3003B /* ofApp.cpp in Sources */, 357 | 2705FFFB1757D2420006CB22 /* audiodecoderbase.cpp in Sources */, 358 | 2705FFFC1757D2420006CB22 /* audiodecodercoreaudio.cpp in Sources */, 359 | ); 360 | runOnlyForDeploymentPostprocessing = 0; 361 | }; 362 | /* End PBXSourcesBuildPhase section */ 363 | 364 | /* Begin PBXTargetDependency section */ 365 | E4EEB9AC138B136A00A80321 /* PBXTargetDependency */ = { 366 | isa = PBXTargetDependency; 367 | name = openFrameworks; 368 | targetProxy = E4EEB9AB138B136A00A80321 /* PBXContainerItemProxy */; 369 | }; 370 | /* End PBXTargetDependency section */ 371 | 372 | /* Begin XCBuildConfiguration section */ 373 | E4B69B4E0A3A1720003C02F2 /* Debug */ = { 374 | isa = XCBuildConfiguration; 375 | baseConfigurationReference = E4EB6923138AFD0F00A09F29 /* Project.xcconfig */; 376 | buildSettings = { 377 | ARCHS = "$(NATIVE_ARCH)"; 378 | CONFIGURATION_BUILD_DIR = "$(SRCROOT)/bin/"; 379 | COPY_PHASE_STRIP = NO; 380 | DEAD_CODE_STRIPPING = YES; 381 | GCC_AUTO_VECTORIZATION = YES; 382 | GCC_ENABLE_SSE3_EXTENSIONS = YES; 383 | GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS = YES; 384 | GCC_INLINES_ARE_PRIVATE_EXTERN = NO; 385 | GCC_OPTIMIZATION_LEVEL = 0; 386 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 387 | GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES; 388 | GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = NO; 389 | GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = NO; 390 | GCC_WARN_UNINITIALIZED_AUTOS = NO; 391 | GCC_WARN_UNUSED_VALUE = NO; 392 | GCC_WARN_UNUSED_VARIABLE = NO; 393 | OTHER_CPLUSPLUSFLAGS = ( 394 | "-D__MACOSX_CORE__", 395 | "-lpthread", 396 | "-mtune=native", 397 | ); 398 | }; 399 | name = Debug; 400 | }; 401 | E4B69B4F0A3A1720003C02F2 /* Release */ = { 402 | isa = XCBuildConfiguration; 403 | baseConfigurationReference = E4EB6923138AFD0F00A09F29 /* Project.xcconfig */; 404 | buildSettings = { 405 | ARCHS = "$(NATIVE_ARCH)"; 406 | CONFIGURATION_BUILD_DIR = "$(SRCROOT)/bin/"; 407 | COPY_PHASE_STRIP = YES; 408 | DEAD_CODE_STRIPPING = YES; 409 | GCC_AUTO_VECTORIZATION = YES; 410 | GCC_ENABLE_SSE3_EXTENSIONS = YES; 411 | GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS = YES; 412 | GCC_INLINES_ARE_PRIVATE_EXTERN = NO; 413 | GCC_OPTIMIZATION_LEVEL = s; 414 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 415 | GCC_UNROLL_LOOPS = YES; 416 | GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES; 417 | GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = NO; 418 | GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = NO; 419 | GCC_WARN_UNINITIALIZED_AUTOS = NO; 420 | GCC_WARN_UNUSED_VALUE = NO; 421 | GCC_WARN_UNUSED_VARIABLE = NO; 422 | OTHER_CPLUSPLUSFLAGS = ( 423 | "-D__MACOSX_CORE__", 424 | "-lpthread", 425 | "-mtune=native", 426 | ); 427 | }; 428 | name = Release; 429 | }; 430 | E4B69B600A3A1757003C02F2 /* Debug */ = { 431 | isa = XCBuildConfiguration; 432 | buildSettings = { 433 | COPY_PHASE_STRIP = NO; 434 | ENABLE_OPENMP_SUPPORT = YES; 435 | FRAMEWORK_SEARCH_PATHS = ( 436 | "$(inherited)", 437 | "$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", 438 | ); 439 | FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../../libs/glut/lib/osx\""; 440 | GCC_DYNAMIC_NO_PIC = NO; 441 | GCC_ENABLE_FIX_AND_CONTINUE = YES; 442 | GCC_GENERATE_DEBUGGING_SYMBOLS = YES; 443 | GCC_MODEL_TUNING = NONE; 444 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 445 | GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h"; 446 | INFOPLIST_FILE = "openFrameworks-Info.plist"; 447 | INSTALL_PATH = "$(HOME)/Applications"; 448 | LIBRARY_SEARCH_PATHS = ( 449 | "$(inherited)", 450 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", 451 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", 452 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3)", 453 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4)", 454 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_5)", 455 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_6)", 456 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_7)", 457 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_8)", 458 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_9)", 459 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_10)", 460 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_11)", 461 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_12)", 462 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_13)", 463 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_14)", 464 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_15)", 465 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", 466 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3)", 467 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_7)", 468 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_8)", 469 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_9)", 470 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_10)", 471 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_11)", 472 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_12)", 473 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_13)", 474 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_16)", 475 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_17)", 476 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_18)", 477 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_19)", 478 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_20)", 479 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_21)", 480 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_22)", 481 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_23)", 482 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_24)", 483 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_25)", 484 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_26)", 485 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_27)", 486 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_28)", 487 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_29)", 488 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_30)", 489 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_31)", 490 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_32)", 491 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_33)", 492 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_34)", 493 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_35)", 494 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_36)", 495 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_37)", 496 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_38)", 497 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_39)", 498 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_40)", 499 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_41)", 500 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_42)", 501 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_43)", 502 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_44)", 503 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_45)", 504 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_46)", 505 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_47)", 506 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_48)", 507 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_49)", 508 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_50)", 509 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_51)", 510 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_52)", 511 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", 512 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", 513 | ); 514 | LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../lib/libaudiodecoder/src/.obj\""; 515 | LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = "\"$(SRCROOT)/../lib/src/.obj\""; 516 | PREBINDING = NO; 517 | PRODUCT_NAME = "$(TARGET_NAME)Debug"; 518 | WRAPPER_EXTENSION = app; 519 | }; 520 | name = Debug; 521 | }; 522 | E4B69B610A3A1757003C02F2 /* Release */ = { 523 | isa = XCBuildConfiguration; 524 | buildSettings = { 525 | COPY_PHASE_STRIP = YES; 526 | ENABLE_OPENMP_SUPPORT = YES; 527 | FRAMEWORK_SEARCH_PATHS = ( 528 | "$(inherited)", 529 | "$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", 530 | ); 531 | FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../../libs/glut/lib/osx\""; 532 | GCC_ENABLE_FIX_AND_CONTINUE = NO; 533 | GCC_GENERATE_DEBUGGING_SYMBOLS = YES; 534 | GCC_MODEL_TUNING = NONE; 535 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 536 | GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h"; 537 | INFOPLIST_FILE = "openFrameworks-Info.plist"; 538 | INSTALL_PATH = "$(HOME)/Applications"; 539 | LIBRARY_SEARCH_PATHS = ( 540 | "$(inherited)", 541 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", 542 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", 543 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3)", 544 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4)", 545 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_5)", 546 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_6)", 547 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_7)", 548 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_8)", 549 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_9)", 550 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_10)", 551 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_11)", 552 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_12)", 553 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_13)", 554 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_14)", 555 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_15)", 556 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", 557 | "$(LIBRARY_SEARCH_PATHS_QUOTED_1)", 558 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3)", 559 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_7)", 560 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_8)", 561 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_9)", 562 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_10)", 563 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_11)", 564 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_12)", 565 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_13)", 566 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_16)", 567 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_17)", 568 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_18)", 569 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_19)", 570 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_20)", 571 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_21)", 572 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_22)", 573 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_23)", 574 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_24)", 575 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_25)", 576 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_26)", 577 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_27)", 578 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_28)", 579 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_29)", 580 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_30)", 581 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_31)", 582 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_32)", 583 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_33)", 584 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_34)", 585 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_35)", 586 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_36)", 587 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_37)", 588 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_38)", 589 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_39)", 590 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_40)", 591 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_41)", 592 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_42)", 593 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_43)", 594 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_44)", 595 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_45)", 596 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_46)", 597 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_47)", 598 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_48)", 599 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_49)", 600 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_50)", 601 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_51)", 602 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", 603 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", 604 | ); 605 | LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../lib/libaudiodecoder/src/.obj\""; 606 | LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = "\"$(SRCROOT)/../lib/src/.obj\""; 607 | PREBINDING = NO; 608 | PRODUCT_NAME = "$(TARGET_NAME)"; 609 | WRAPPER_EXTENSION = app; 610 | }; 611 | name = Release; 612 | }; 613 | /* End XCBuildConfiguration section */ 614 | 615 | /* Begin XCConfigurationList section */ 616 | E4B69B4D0A3A1720003C02F2 /* Build configuration list for PBXProject "ofApp" */ = { 617 | isa = XCConfigurationList; 618 | buildConfigurations = ( 619 | E4B69B4E0A3A1720003C02F2 /* Debug */, 620 | E4B69B4F0A3A1720003C02F2 /* Release */, 621 | ); 622 | defaultConfigurationIsVisible = 0; 623 | defaultConfigurationName = Release; 624 | }; 625 | E4B69B5F0A3A1757003C02F2 /* Build configuration list for PBXNativeTarget "ofApp" */ = { 626 | isa = XCConfigurationList; 627 | buildConfigurations = ( 628 | E4B69B600A3A1757003C02F2 /* Debug */, 629 | E4B69B610A3A1757003C02F2 /* Release */, 630 | ); 631 | defaultConfigurationIsVisible = 0; 632 | defaultConfigurationName = Release; 633 | }; 634 | /* End XCConfigurationList section */ 635 | }; 636 | rootObject = E4B69B4C0A3A1720003C02F2 /* Project object */; 637 | } 638 | -------------------------------------------------------------------------------- /example/ofApp.xcodeproj/xcshareddata/xcschemes/ofApp Debug.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | 14 | 20 | 21 | 22 | 23 | 24 | 29 | 30 | 31 | 32 | 38 | 39 | 40 | 41 | 49 | 50 | 56 | 57 | 58 | 59 | 60 | 61 | 67 | 68 | 74 | 75 | 76 | 77 | 79 | 80 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /example/ofApp.xcodeproj/xcshareddata/xcschemes/ofApp Release.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | 14 | 20 | 21 | 22 | 23 | 24 | 29 | 30 | 31 | 32 | 38 | 39 | 40 | 41 | 49 | 50 | 56 | 57 | 58 | 59 | 60 | 61 | 67 | 68 | 74 | 75 | 76 | 77 | 79 | 80 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /example/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | cc.openFrameworks.ofapp 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | APPL 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleIconFile 20 | ${ICON} 21 | 22 | 23 | -------------------------------------------------------------------------------- /example/src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofApp.h" 2 | #include "ofAppGlutWindow.h" 3 | 4 | int main() { 5 | ofAppGlutWindow window; 6 | ofSetupOpenGL(&window, 1280, 512, OF_WINDOW); 7 | ofRunApp(new ofApp()); 8 | } 9 | -------------------------------------------------------------------------------- /example/src/ofApp.cpp: -------------------------------------------------------------------------------- 1 | #include "ofApp.h" 2 | 3 | void ofApp::setup() { 4 | ofSetVerticalSync(true); 5 | ofSetFrameRate(120); 6 | loadFile("demo.mp3"); 7 | } 8 | 9 | void ofApp::update() { 10 | 11 | } 12 | 13 | void ofApp::draw() { 14 | ofBackground(0); 15 | 16 | ofPushStyle(); 17 | ofPushMatrix(); 18 | { 19 | ofEnableBlendMode(OF_BLENDMODE_ADD); 20 | ofScale((float) ofGetWidth() / audio.getNumFrames(), ofGetHeight() / 2); 21 | ofTranslate(0, 1); 22 | 23 | ofSetColor(ofColor::red); 24 | left.drawWireframe(); 25 | 26 | ofSetColor(ofColor::green); 27 | right.drawWireframe(); 28 | } 29 | ofPopMatrix(); 30 | ofPopStyle(); 31 | 32 | stringstream ss; 33 | ss << "Samples : " << audio.getNumSamples() << endl; 34 | ss << "Channels : " << audio.getNumChannels() << endl; 35 | ss << "Frames : " << audio.getNumFrames(); 36 | ofDrawBitmapString(ss.str(), 10, 20); 37 | } 38 | 39 | void ofApp::dragEvent(ofDragInfo dragInfo) { 40 | loadFile(dragInfo.files[0]); 41 | } 42 | 43 | void ofApp::loadFile(string filename) { 44 | audio.load(filename); 45 | 46 | left.clear(); 47 | right.clear(); 48 | 49 | left.setMode(OF_PRIMITIVE_LINE_STRIP); 50 | right.setMode(OF_PRIMITIVE_LINE_STRIP); 51 | 52 | const vector& rawSamples = audio.getRawSamples(); 53 | int channels = audio.getNumChannels(); 54 | int n = rawSamples.size(); 55 | for(int c = 0; c < channels; c++) { 56 | for(int i = c; i < n; i+= channels) { 57 | (c == 0 ? left : right).addVertex(ofVec2f(i / channels, rawSamples[i])); 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /example/src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | #include "ofxAudioDecoder.h" 5 | 6 | class ofApp : public ofBaseApp { 7 | public: 8 | void setup(); 9 | void update(); 10 | void draw(); 11 | void dragEvent(ofDragInfo dragInfo); 12 | 13 | void loadFile(string filename); 14 | 15 | ofxAudioDecoder audio; 16 | ofMesh left, right; 17 | }; -------------------------------------------------------------------------------- /libs/include/apple/CADebugMacros.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kylemcdonald/ofxAudioDecoder/24b7318d74dc282944c8dadb731b56ab4ffa2e1b/libs/include/apple/CADebugMacros.h -------------------------------------------------------------------------------- /libs/include/apple/CAStreamBasicDescription.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kylemcdonald/ofxAudioDecoder/24b7318d74dc282944c8dadb731b56ab4ffa2e1b/libs/include/apple/CAStreamBasicDescription.h -------------------------------------------------------------------------------- /libs/include/audiodecoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libaudiodecoder - Native Portable Audio Decoder Library 3 | * libaudiodecoder API Header File 4 | * Latest version available at: http://www.oscillicious.com/libaudiodecoder 5 | * 6 | * Copyright (c) 2010-2012 Albert Santoni, Bill Good, RJ Ryan 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files 10 | * (the "Software"), to deal in the Software without restriction, 11 | * including without limitation the rights to use, copy, modify, merge, 12 | * publish, distribute, sublicense, and/or sell copies of the Software, 13 | * and to permit persons to whom the Software is furnished to do so, 14 | * subject to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 23 | * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 24 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 25 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | */ 27 | 28 | /* 29 | * The text above constitutes the entire libaudiodecoder license; however, 30 | * the Oscillicious community also makes the following non-binding requests: 31 | * 32 | * Any person wishing to distribute modifications to the Software is 33 | * requested to send the modifications to the original developer so that 34 | * they can be incorporated into the canonical version. It is also 35 | * requested that these non-binding requests be included along with the 36 | * license above. 37 | */ 38 | 39 | 40 | #ifndef __AUDIODECODER_H__ 41 | #define __AUDIODECODER_H__ 42 | 43 | #include "audiodecoderbase.h" 44 | 45 | #ifdef _WIN32 //Always defined on both Win32 and Win64 - http://msdn.microsoft.com/en-us/library/b0084kay(v=vs.80).aspx 46 | #include "audiodecodermediafoundation.h" 47 | 48 | class DllExport AudioDecoder : public AudioDecoderMediaFoundation 49 | { 50 | public: 51 | AudioDecoder(const std::string filename) : AudioDecoderMediaFoundation(filename) {}; 52 | }; 53 | 54 | #elif __APPLE__ 55 | #include "audiodecodercoreaudio.h" 56 | class AudioDecoder : public AudioDecoderCoreAudio 57 | { 58 | public: 59 | AudioDecoder(const std::string filename) : AudioDecoderCoreAudio(filename) {}; 60 | }; 61 | #endif 62 | 63 | #endif //__AUDIODECODER_H__ 64 | -------------------------------------------------------------------------------- /libs/include/audiodecoderbase.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libaudiodecoder - Native Portable Audio Decoder Library 3 | * libaudiodecoder API Header File 4 | * Latest version available at: http://www.oscillicious.com/libaudiodecoder 5 | * 6 | * Copyright (c) 2010-2012 Albert Santoni, Bill Good, RJ Ryan 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files 10 | * (the "Software"), to deal in the Software without restriction, 11 | * including without limitation the rights to use, copy, modify, merge, 12 | * publish, distribute, sublicense, and/or sell copies of the Software, 13 | * and to permit persons to whom the Software is furnished to do so, 14 | * subject to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 23 | * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 24 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 25 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | */ 27 | 28 | /* 29 | * The text above constitutes the entire libaudiodecoder license; however, 30 | * the Oscillicious community also makes the following non-binding requests: 31 | * 32 | * Any person wishing to distribute modifications to the Software is 33 | * requested to send the modifications to the original developer so that 34 | * they can be incorporated into the canonical version. It is also 35 | * requested that these non-binding requests be included aint with the 36 | * license above. 37 | */ 38 | 39 | 40 | #ifndef __AUDIODECODERBASE_H__ 41 | #define __AUDIODECODERBASE_H__ 42 | 43 | #include 44 | #include 45 | 46 | #ifdef _WIN32 47 | #define DllExport __declspec( dllexport ) 48 | #else 49 | #define DllExport 50 | #endif 51 | 52 | //Types 53 | typedef float SAMPLE; 54 | 55 | //Error codes 56 | #define AUDIODECODER_ERROR -1 57 | #define AUDIODECODER_OK 0 58 | 59 | /** 60 | A word on real-time safety: 61 | At present, all API calls are blocking and none are considered real-time safe. For best performance, 62 | try to avoid calling read() or any other libaudiodecoder function from inside your audio callback. 63 | */ 64 | 65 | class DllExport AudioDecoderBase 66 | { 67 | public: 68 | AudioDecoderBase(const std::string filename); 69 | virtual ~AudioDecoderBase(); 70 | 71 | /** Opens the file for decoding */ 72 | int open() { return 0; }; 73 | 74 | /** Seek to a sample in the file */ 75 | int seek(int filepos) { return 0l; }; 76 | 77 | /** Read a maximum of 'size' samples of audio into buffer. 78 | Samples are always returned as 32-bit floats, with stereo interlacing. 79 | Returns the number of samples read. */ 80 | int read(int size, const SAMPLE *buffer) { return 0u; }; 81 | 82 | /** Get the number of audio samples in the file. This will be a good estimate of the 83 | number of samples you can get out of read(), though you should not rely on it 84 | being perfectly accurate always. (eg. it might be slightly inaccurate with VBR MP3s)*/ 85 | inline int numSamples() const { return m_iNumSamples; }; 86 | 87 | /** Get the number of channels in the audio file */ 88 | inline int channels() const { return m_iChannels; }; 89 | 90 | /** Get the sample rate of the audio file (samples per second) */ 91 | inline int sampleRate() const { return m_iSampleRate; }; 92 | 93 | /** Get the duration of the audio file (seconds) */ 94 | inline float duration() const { return m_fDuration; }; 95 | 96 | /** Get the current playback position in samples */ 97 | inline int positionInSamples() const { return m_iPositionInSamples; }; 98 | 99 | /** Get a list of the filetypes supported by the decoder, by extension */ 100 | static std::vector supportedFileExtensions() 101 | { 102 | return std::vector(); 103 | }; 104 | 105 | protected: 106 | std::string m_filename; 107 | int m_iNumSamples; 108 | int m_iChannels; 109 | int m_iSampleRate; 110 | float m_fDuration; // in seconds 111 | int m_iPositionInSamples; // in samples; 112 | }; 113 | 114 | #endif //__AUDIODECODERBASE_H__ 115 | -------------------------------------------------------------------------------- /libs/include/audiodecodercoreaudio.h: -------------------------------------------------------------------------------- 1 | /* 2 | * libaudiodecoder - Native Portable Audio Decoder Library 3 | * libaudiodecoder API Header File 4 | * Latest version available at: http://www.oscillicious.com/libaudiodecoder 5 | * 6 | * Copyright (c) 2010-2012 Albert Santoni, Bill Good, RJ Ryan 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files 10 | * (the "Software"), to deal in the Software without restriction, 11 | * including without limitation the rights to use, copy, modify, merge, 12 | * publish, distribute, sublicense, and/or sell copies of the Software, 13 | * and to permit persons to whom the Software is furnished to do so, 14 | * subject to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 23 | * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 24 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 25 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | */ 27 | 28 | /* 29 | * The text above constitutes the entire libaudiodecoder license; however, 30 | * the Oscillicious community also makes the following non-binding requests: 31 | * 32 | * Any person wishing to distribute modifications to the Software is 33 | * requested to send the modifications to the original developer so that 34 | * they can be incorporated into the canonical version. It is also 35 | * requested that these non-binding requests be included aint with the 36 | * license above. 37 | */ 38 | 39 | /** 40 | * \file AudioDecoderCoreAudio.h 41 | * \class AudioDecoderCoreAudio 42 | * \brief Decodes M4As (etc) using the AudioToolbox framework included as 43 | * part of Core Audio on OS X (and iOS). 44 | */ 45 | 46 | #ifndef AUDIODECODERCOREAUDIO_H 47 | #define AUDIODECODERCOREAUDIO_H 48 | 49 | #include "audiodecoderbase.h" 50 | 51 | #include 52 | #include "apple/CAStreamBasicDescription.h" 53 | 54 | #if !defined(__COREAUDIO_USE_FLAT_INCLUDES__) 55 | #ifdef TARGET_OS_IPHONE 56 | #include 57 | #elif defined TARGET_OS_MAC 58 | #include 59 | #endif 60 | #include 61 | #include 62 | #include 63 | #else 64 | #include "CoreAudioTypes.h" 65 | #include "AudioFile.h" 66 | #include "AudioFormat.h" 67 | #endif 68 | 69 | #include 70 | 71 | class AudioDecoderCoreAudio : public AudioDecoderBase { 72 | public: 73 | AudioDecoderCoreAudio(const std::string filename); 74 | ~AudioDecoderCoreAudio(); 75 | // Overriding AudioDecoderBase 76 | int open(); 77 | int seek(int sampleIdx); 78 | int read(int size, const SAMPLE *buffer); 79 | static std::vector supportedFileExtensions(); 80 | private: 81 | SInt64 m_headerFrames; 82 | ExtAudioFileRef m_audioFile; 83 | CAStreamBasicDescription m_clientFormat; 84 | CAStreamBasicDescription m_inputFormat; 85 | }; 86 | 87 | 88 | #endif // ifndef AUDIODECODERCOREAUDIO_H 89 | -------------------------------------------------------------------------------- /libs/src/audiodecoderbase.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * libaudiodecoder - Native Portable Audio Decoder Library 3 | * libaudiodecoder API Header File 4 | * Latest version available at: http://www.oscillicious.com/libaudiodecoder 5 | * 6 | * Copyright (c) 2010-2012 Albert Santoni, Bill Good, RJ Ryan 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files 10 | * (the "Software"), to deal in the Software without restriction, 11 | * including without limitation the rights to use, copy, modify, merge, 12 | * publish, distribute, sublicense, and/or sell copies of the Software, 13 | * and to permit persons to whom the Software is furnished to do so, 14 | * subject to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 23 | * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 24 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 25 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | */ 27 | 28 | /* 29 | * The text above constitutes the entire libaudiodecoder license; however, 30 | * the Oscillicious community also makes the following non-binding requests: 31 | * 32 | * Any person wishing to distribute modifications to the Software is 33 | * requested to send the modifications to the original developer so that 34 | * they can be incorporated into the canonical version. It is also 35 | * requested that these non-binding requests be included along with the 36 | * license above. 37 | */ 38 | 39 | #include "audiodecoderbase.h" 40 | 41 | AudioDecoderBase::AudioDecoderBase(const std::string filename) 42 | : m_iNumSamples(0) 43 | , m_iChannels(0) 44 | , m_iSampleRate(0) 45 | , m_fDuration(0) 46 | , m_iPositionInSamples(0) 47 | , m_filename(filename) 48 | { 49 | } 50 | 51 | AudioDecoderBase::~AudioDecoderBase() 52 | { 53 | 54 | } 55 | 56 | 57 | -------------------------------------------------------------------------------- /libs/src/audiodecodercoreaudio.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * libaudiodecoder - Native Portable Audio Decoder Library 3 | * libaudiodecoder API Header File 4 | * Latest version available at: http://www.oscillicious.com/libaudiodecoder 5 | * 6 | * Copyright (c) 2010-2012 Albert Santoni, Bill Good, RJ Ryan 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining 9 | * a copy of this software and associated documentation files 10 | * (the "Software"), to deal in the Software without restriction, 11 | * including without limitation the rights to use, copy, modify, merge, 12 | * publish, distribute, sublicense, and/or sell copies of the Software, 13 | * and to permit persons to whom the Software is furnished to do so, 14 | * subject to the following conditions: 15 | * 16 | * The above copyright notice and this permission notice shall be 17 | * included in all copies or substantial portions of the Software. 18 | * 19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 22 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR 23 | * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 24 | * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 25 | * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26 | */ 27 | 28 | /* 29 | * The text above constitutes the entire libaudiodecoder license; however, 30 | * the Oscillicious community also makes the following non-binding requests: 31 | * 32 | * Any person wishing to distribute modifications to the Software is 33 | * requested to send the modifications to the original developer so that 34 | * they can be incorporated into the canonical version. It is also 35 | * requested that these non-binding requests be included along with the 36 | * license above. 37 | */ 38 | 39 | #include 40 | #include 41 | #include "audiodecodercoreaudio.h" 42 | 43 | 44 | AudioDecoderCoreAudio::AudioDecoderCoreAudio(const std::string filename) 45 | : AudioDecoderBase(filename) 46 | , m_headerFrames(0) 47 | { 48 | m_filename = filename; 49 | } 50 | 51 | AudioDecoderCoreAudio::~AudioDecoderCoreAudio() { 52 | ExtAudioFileDispose(m_audioFile); 53 | 54 | } 55 | 56 | int AudioDecoderCoreAudio::open() { 57 | std::cerr << "AudioDecoderCoreAudio::open()" << std::endl; 58 | 59 | //Open the audio file. 60 | OSStatus err; 61 | 62 | /** This code blocks works with OS X 10.5+ only. DO NOT DELETE IT for now. */ 63 | /*CFStringRef urlStr = CFStringCreateWithCharacters(0, 64 | reinterpret_cast( 65 | //qurlStr.unicode()), qurlStr.size()); 66 | m_filename.data()), m_filename.size()); 67 | */ 68 | CFStringRef urlStr = CFStringCreateWithCString(kCFAllocatorDefault, 69 | m_filename.c_str(), 70 | kCFStringEncodingUTF8); 71 | //CFStringGetSystemEncoding()); 72 | 73 | CFURLRef urlRef = CFURLCreateWithFileSystemPath(NULL, urlStr, kCFURLPOSIXPathStyle, false); 74 | err = ExtAudioFileOpenURL(urlRef, &m_audioFile); 75 | CFRelease(urlStr); 76 | CFRelease(urlRef); 77 | 78 | /** TODO: Use FSRef for compatibility with 10.4 Tiger. 79 | Note that ExtAudioFileOpen() is deprecated above Tiger, so we must maintain 80 | both code paths if someone finishes this part of the code. 81 | FSRef fsRef; 82 | CFURLGetFSRef(reinterpret_cast(url.get()), &fsRef); 83 | err = ExtAudioFileOpen(&fsRef, &m_audioFile); 84 | */ 85 | 86 | if (err != noErr) 87 | { 88 | std::cerr << "AudioDecoderCoreAudio: Error opening file." << std::endl; 89 | return AUDIODECODER_ERROR; 90 | } 91 | 92 | // get the input file format 93 | CAStreamBasicDescription inputFormat; 94 | UInt32 size = sizeof(inputFormat); 95 | err = ExtAudioFileGetProperty(m_audioFile, kExtAudioFileProperty_FileDataFormat, &size, &inputFormat); 96 | if (err != noErr) 97 | { 98 | std::cerr << "AudioDecoderCoreAudio: Error getting file format." << std::endl; 99 | return AUDIODECODER_ERROR; 100 | } 101 | m_inputFormat = inputFormat; 102 | 103 | // create the output format 104 | CAStreamBasicDescription outputFormat; 105 | bzero(&outputFormat, sizeof(AudioStreamBasicDescription)); 106 | outputFormat.mFormatID = kAudioFormatLinearPCM; 107 | outputFormat.mSampleRate = inputFormat.mSampleRate; 108 | outputFormat.mChannelsPerFrame = 2; 109 | #ifdef TARGET_OS_IPHONE 110 | outputFormat.mFormatFlags = kAudioFormatFlagIsFloat; 111 | #elif defined TARGET_OS_MAC 112 | outputFormat.mFormatFlags = kAudioFormatFlagsCanonical; 113 | //kAudioFormatFlagsCanonical means Native endian, float, packed on Mac OS X, 114 | //but signed int for iOS instead. 115 | #endif 116 | 117 | //Note iPhone/iOS only supports signed integers supposedly: 118 | //outputFormat.mFormatFlags = kAudioFormatFlagIsSignedInteger; 119 | 120 | //Debugging: 121 | //printf ("Source File format: "); inputFormat.Print(); 122 | //printf ("Dest File format: "); outputFormat.Print(); 123 | 124 | 125 | /* 126 | switch(inputFormat.mBitsPerChannel) { 127 | case 16: 128 | outputFormat.mFormatFlags = kAppleLosslessFormatFlag_16BitSourceData; 129 | break; 130 | case 20: 131 | outputFormat.mFormatFlags = kAppleLosslessFormatFlag_20BitSourceData; 132 | break; 133 | case 24: 134 | outputFormat.mFormatFlags = kAppleLosslessFormatFlag_24BitSourceData; 135 | break; 136 | case 32: 137 | outputFormat.mFormatFlags = kAppleLosslessFormatFlag_32BitSourceData; 138 | break; 139 | }*/ 140 | 141 | // get and set the client format - it should be lpcm 142 | CAStreamBasicDescription clientFormat = outputFormat; //We're always telling the OS to do the conversion to floats for us now 143 | clientFormat.mChannelsPerFrame = 2; 144 | clientFormat.mBytesPerFrame = sizeof(SAMPLE)*clientFormat.mChannelsPerFrame; 145 | clientFormat.mBitsPerChannel = sizeof(SAMPLE)*8; //16 for signed int, 32 for float; 146 | clientFormat.mFramesPerPacket = 1; 147 | clientFormat.mBytesPerPacket = clientFormat.mBytesPerFrame*clientFormat.mFramesPerPacket; 148 | clientFormat.mReserved = 0; 149 | m_clientFormat = clientFormat; 150 | size = sizeof(clientFormat); 151 | 152 | err = ExtAudioFileSetProperty(m_audioFile, kExtAudioFileProperty_ClientDataFormat, size, &clientFormat); 153 | if (err != noErr) 154 | { 155 | //qDebug() << "SSCA: Error setting file property"; 156 | std::cerr << "AudioDecoderCoreAudio: Error setting file property." << std::endl; 157 | return AUDIODECODER_ERROR; 158 | } 159 | 160 | //Set m_iChannels and m_iNumSamples; 161 | m_iChannels = clientFormat.NumberChannels(); 162 | 163 | //get the total length in frames of the audio file - copypasta: http://discussions.apple.com/thread.jspa?threadID=2364583&tstart=47 164 | UInt32 dataSize; 165 | SInt64 totalFrameCount; 166 | dataSize = sizeof(totalFrameCount); //XXX: This looks sketchy to me - Albert 167 | err = ExtAudioFileGetProperty(m_audioFile, kExtAudioFileProperty_FileLengthFrames, &dataSize, &totalFrameCount); 168 | if (err != noErr) 169 | { 170 | std::cerr << "AudioDecoderCoreAudio: Error getting number of frames." << std::endl; 171 | return AUDIODECODER_ERROR; 172 | } 173 | 174 | // 175 | // WORKAROUND for bug in ExtFileAudio 176 | // 177 | 178 | AudioConverterRef acRef; 179 | UInt32 acrsize=sizeof(AudioConverterRef); 180 | err = ExtAudioFileGetProperty(m_audioFile, kExtAudioFileProperty_AudioConverter, &acrsize, &acRef); 181 | //_ThrowExceptionIfErr(@"kExtAudioFileProperty_AudioConverter", err); 182 | 183 | AudioConverterPrimeInfo primeInfo; 184 | UInt32 piSize=sizeof(AudioConverterPrimeInfo); 185 | memset(&primeInfo, 0, piSize); 186 | err = AudioConverterGetProperty(acRef, kAudioConverterPrimeInfo, &piSize, &primeInfo); 187 | if(err != kAudioConverterErr_PropertyNotSupported) // Only if decompressing 188 | { 189 | //_ThrowExceptionIfErr(@"kAudioConverterPrimeInfo", err); 190 | 191 | m_headerFrames=primeInfo.leadingFrames; 192 | } 193 | 194 | m_iNumSamples = (totalFrameCount/*-m_headerFrames*/)*m_iChannels; 195 | m_iSampleRate = inputFormat.mSampleRate; 196 | m_fDuration = m_iNumSamples / static_cast(m_iSampleRate * m_iChannels); 197 | 198 | //Convert mono files into stereo 199 | if (inputFormat.NumberChannels() == 1) 200 | { 201 | SInt32 channelMap[2] = {0, 0}; // array size should match the number of output channels 202 | AudioConverterSetProperty(acRef, kAudioConverterChannelMap, 203 | sizeof(channelMap), channelMap); 204 | } 205 | 206 | //Seek to position 0, which forces us to skip over all the header frames. 207 | //This makes sure we're ready to just let the Analyser rip and it'll 208 | //get the number of samples it expects (ie. no header frames). 209 | seek(0); 210 | 211 | return AUDIODECODER_OK; 212 | } 213 | 214 | int AudioDecoderCoreAudio::seek(int sampleIdx) { 215 | OSStatus err = noErr; 216 | SInt64 segmentStart = sampleIdx / 2; 217 | 218 | err = ExtAudioFileSeek(m_audioFile, (SInt64)segmentStart+m_headerFrames); 219 | //_ThrowExceptionIfErr(@"ExtAudioFileSeek", err); 220 | //qDebug() << "SSCA: Seeking to" << segmentStart; 221 | 222 | //err = ExtAudioFileSeek(m_audioFile, sampleIdx / 2); 223 | if (err != noErr) 224 | { 225 | std::cerr << "AudioDecoderCoreAudio: Error seeking to sample " << sampleIdx << std::endl; 226 | } 227 | 228 | m_iPositionInSamples = sampleIdx; 229 | 230 | return m_iPositionInSamples; //filepos; 231 | } 232 | 233 | int AudioDecoderCoreAudio::read(int size, const SAMPLE *destination) { 234 | OSStatus err; 235 | SAMPLE *destBuffer(const_cast(destination)); 236 | unsigned int samplesWritten = 0; 237 | unsigned int i = 0; 238 | UInt32 numFrames = 0; 239 | unsigned int totalFramesToRead = size/2; 240 | unsigned int numFramesRead = 0; 241 | unsigned int numFramesToRead = totalFramesToRead; 242 | 243 | while (numFramesRead < totalFramesToRead) { 244 | numFramesToRead = totalFramesToRead - numFramesRead; 245 | 246 | AudioBufferList fillBufList; 247 | fillBufList.mNumberBuffers = 1; //Decode a single track 248 | //See CoreAudioTypes.h for definitins of these variables: 249 | fillBufList.mBuffers[0].mNumberChannels = m_clientFormat.NumberChannels(); 250 | fillBufList.mBuffers[0].mDataByteSize = numFramesToRead*2 * sizeof(SAMPLE); 251 | fillBufList.mBuffers[0].mData = (void*)(&destBuffer[numFramesRead*2]); 252 | 253 | // client format is always linear PCM - so here we determine how many frames of lpcm 254 | // we can read/write given our buffer size 255 | numFrames = numFramesToRead; //This silly variable acts as both a parameter and return value. 256 | err = ExtAudioFileRead (m_audioFile, &numFrames, &fillBufList); 257 | //The actual number of frames read also comes back in numFrames. 258 | //(It's both a parameter to a function and a return value. wat apple?) 259 | //XThrowIfError (err, "ExtAudioFileRead"); 260 | /* 261 | if (err != noErr) 262 | { 263 | std::cerr << "Error reading samples from file" << std::endl; 264 | return 0; 265 | }*/ 266 | 267 | if (!numFrames) { 268 | // this is our termination condition 269 | break; 270 | } 271 | numFramesRead += numFrames; 272 | } 273 | 274 | m_iPositionInSamples += numFramesRead*m_iChannels; 275 | 276 | return numFramesRead*m_iChannels; 277 | } 278 | 279 | 280 | // static 281 | std::vector AudioDecoderCoreAudio::supportedFileExtensions() { 282 | std::vector list; 283 | list.push_back(std::string("m4a")); 284 | list.push_back(std::string("mp3")); 285 | list.push_back(std::string("mp2")); 286 | //Can add mp3, mp2, ac3, and others here if you want. 287 | //See: 288 | // http://developer.apple.com/library/mac/documentation/MusicAudio/Reference/AudioFileConvertRef/Reference/reference.html#//apple_ref/doc/c_ref/AudioFileTypeID 289 | 290 | return list; 291 | } 292 | 293 | 294 | -------------------------------------------------------------------------------- /license.md: -------------------------------------------------------------------------------- 1 | All code in this repository is available under the MIT License. 2 | 3 | https://secure.wikimedia.org/wikipedia/en/wiki/Mit_license 4 | 5 | - - -- 6 | 7 | Copyright (c) 2013- All collaborators on this repository 8 | 9 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # ofxAudioDecoder is an [openFrameworks](http://openframeworks.cc/) wrapper for [libaudiodecoder](https://github.com/asantoni/libaudiodecoder/) 2 | 3 | On OSX it can load .mp3, .m4a, .wav, and some other formats. Instead of being used for playback, it's meant for analysis. Because libaudiodecoder also supports Windows, with the addition of the Windows-specific sources and the creation of a Windows-specific project file ofxAudioDecoder should also run on windows. 4 | 5 | ## Example 6 | 7 | The example project loads a file `demo.mp3` from the `data/` folder and draws the left and right channels into an `ofMesh`. You may drag and drop a file onto the OF app to load it and render the waveform. -------------------------------------------------------------------------------- /src/ofxAudioDecoder.cpp: -------------------------------------------------------------------------------- 1 | #include "ofxAudioDecoder.h" 2 | 3 | //---------- 4 | bool ofxAudioDecoder::load(ofSoundBuffer & buffer, string filename, size_t framesToRead) { 5 | AudioDecoder audioDecoder(ofToDataPath(filename)); 6 | if (audioDecoder.open() != AUDIODECODER_OK) { 7 | ofLogError() << "Failed to load " << filename; 8 | return false; 9 | } 10 | 11 | auto numSamples = audioDecoder.numSamples(); 12 | auto numChannels = audioDecoder.channels(); 13 | auto sampleRate = audioDecoder.sampleRate(); 14 | 15 | buffer.setSampleRate(sampleRate); 16 | buffer.allocate(numSamples / numChannels, numChannels); 17 | 18 | //if user asked for 0 samples 19 | if(framesToRead == 0) { 20 | //we interpet that as wanting to read whole file 21 | framesToRead = numSamples / numChannels; 22 | } 23 | int samplesToRead = framesToRead * numChannels; 24 | int readBufferSize = sampleRate / numChannels; 25 | 26 | int curSample = 0; 27 | auto & rawSamples = buffer.getBuffer(); 28 | while(curSample < samplesToRead) { 29 | int remainingSamples = MIN(readBufferSize, samplesToRead - curSample); 30 | int samplesRead = audioDecoder.read(remainingSamples, &rawSamples[curSample]); 31 | curSample += samplesRead; 32 | if(samplesRead < readBufferSize) { 33 | break; 34 | } 35 | } 36 | 37 | 38 | ofLogVerbose() << "Read " << curSample << " of " << numSamples; 39 | return true; 40 | } 41 | 42 | //---------- 43 | bool ofxAudioDecoder::load(string filename, size_t framesToRead) { 44 | return ofxAudioDecoder::load(this->buffer, filename, framesToRead); 45 | } 46 | 47 | //---------- 48 | int ofxAudioDecoder::getNumChannels() const { 49 | return this->buffer.getNumChannels(); 50 | } 51 | 52 | //---------- 53 | int ofxAudioDecoder::getSampleRate() const { 54 | return this->buffer.getSampleRate(); 55 | } 56 | 57 | //---------- 58 | int ofxAudioDecoder::getNumSamples() const { 59 | return this->buffer.size(); 60 | } 61 | 62 | //---------- 63 | int ofxAudioDecoder::getNumFrames() const { 64 | return this->buffer.getNumFrames(); 65 | } 66 | 67 | //---------- 68 | const ofSoundBuffer & ofxAudioDecoder::getBuffer() const { 69 | return this->buffer; 70 | } 71 | 72 | //---------- 73 | const vector & ofxAudioDecoder::getRawSamples() const { 74 | return this->buffer.getBuffer(); 75 | } -------------------------------------------------------------------------------- /src/ofxAudioDecoder.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | 5 | #include 6 | 7 | class ofxAudioDecoder { 8 | public: 9 | static bool load(ofSoundBuffer & buffer, string filePath, size_t framesToRead = 0); 10 | protected: 11 | ofSoundBuffer buffer; 12 | 13 | public: 14 | bool load(string filename, size_t framesToRead = 0); 15 | 16 | int getNumChannels() const; 17 | int getSampleRate() const; 18 | int getNumSamples() const; 19 | int getNumFrames() const; 20 | 21 | const ofSoundBuffer & getBuffer() const; 22 | const vector & getRawSamples() const; 23 | }; 24 | 25 | --------------------------------------------------------------------------------