mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
added the QuickTimeAudioFormat class
This commit is contained in:
parent
a47ddae4a3
commit
701175832b
8 changed files with 719 additions and 50 deletions
|
|
@ -97,6 +97,8 @@
|
|||
8440CD3E0ACD0FFC0086FFD7 /* juce_ComponentMovementWatcher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8440CD3C0ACD0FFC0086FFD7 /* juce_ComponentMovementWatcher.cpp */; };
|
||||
8440CD3F0ACD0FFC0086FFD7 /* juce_ComponentMovementWatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 8440CD3D0ACD0FFC0086FFD7 /* juce_ComponentMovementWatcher.h */; };
|
||||
8440CD620ACD112E0086FFD7 /* juce_SliderListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 8440CD610ACD112E0086FFD7 /* juce_SliderListener.h */; };
|
||||
84581EEA0D9148C500AE1A4C /* juce_QuickTimeAudioFormat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84581EE80D9148C500AE1A4C /* juce_QuickTimeAudioFormat.cpp */; };
|
||||
84581EEB0D9148C500AE1A4C /* juce_QuickTimeAudioFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = 84581EE90D9148C500AE1A4C /* juce_QuickTimeAudioFormat.h */; };
|
||||
846034DE09CB374E00E255CF /* juce_InterprocessConnection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 846034DA09CB374E00E255CF /* juce_InterprocessConnection.cpp */; };
|
||||
846034DF09CB374E00E255CF /* juce_InterprocessConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 846034DB09CB374E00E255CF /* juce_InterprocessConnection.h */; };
|
||||
846034E009CB374E00E255CF /* juce_InterprocessConnectionServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 846034DC09CB374E00E255CF /* juce_InterprocessConnectionServer.cpp */; };
|
||||
|
|
@ -782,6 +784,8 @@
|
|||
8440CD610ACD112E0086FFD7 /* juce_SliderListener.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_SliderListener.h; sourceTree = "<group>"; };
|
||||
8456EC6508A2A6C80087C412 /* juce_Config.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = juce_Config.h; path = ../../juce_Config.h; sourceTree = SOURCE_ROOT; };
|
||||
8456EC6908A2A6F00087C412 /* JUCE changelist.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = "JUCE changelist.txt"; path = "../../docs/JUCE changelist.txt"; sourceTree = SOURCE_ROOT; };
|
||||
84581EE80D9148C500AE1A4C /* juce_QuickTimeAudioFormat.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = juce_QuickTimeAudioFormat.cpp; sourceTree = "<group>"; };
|
||||
84581EE90D9148C500AE1A4C /* juce_QuickTimeAudioFormat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = juce_QuickTimeAudioFormat.h; sourceTree = "<group>"; };
|
||||
846034DA09CB374E00E255CF /* juce_InterprocessConnection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_InterprocessConnection.cpp; sourceTree = "<group>"; };
|
||||
846034DB09CB374E00E255CF /* juce_InterprocessConnection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_InterprocessConnection.h; sourceTree = "<group>"; };
|
||||
846034DC09CB374E00E255CF /* juce_InterprocessConnectionServer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_InterprocessConnectionServer.cpp; sourceTree = "<group>"; };
|
||||
|
|
@ -1630,6 +1634,8 @@
|
|||
8495BB890D8067B2001D9C0B /* juce_AudioThumbnail.h */,
|
||||
8495BB8A0D8067B2001D9C0B /* juce_AudioThumbnailCache.cpp */,
|
||||
8495BB8B0D8067B2001D9C0B /* juce_AudioThumbnailCache.h */,
|
||||
84581EE80D9148C500AE1A4C /* juce_QuickTimeAudioFormat.cpp */,
|
||||
84581EE90D9148C500AE1A4C /* juce_QuickTimeAudioFormat.h */,
|
||||
84A4884708A22E4900752A2B /* juce_WavAudioFormat.cpp */,
|
||||
84A4884808A22E4900752A2B /* juce_WavAudioFormat.h */,
|
||||
);
|
||||
|
|
@ -2890,6 +2896,7 @@
|
|||
8495BB8F0D8067B2001D9C0B /* juce_AudioThumbnailCache.h in Headers */,
|
||||
8495BB950D806BDA001D9C0B /* juce_FileInputSource.h in Headers */,
|
||||
8495BB960D806BDA001D9C0B /* juce_InputSource.h in Headers */,
|
||||
84581EEB0D9148C500AE1A4C /* juce_QuickTimeAudioFormat.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
@ -3304,6 +3311,7 @@
|
|||
8495BB8C0D8067B2001D9C0B /* juce_AudioThumbnail.cpp in Sources */,
|
||||
8495BB8E0D8067B2001D9C0B /* juce_AudioThumbnailCache.cpp in Sources */,
|
||||
8495BB940D806BDA001D9C0B /* juce_FileInputSource.cpp in Sources */,
|
||||
84581EEA0D9148C500AE1A4C /* juce_QuickTimeAudioFormat.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -677,6 +677,14 @@
|
|||
RelativePath="..\..\..\src\juce_appframework\audio\audio_file_formats\juce_OggVorbisAudioFormat.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\juce_appframework\audio\audio_file_formats\juce_QuickTimeAudioFormat.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\juce_appframework\audio\audio_file_formats\juce_QuickTimeAudioFormat.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\src\juce_appframework\audio\audio_file_formats\juce_WavAudioFormat.cpp"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -7,22 +7,10 @@
|
|||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
3E8BF105079CA60300021B09 /* AUBase.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D199ED03175E1E01CA2136 /* AUBase.h */; };
|
||||
3E8BF106079CA60300021B09 /* AUDispatch.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D199EF03175E1E01CA2136 /* AUDispatch.h */; };
|
||||
3E8BF107079CA60300021B09 /* AUInputElement.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D199F103175E1E01CA2136 /* AUInputElement.h */; };
|
||||
3E8BF108079CA60300021B09 /* AUOutputElement.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D199F303175E1E01CA2136 /* AUOutputElement.h */; };
|
||||
3E8BF109079CA60300021B09 /* AUScopeElement.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D199F603175E1E01CA2136 /* AUScopeElement.h */; };
|
||||
3E8BF10A079CA60300021B09 /* ComponentBase.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D199FA03175E1E01CA2136 /* ComponentBase.h */; };
|
||||
3E8BF10B079CA60300021B09 /* AUEffectBase.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D199FF03175E1E01CA2136 /* AUEffectBase.h */; };
|
||||
3E8BF10C079CA60300021B09 /* AUBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D19A0F03175E1E01CA2136 /* AUBuffer.h */; };
|
||||
3E8BF10D079CA60300021B09 /* CAStreamBasicDescription.h in Headers */ = {isa = PBXBuildFile; fileRef = F5D19A6903175E8C01CA2136 /* CAStreamBasicDescription.h */; };
|
||||
3E8BF10E079CA60300021B09 /* CAAudioChannelLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 7967EF8C04D70E7C00C625F7 /* CAAudioChannelLayout.h */; };
|
||||
3E8BF113079CA60300021B09 /* AUBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5D199EC03175E1E01CA2136 /* AUBase.cpp */; };
|
||||
3E8BF114079CA60300021B09 /* AUDispatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5D199EE03175E1E01CA2136 /* AUDispatch.cpp */; };
|
||||
3E8BF115079CA60300021B09 /* AUInputElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5D199F003175E1E01CA2136 /* AUInputElement.cpp */; };
|
||||
3E8BF116079CA60300021B09 /* AUOutputElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5D199F203175E1E01CA2136 /* AUOutputElement.cpp */; };
|
||||
3E8BF117079CA60300021B09 /* AUScopeElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5D199F503175E1E01CA2136 /* AUScopeElement.cpp */; };
|
||||
3E8BF118079CA60300021B09 /* ComponentBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5D199F903175E1E01CA2136 /* ComponentBase.cpp */; };
|
||||
3E8BF119079CA60300021B09 /* AUEffectBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5D199FE03175E1E01CA2136 /* AUEffectBase.cpp */; };
|
||||
3E8BF11A079CA60300021B09 /* AUBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F5D19A0E03175E1E01CA2136 /* AUBuffer.cpp */; };
|
||||
3E8BF11B079CA60300021B09 /* CAAudioChannelLayout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7967EF8B04D70E7C00C625F7 /* CAAudioChannelLayout.cpp */; };
|
||||
|
|
@ -32,6 +20,18 @@
|
|||
3E8BF121079CA60300021B09 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F5DA37E702821D04014500A0 /* Carbon.framework */; };
|
||||
3E8BF122079CA60300021B09 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F5D19ABE0317606901CA2136 /* AudioUnit.framework */; };
|
||||
844C50290C71B6E300D0082E /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 844C50280C71B6E300D0082E /* IOKit.framework */; };
|
||||
84581F8F0D917FC700AE1A4C /* AUBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84581F820D917FC700AE1A4C /* AUBase.cpp */; };
|
||||
84581F900D917FC700AE1A4C /* AUBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 84581F830D917FC700AE1A4C /* AUBase.h */; };
|
||||
84581F910D917FC700AE1A4C /* AUDispatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84581F840D917FC700AE1A4C /* AUDispatch.cpp */; };
|
||||
84581F920D917FC700AE1A4C /* AUDispatch.h in Headers */ = {isa = PBXBuildFile; fileRef = 84581F850D917FC700AE1A4C /* AUDispatch.h */; };
|
||||
84581F930D917FC700AE1A4C /* AUInputElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84581F860D917FC700AE1A4C /* AUInputElement.cpp */; };
|
||||
84581F940D917FC700AE1A4C /* AUInputElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 84581F870D917FC700AE1A4C /* AUInputElement.h */; };
|
||||
84581F950D917FC700AE1A4C /* AUOutputElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84581F880D917FC700AE1A4C /* AUOutputElement.cpp */; };
|
||||
84581F960D917FC700AE1A4C /* AUOutputElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 84581F890D917FC700AE1A4C /* AUOutputElement.h */; };
|
||||
84581F980D917FC700AE1A4C /* AUScopeElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84581F8B0D917FC700AE1A4C /* AUScopeElement.cpp */; };
|
||||
84581F990D917FC700AE1A4C /* AUScopeElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 84581F8C0D917FC700AE1A4C /* AUScopeElement.h */; };
|
||||
84581F9A0D917FC700AE1A4C /* ComponentBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84581F8D0D917FC700AE1A4C /* ComponentBase.cpp */; };
|
||||
84581F9B0D917FC700AE1A4C /* ComponentBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 84581F8E0D917FC700AE1A4C /* ComponentBase.h */; };
|
||||
845FAE5F0A5C0A6A008C94D8 /* juce.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 845FAE5E0A5C0A6A008C94D8 /* juce.xcconfig */; };
|
||||
845FAEE10A5C2696008C94D8 /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 845FAEE00A5C2696008C94D8 /* QuickTime.framework */; };
|
||||
84B4CDD10C7DD23B0083122F /* MusicDeviceBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84B4CDCF0C7DD23B0083122F /* MusicDeviceBase.cpp */; };
|
||||
|
|
@ -90,13 +90,24 @@
|
|||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
3E3AAA740670E29D00C484A8 /* AUResources.r */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.rez; path = AUResources.r; sourceTree = "<group>"; };
|
||||
3E8BF126079CA60300021B09 /* DemoJuceAudioUnit.component */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DemoJuceAudioUnit.component; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
3E8BF154079CA7A800021B09 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = /System/Library/Frameworks/AudioToolbox.framework; sourceTree = "<absolute>"; };
|
||||
7967EF8B04D70E7C00C625F7 /* CAAudioChannelLayout.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CAAudioChannelLayout.cpp; sourceTree = "<group>"; };
|
||||
7967EF8C04D70E7C00C625F7 /* CAAudioChannelLayout.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAAudioChannelLayout.h; sourceTree = "<group>"; };
|
||||
7967EF8D04D70E7C00C625F7 /* CAStreamBasicDescription.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CAStreamBasicDescription.cpp; sourceTree = "<group>"; };
|
||||
844C50280C71B6E300D0082E /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = IOKit.framework; sourceTree = "<group>"; };
|
||||
84581F820D917FC700AE1A4C /* AUBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AUBase.cpp; path = /Developer/Examples/CoreAudio/AudioUnits/AUPublic/AUBase/AUBase.cpp; sourceTree = "<absolute>"; };
|
||||
84581F830D917FC700AE1A4C /* AUBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AUBase.h; path = /Developer/Examples/CoreAudio/AudioUnits/AUPublic/AUBase/AUBase.h; sourceTree = "<absolute>"; };
|
||||
84581F840D917FC700AE1A4C /* AUDispatch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AUDispatch.cpp; path = /Developer/Examples/CoreAudio/AudioUnits/AUPublic/AUBase/AUDispatch.cpp; sourceTree = "<absolute>"; };
|
||||
84581F850D917FC700AE1A4C /* AUDispatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AUDispatch.h; path = /Developer/Examples/CoreAudio/AudioUnits/AUPublic/AUBase/AUDispatch.h; sourceTree = "<absolute>"; };
|
||||
84581F860D917FC700AE1A4C /* AUInputElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AUInputElement.cpp; path = /Developer/Examples/CoreAudio/AudioUnits/AUPublic/AUBase/AUInputElement.cpp; sourceTree = "<absolute>"; };
|
||||
84581F870D917FC700AE1A4C /* AUInputElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AUInputElement.h; path = /Developer/Examples/CoreAudio/AudioUnits/AUPublic/AUBase/AUInputElement.h; sourceTree = "<absolute>"; };
|
||||
84581F880D917FC700AE1A4C /* AUOutputElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AUOutputElement.cpp; path = /Developer/Examples/CoreAudio/AudioUnits/AUPublic/AUBase/AUOutputElement.cpp; sourceTree = "<absolute>"; };
|
||||
84581F890D917FC700AE1A4C /* AUOutputElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AUOutputElement.h; path = /Developer/Examples/CoreAudio/AudioUnits/AUPublic/AUBase/AUOutputElement.h; sourceTree = "<absolute>"; };
|
||||
84581F8B0D917FC700AE1A4C /* AUScopeElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AUScopeElement.cpp; path = /Developer/Examples/CoreAudio/AudioUnits/AUPublic/AUBase/AUScopeElement.cpp; sourceTree = "<absolute>"; };
|
||||
84581F8C0D917FC700AE1A4C /* AUScopeElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AUScopeElement.h; path = /Developer/Examples/CoreAudio/AudioUnits/AUPublic/AUBase/AUScopeElement.h; sourceTree = "<absolute>"; };
|
||||
84581F8D0D917FC700AE1A4C /* ComponentBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ComponentBase.cpp; path = /Developer/Examples/CoreAudio/AudioUnits/AUPublic/AUBase/ComponentBase.cpp; sourceTree = "<absolute>"; };
|
||||
84581F8E0D917FC700AE1A4C /* ComponentBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ComponentBase.h; path = /Developer/Examples/CoreAudio/AudioUnits/AUPublic/AUBase/ComponentBase.h; sourceTree = "<absolute>"; };
|
||||
845FAE5E0A5C0A6A008C94D8 /* juce.xcconfig */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xcconfig; name = juce.xcconfig; path = ../../../../../build/macosx/juce.xcconfig; sourceTree = SOURCE_ROOT; };
|
||||
845FAEE00A5C2696008C94D8 /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = QuickTime.framework; sourceTree = "<group>"; };
|
||||
84B4CDCF0C7DD23B0083122F /* MusicDeviceBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = MusicDeviceBase.cpp; path = /Developer/Examples/CoreAudio/AudioUnits/AUPublic/OtherBases/MusicDeviceBase.cpp; sourceTree = "<absolute>"; };
|
||||
|
|
@ -128,18 +139,6 @@
|
|||
F4E5DC2A0898301D00589A5A /* CAVectorUnitTypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAVectorUnitTypes.h; sourceTree = "<group>"; };
|
||||
F5AA9A2F0281AAB901C34293 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CoreFoundation.framework; sourceTree = "<group>"; };
|
||||
F5AA9A300281AAB901C34293 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CoreServices.framework; sourceTree = "<group>"; };
|
||||
F5D199EC03175E1E01CA2136 /* AUBase.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AUBase.cpp; sourceTree = "<group>"; };
|
||||
F5D199ED03175E1E01CA2136 /* AUBase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AUBase.h; sourceTree = "<group>"; };
|
||||
F5D199EE03175E1E01CA2136 /* AUDispatch.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AUDispatch.cpp; sourceTree = "<group>"; };
|
||||
F5D199EF03175E1E01CA2136 /* AUDispatch.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AUDispatch.h; sourceTree = "<group>"; };
|
||||
F5D199F003175E1E01CA2136 /* AUInputElement.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AUInputElement.cpp; sourceTree = "<group>"; };
|
||||
F5D199F103175E1E01CA2136 /* AUInputElement.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AUInputElement.h; sourceTree = "<group>"; };
|
||||
F5D199F203175E1E01CA2136 /* AUOutputElement.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AUOutputElement.cpp; sourceTree = "<group>"; };
|
||||
F5D199F303175E1E01CA2136 /* AUOutputElement.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AUOutputElement.h; sourceTree = "<group>"; };
|
||||
F5D199F503175E1E01CA2136 /* AUScopeElement.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AUScopeElement.cpp; sourceTree = "<group>"; };
|
||||
F5D199F603175E1E01CA2136 /* AUScopeElement.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AUScopeElement.h; sourceTree = "<group>"; };
|
||||
F5D199F903175E1E01CA2136 /* ComponentBase.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ComponentBase.cpp; sourceTree = "<group>"; };
|
||||
F5D199FA03175E1E01CA2136 /* ComponentBase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ComponentBase.h; sourceTree = "<group>"; };
|
||||
F5D199FE03175E1E01CA2136 /* AUEffectBase.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AUEffectBase.cpp; sourceTree = "<group>"; };
|
||||
F5D199FF03175E1E01CA2136 /* AUEffectBase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AUEffectBase.h; sourceTree = "<group>"; };
|
||||
F5D19A0E03175E1E01CA2136 /* AUBuffer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AUBuffer.cpp; sourceTree = "<group>"; };
|
||||
|
|
@ -289,19 +288,18 @@
|
|||
F5D199EB03175E1E01CA2136 /* AUBase */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3E3AAA740670E29D00C484A8 /* AUResources.r */,
|
||||
F5D199EC03175E1E01CA2136 /* AUBase.cpp */,
|
||||
F5D199ED03175E1E01CA2136 /* AUBase.h */,
|
||||
F5D199EE03175E1E01CA2136 /* AUDispatch.cpp */,
|
||||
F5D199EF03175E1E01CA2136 /* AUDispatch.h */,
|
||||
F5D199F003175E1E01CA2136 /* AUInputElement.cpp */,
|
||||
F5D199F103175E1E01CA2136 /* AUInputElement.h */,
|
||||
F5D199F203175E1E01CA2136 /* AUOutputElement.cpp */,
|
||||
F5D199F303175E1E01CA2136 /* AUOutputElement.h */,
|
||||
F5D199F503175E1E01CA2136 /* AUScopeElement.cpp */,
|
||||
F5D199F603175E1E01CA2136 /* AUScopeElement.h */,
|
||||
F5D199F903175E1E01CA2136 /* ComponentBase.cpp */,
|
||||
F5D199FA03175E1E01CA2136 /* ComponentBase.h */,
|
||||
84581F820D917FC700AE1A4C /* AUBase.cpp */,
|
||||
84581F830D917FC700AE1A4C /* AUBase.h */,
|
||||
84581F840D917FC700AE1A4C /* AUDispatch.cpp */,
|
||||
84581F850D917FC700AE1A4C /* AUDispatch.h */,
|
||||
84581F860D917FC700AE1A4C /* AUInputElement.cpp */,
|
||||
84581F870D917FC700AE1A4C /* AUInputElement.h */,
|
||||
84581F880D917FC700AE1A4C /* AUOutputElement.cpp */,
|
||||
84581F890D917FC700AE1A4C /* AUOutputElement.h */,
|
||||
84581F8B0D917FC700AE1A4C /* AUScopeElement.cpp */,
|
||||
84581F8C0D917FC700AE1A4C /* AUScopeElement.h */,
|
||||
84581F8D0D917FC700AE1A4C /* ComponentBase.cpp */,
|
||||
84581F8E0D917FC700AE1A4C /* ComponentBase.h */,
|
||||
);
|
||||
path = AUBase;
|
||||
sourceTree = "<group>";
|
||||
|
|
@ -370,12 +368,6 @@
|
|||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
3E8BF105079CA60300021B09 /* AUBase.h in Headers */,
|
||||
3E8BF106079CA60300021B09 /* AUDispatch.h in Headers */,
|
||||
3E8BF107079CA60300021B09 /* AUInputElement.h in Headers */,
|
||||
3E8BF108079CA60300021B09 /* AUOutputElement.h in Headers */,
|
||||
3E8BF109079CA60300021B09 /* AUScopeElement.h in Headers */,
|
||||
3E8BF10A079CA60300021B09 /* ComponentBase.h in Headers */,
|
||||
3E8BF10B079CA60300021B09 /* AUEffectBase.h in Headers */,
|
||||
3E8BF10C079CA60300021B09 /* AUBuffer.h in Headers */,
|
||||
3E8BF10D079CA60300021B09 /* CAStreamBasicDescription.h in Headers */,
|
||||
|
|
@ -390,6 +382,12 @@
|
|||
84F055260906FBCF00AEC8DB /* AUSilentTimeout.h in Headers */,
|
||||
84EB404E090A5116008FAC1B /* JucePluginCharacteristics.h in Headers */,
|
||||
84B4CDD20C7DD23B0083122F /* MusicDeviceBase.h in Headers */,
|
||||
84581F900D917FC700AE1A4C /* AUBase.h in Headers */,
|
||||
84581F920D917FC700AE1A4C /* AUDispatch.h in Headers */,
|
||||
84581F940D917FC700AE1A4C /* AUInputElement.h in Headers */,
|
||||
84581F960D917FC700AE1A4C /* AUOutputElement.h in Headers */,
|
||||
84581F990D917FC700AE1A4C /* AUScopeElement.h in Headers */,
|
||||
84581F9B0D917FC700AE1A4C /* ComponentBase.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
@ -423,6 +421,7 @@
|
|||
F5AA99BA0281A61201C34293 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
buildConfigurationList = A9E884B90874ABE600B2DFE8 /* Build configuration list for PBXProject "JuceDemoAU" */;
|
||||
compatibilityVersion = "Xcode 2.4";
|
||||
hasScannedForEncodings = 1;
|
||||
mainGroup = F5AA99B60281A61201C34293;
|
||||
productRefGroup = F5AA99C40281A62C01C34293 /* Products */;
|
||||
|
|
@ -433,6 +432,7 @@
|
|||
ProjectRef = 84F0545A0906865D00AEC8DB /* Juce.xcodeproj */;
|
||||
},
|
||||
);
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
3E8BF102079CA60300021B09 /* JuceAU */,
|
||||
);
|
||||
|
|
@ -477,19 +477,13 @@
|
|||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
3E8BF115079CA60300021B09 /* AUInputElement.cpp in Sources */,
|
||||
3E8BF116079CA60300021B09 /* AUOutputElement.cpp in Sources */,
|
||||
3E8BF117079CA60300021B09 /* AUScopeElement.cpp in Sources */,
|
||||
3E8BF113079CA60300021B09 /* AUBase.cpp in Sources */,
|
||||
3E8BF119079CA60300021B09 /* AUEffectBase.cpp in Sources */,
|
||||
3E8BF114079CA60300021B09 /* AUDispatch.cpp in Sources */,
|
||||
3E8BF11C079CA60300021B09 /* CAStreamBasicDescription.cpp in Sources */,
|
||||
3E8BF11B079CA60300021B09 /* CAAudioChannelLayout.cpp in Sources */,
|
||||
84CFAF0E090965080053C22C /* CarbonEventHandler.cpp in Sources */,
|
||||
84CFAEFB090964560053C22C /* AUCarbonViewDispatch.cpp in Sources */,
|
||||
84CFAEFC090964560053C22C /* AUCarbonViewControl.cpp in Sources */,
|
||||
84CFAEFD090964560053C22C /* AUCarbonViewBase.cpp in Sources */,
|
||||
3E8BF118079CA60300021B09 /* ComponentBase.cpp in Sources */,
|
||||
84CFAF10090965080053C22C /* CAAUParameter.cpp in Sources */,
|
||||
3E8BF11A079CA60300021B09 /* AUBuffer.cpp in Sources */,
|
||||
84F054E80906C8DD00AEC8DB /* AUMIDIBase.cpp in Sources */,
|
||||
|
|
@ -499,6 +493,12 @@
|
|||
84EB400B090A4A2C008FAC1B /* juce_AudioUnitWrapper.cpp in Sources */,
|
||||
84EB4042090A4F5A008FAC1B /* CAVectorUnit.cpp in Sources */,
|
||||
84B4CDD10C7DD23B0083122F /* MusicDeviceBase.cpp in Sources */,
|
||||
84581F8F0D917FC700AE1A4C /* AUBase.cpp in Sources */,
|
||||
84581F910D917FC700AE1A4C /* AUDispatch.cpp in Sources */,
|
||||
84581F930D917FC700AE1A4C /* AUInputElement.cpp in Sources */,
|
||||
84581F950D917FC700AE1A4C /* AUOutputElement.cpp in Sources */,
|
||||
84581F980D917FC700AE1A4C /* AUScopeElement.cpp in Sources */,
|
||||
84581F9A0D917FC700AE1A4C /* ComponentBase.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
@ -517,6 +517,10 @@
|
|||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
|
||||
GCC_USE_GCC3_PFE_SUPPORT = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
../../../../../,
|
||||
"$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk/usr/include",
|
||||
);
|
||||
INFOPLIST_FILE = "Info-JuceAU.plist";
|
||||
INSTALL_PATH = "/Library/Audio/Plug-Ins/Components/";
|
||||
OTHER_REZFLAGS = "-d ppc_$ppc -d i386_$i386 -I / -I /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/Headers";
|
||||
|
|
|
|||
5
juce.h
5
juce.h
|
|
@ -176,6 +176,11 @@ END_JUCE_NAMESPACE
|
|||
#pragma comment(lib, "OpenGL32.Lib")
|
||||
#pragma comment(lib, "GlU32.Lib")
|
||||
#endif
|
||||
|
||||
#if JUCE_QUICKTIME_AUDIOFORMAT
|
||||
#pragma comment (lib, "QTMLClient.lib")
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -90,6 +90,13 @@
|
|||
#define JUCE_QUICKTIME 1
|
||||
#endif
|
||||
|
||||
/** This lets you enable the QuickTimeAudioFormat class.
|
||||
If you're using this on win32, you'll need to have installed the QuickTime SDK.
|
||||
*/
|
||||
#if ! (defined (JUCE_QUICKTIME_AUDIOFORMAT) || defined (LINUX) || (defined (_WIN32) && ! defined (_MSC_VER)))
|
||||
// #define JUCE_QUICKTIME_AUDIOFORMAT 1
|
||||
#endif
|
||||
|
||||
//=============================================================================
|
||||
/** Comment out this macro if you don't want to enable OpenGL or if you don't
|
||||
have the appropriate headers and libraries available. If it's not enabled, the
|
||||
|
|
|
|||
|
|
@ -230,6 +230,9 @@
|
|||
#ifndef __JUCE_OGGVORBISAUDIOFORMAT_JUCEHEADER__
|
||||
#include "juce_appframework/audio/audio_file_formats/juce_OggVorbisAudioFormat.h"
|
||||
#endif
|
||||
#ifndef __JUCE_QUICKTIMEAUDIOFORMAT_JUCEHEADER__
|
||||
#include "juce_appframework/audio/audio_file_formats/juce_QuickTimeAudioFormat.h"
|
||||
#endif
|
||||
#ifndef __JUCE_WAVAUDIOFORMAT_JUCEHEADER__
|
||||
#include "juce_appframework/audio/audio_file_formats/juce_WavAudioFormat.h"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -0,0 +1,553 @@
|
|||
/*
|
||||
==============================================================================
|
||||
|
||||
This file is part of the JUCE library - "Jules' Utility Class Extensions"
|
||||
Copyright 2004-7 by Raw Material Software ltd.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
JUCE can be redistributed and/or modified under the terms of the
|
||||
GNU General Public License, as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
JUCE is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with JUCE; if not, visit www.gnu.org/licenses or write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
Boston, MA 02111-1307 USA
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
If you'd like to release a closed-source product which uses JUCE, commercial
|
||||
licenses are also available: visit www.rawmaterialsoftware.com/juce for
|
||||
more information.
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
#include "../../../../juce_Config.h"
|
||||
|
||||
#if JUCE_QUICKTIME_AUDIOFORMAT
|
||||
|
||||
#if ! defined (_WIN32)
|
||||
#include <Quicktime/Movies.h>
|
||||
#include <Quicktime/QTML.h>
|
||||
#include <Quicktime/QuickTimeComponents.h>
|
||||
#include <Quicktime/MediaHandlers.h>
|
||||
#include <Quicktime/ImageCodec.h>
|
||||
#else
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning (push)
|
||||
#pragma warning (disable : 4100)
|
||||
#endif
|
||||
|
||||
#include <Movies.h>
|
||||
#include <QTML.h>
|
||||
#include <QuickTimeComponents.h>
|
||||
#include <MediaHandlers.h>
|
||||
#include <ImageCodec.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning (pop)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "../../../juce_core/basics/juce_StandardHeader.h"
|
||||
|
||||
BEGIN_JUCE_NAMESPACE
|
||||
|
||||
#include "juce_QuickTimeAudioFormat.h"
|
||||
#include "../../../juce_core/text/juce_LocalisedStrings.h"
|
||||
#include "../../../juce_core/threads/juce_Thread.h"
|
||||
#include "../../../juce_core/io/files/juce_FileInputStream.h"
|
||||
|
||||
#define qtFormatName TRANS("QuickTime file")
|
||||
static const tchar* const extensions[] = { T(".mov"), T(".mp3"), 0 };
|
||||
|
||||
//==============================================================================
|
||||
class QTAudioReader : public AudioFormatReader
|
||||
{
|
||||
public:
|
||||
QTAudioReader (InputStream* const input_, const int trackNum_)
|
||||
: AudioFormatReader (input_, qtFormatName),
|
||||
ok (false),
|
||||
movie (0),
|
||||
trackNum (trackNum_),
|
||||
extractor (0),
|
||||
lastSampleRead (0),
|
||||
lastThreadId (0)
|
||||
{
|
||||
bufferList = (AudioBufferList*) juce_calloc (256);
|
||||
|
||||
#ifdef WIN32
|
||||
if (InitializeQTML (0) != noErr)
|
||||
return;
|
||||
#endif
|
||||
if (EnterMovies() != noErr)
|
||||
return;
|
||||
|
||||
#if JUCE_MAC
|
||||
EnterMoviesOnThread (0);
|
||||
#endif
|
||||
|
||||
if (! openMovie (input_))
|
||||
return;
|
||||
|
||||
{
|
||||
const int numTracks = GetMovieTrackCount (movie);
|
||||
int trackCount = 0;
|
||||
|
||||
for (int i = 1; i <= numTracks; ++i)
|
||||
{
|
||||
track = GetMovieIndTrack (movie, i);
|
||||
media = GetTrackMedia (track);
|
||||
|
||||
OSType mediaType;
|
||||
GetMediaHandlerDescription (media, &mediaType, 0, 0);
|
||||
|
||||
if (mediaType == SoundMediaType
|
||||
&& trackCount++ == trackNum_)
|
||||
{
|
||||
ok = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (! ok)
|
||||
return;
|
||||
|
||||
ok = false;
|
||||
|
||||
lengthInSamples = GetMediaDecodeDuration (media);
|
||||
usesFloatingPointData = false;
|
||||
|
||||
samplesPerFrame = (int) (GetMediaDecodeDuration (media) / GetMediaSampleCount (media));
|
||||
|
||||
trackUnitsPerFrame = GetMovieTimeScale (movie) * samplesPerFrame
|
||||
/ GetMediaTimeScale (media);
|
||||
|
||||
OSStatus err = MovieAudioExtractionBegin (movie, 0, &extractor);
|
||||
|
||||
unsigned long output_layout_size;
|
||||
err = MovieAudioExtractionGetPropertyInfo (extractor,
|
||||
kQTPropertyClass_MovieAudioExtraction_Audio,
|
||||
kQTMovieAudioExtractionAudioPropertyID_AudioChannelLayout,
|
||||
0, &output_layout_size, 0);
|
||||
if (err != noErr)
|
||||
return;
|
||||
|
||||
AudioChannelLayout* const qt_audio_channel_layout
|
||||
= (AudioChannelLayout*) juce_calloc (output_layout_size);
|
||||
|
||||
err = MovieAudioExtractionGetProperty (extractor,
|
||||
kQTPropertyClass_MovieAudioExtraction_Audio,
|
||||
kQTMovieAudioExtractionAudioPropertyID_AudioChannelLayout,
|
||||
output_layout_size, qt_audio_channel_layout, 0);
|
||||
|
||||
qt_audio_channel_layout->mChannelLayoutTag = kAudioChannelLayoutTag_Stereo;
|
||||
|
||||
err = MovieAudioExtractionSetProperty (extractor,
|
||||
kQTPropertyClass_MovieAudioExtraction_Audio,
|
||||
kQTMovieAudioExtractionAudioPropertyID_AudioChannelLayout,
|
||||
sizeof (qt_audio_channel_layout),
|
||||
qt_audio_channel_layout);
|
||||
|
||||
juce_free (qt_audio_channel_layout);
|
||||
|
||||
err = MovieAudioExtractionGetProperty (extractor,
|
||||
kQTPropertyClass_MovieAudioExtraction_Audio,
|
||||
kQTMovieAudioExtractionAudioPropertyID_AudioStreamBasicDescription,
|
||||
sizeof (inputStreamDesc),
|
||||
&inputStreamDesc, 0);
|
||||
if (err != noErr)
|
||||
return;
|
||||
|
||||
inputStreamDesc.mFormatFlags = kAudioFormatFlagIsSignedInteger
|
||||
| kAudioFormatFlagIsPacked
|
||||
| kAudioFormatFlagsNativeEndian;
|
||||
inputStreamDesc.mBitsPerChannel = sizeof (SInt16) * 8;
|
||||
inputStreamDesc.mChannelsPerFrame = jmin (2, inputStreamDesc.mChannelsPerFrame);
|
||||
inputStreamDesc.mBytesPerFrame = sizeof (SInt16) * inputStreamDesc.mChannelsPerFrame;
|
||||
inputStreamDesc.mBytesPerPacket = inputStreamDesc.mBytesPerFrame;
|
||||
|
||||
err = MovieAudioExtractionSetProperty (extractor,
|
||||
kQTPropertyClass_MovieAudioExtraction_Audio,
|
||||
kQTMovieAudioExtractionAudioPropertyID_AudioStreamBasicDescription,
|
||||
sizeof (inputStreamDesc),
|
||||
&inputStreamDesc);
|
||||
if (err != noErr)
|
||||
return;
|
||||
|
||||
Boolean allChannelsDiscrete = false;
|
||||
err = MovieAudioExtractionSetProperty (extractor,
|
||||
kQTPropertyClass_MovieAudioExtraction_Movie,
|
||||
kQTMovieAudioExtractionMoviePropertyID_AllChannelsDiscrete,
|
||||
sizeof (allChannelsDiscrete),
|
||||
&allChannelsDiscrete);
|
||||
|
||||
if (err != noErr)
|
||||
return;
|
||||
|
||||
bufferList->mNumberBuffers = 1;
|
||||
bufferList->mBuffers[0].mNumberChannels = inputStreamDesc.mChannelsPerFrame;
|
||||
bufferList->mBuffers[0].mDataByteSize = (UInt32) (samplesPerFrame * inputStreamDesc.mBytesPerFrame) + 16;
|
||||
bufferList->mBuffers[0].mData = malloc (bufferList->mBuffers[0].mDataByteSize);
|
||||
|
||||
sampleRate = inputStreamDesc.mSampleRate;
|
||||
bitsPerSample = 16;
|
||||
numChannels = inputStreamDesc.mChannelsPerFrame;
|
||||
|
||||
detachThread();
|
||||
ok = true;
|
||||
}
|
||||
|
||||
~QTAudioReader()
|
||||
{
|
||||
if (extractor != 0)
|
||||
{
|
||||
MovieAudioExtractionEnd (extractor);
|
||||
extractor = 0;
|
||||
}
|
||||
|
||||
checkThreadIsAttached();
|
||||
DisposeMovie (movie);
|
||||
|
||||
juce_free (bufferList->mBuffers[0].mData);
|
||||
juce_free (bufferList);
|
||||
}
|
||||
|
||||
bool read (int** destSamples,
|
||||
int64 startSample,
|
||||
int numSamples)
|
||||
{
|
||||
checkThreadIsAttached();
|
||||
int done = 0;
|
||||
|
||||
while (numSamples > 0)
|
||||
{
|
||||
if (! loadFrame ((int) startSample))
|
||||
return false;
|
||||
|
||||
const int numToDo = jmin (numSamples, samplesPerFrame);
|
||||
|
||||
for (unsigned int j = 0; j < inputStreamDesc.mChannelsPerFrame; ++j)
|
||||
{
|
||||
if (destSamples[j] != 0)
|
||||
{
|
||||
const short* const src = ((const short*) bufferList->mBuffers[0].mData) + j;
|
||||
|
||||
for (int i = 0; i < numToDo; ++i)
|
||||
destSamples[j][done + i] = src [i << 1] << 16;
|
||||
}
|
||||
}
|
||||
|
||||
done += numToDo;
|
||||
startSample += numToDo;
|
||||
numSamples -= numToDo;
|
||||
}
|
||||
|
||||
detachThread();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool loadFrame (const int sampleNum)
|
||||
{
|
||||
if (lastSampleRead != sampleNum)
|
||||
{
|
||||
TimeRecord time;
|
||||
time.scale = (TimeScale) inputStreamDesc.mSampleRate;
|
||||
time.base = 0;
|
||||
time.value.hi = 0;
|
||||
time.value.lo = (UInt32) sampleNum;
|
||||
|
||||
OSStatus err = MovieAudioExtractionSetProperty (extractor,
|
||||
kQTPropertyClass_MovieAudioExtraction_Movie,
|
||||
kQTMovieAudioExtractionMoviePropertyID_CurrentTime,
|
||||
sizeof (time), &time);
|
||||
|
||||
if (err != noErr)
|
||||
return false;
|
||||
}
|
||||
|
||||
bufferList->mBuffers[0].mDataByteSize = inputStreamDesc.mBytesPerFrame * samplesPerFrame;
|
||||
|
||||
UInt32 outFlags = 0;
|
||||
UInt32 actualNumSamples = samplesPerFrame;
|
||||
OSStatus err = MovieAudioExtractionFillBuffer (extractor, &actualNumSamples,
|
||||
bufferList, &outFlags);
|
||||
|
||||
lastSampleRead = sampleNum + samplesPerFrame;
|
||||
|
||||
return err == noErr;
|
||||
}
|
||||
|
||||
juce_UseDebuggingNewOperator
|
||||
|
||||
bool ok;
|
||||
|
||||
private:
|
||||
Movie movie;
|
||||
Media media;
|
||||
Track track;
|
||||
const int trackNum;
|
||||
double trackUnitsPerFrame;
|
||||
int samplesPerFrame;
|
||||
int lastSampleRead, lastThreadId;
|
||||
MovieAudioExtractionRef extractor;
|
||||
AudioStreamBasicDescription inputStreamDesc;
|
||||
AudioBufferList* bufferList;
|
||||
|
||||
/*OSErr readMovieStream (long offset, long size, void* dataPtr)
|
||||
{
|
||||
input->setPosition (offset);
|
||||
input->read (dataPtr, size);
|
||||
return noErr;
|
||||
}
|
||||
|
||||
static OSErr readMovieStreamProc (long offset, long size, void* dataPtr, void* userRef)
|
||||
{
|
||||
return ((QTAudioReader*) userRef)->readMovieStream (offset, size, dataPtr);
|
||||
}*/
|
||||
|
||||
static Handle createHandleDataRef (Handle dataHandle, const char* fileName)
|
||||
{
|
||||
Handle dataRef = 0;
|
||||
OSStatus err = PtrToHand (&dataHandle, &dataRef, sizeof (Handle));
|
||||
if (err == noErr)
|
||||
{
|
||||
Str255 suffix;
|
||||
#if JUCE_WIN32
|
||||
strcpy_s ((char*) suffix, 128, fileName);
|
||||
#else
|
||||
strcpy ((char*) suffix, fileName);
|
||||
#endif
|
||||
StringPtr name = suffix;
|
||||
err = PtrAndHand (name, dataRef, name[0]+1);
|
||||
|
||||
if (err == noErr)
|
||||
{
|
||||
long atoms[3];
|
||||
atoms[0] = EndianU32_NtoB (3 * sizeof (long));
|
||||
atoms[1] = EndianU32_NtoB (kDataRefExtensionMacOSFileType);
|
||||
atoms[2] = EndianU32_NtoB (MovieFileType);
|
||||
|
||||
err = PtrAndHand (atoms, dataRef, 3 * sizeof (long));
|
||||
|
||||
if (err == noErr)
|
||||
return dataRef;
|
||||
}
|
||||
|
||||
DisposeHandle (dataRef);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static CFStringRef juceStringToCFString (const String& s)
|
||||
{
|
||||
const int len = s.length();
|
||||
const juce_wchar* const t = (const juce_wchar*) s;
|
||||
|
||||
UniChar* temp = (UniChar*) juce_malloc (sizeof (UniChar) * len + 4);
|
||||
|
||||
for (int i = 0; i <= len; ++i)
|
||||
temp[i] = t[i];
|
||||
|
||||
CFStringRef result = CFStringCreateWithCharacters (kCFAllocatorDefault, temp, len);
|
||||
juce_free (temp);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
bool openMovie (InputStream* const input)
|
||||
{
|
||||
bool ok = false;
|
||||
|
||||
QTNewMoviePropertyElement props[5];
|
||||
zeromem (props, sizeof (props));
|
||||
int prop = 0;
|
||||
|
||||
FileInputStream* fin = dynamic_cast <FileInputStream*> (input);
|
||||
|
||||
if (fin != 0)
|
||||
{
|
||||
CFStringRef pathString = juceStringToCFString (T("file://") + fin->getFile().getFullPathName().replaceCharacter (T('\\'), T('/')));
|
||||
CFURLRef urlRef = CFURLCreateWithString (kCFAllocatorDefault, pathString, 0);
|
||||
CFRelease (pathString);
|
||||
|
||||
props[prop].propClass = kQTPropertyClass_DataLocation;
|
||||
props[prop].propID = kQTDataLocationPropertyID_CFURL;
|
||||
props[prop].propValueSize = sizeof (urlRef);
|
||||
props[prop].propValueAddress = &urlRef;
|
||||
++prop;
|
||||
|
||||
ok = openMovie (props, prop);
|
||||
}
|
||||
else
|
||||
{
|
||||
// sanity-check because this currently needs to load the whole stream into memory..
|
||||
jassert (input->getTotalLength() < 50 * 1024 * 1024);
|
||||
|
||||
Handle dataHandle = NewHandle ((Size) input->getTotalLength());
|
||||
HLock (dataHandle);
|
||||
// read the entire stream into memory - this is a pain, but can't get it to work
|
||||
// properly using a custom callback to supply the data.
|
||||
input->read (*dataHandle, (int) input->getTotalLength());
|
||||
HUnlock (dataHandle);
|
||||
|
||||
// different types to get QT to try. (We should really be a bit smarter here by
|
||||
// working out in advance which one the stream contains, rather than just trying
|
||||
// each one)
|
||||
const char* const suffixesToTry[] = { "\04.mov", "\04.mp3",
|
||||
"\04.avi", "\04.m4a" };
|
||||
|
||||
for (int i = 0; i < numElementsInArray (suffixesToTry) && ! ok; ++i)
|
||||
{
|
||||
Handle dataRef = createHandleDataRef (dataHandle, suffixesToTry [i]);
|
||||
|
||||
/* // this fails for some bizarre reason - it can be bodged to work with
|
||||
// movies, but can't seem to do it for other file types..
|
||||
QTNewMovieUserProcRecord procInfo;
|
||||
procInfo.getMovieUserProc = NewGetMovieUPP (readMovieStreamProc);
|
||||
procInfo.getMovieUserProcRefcon = this;
|
||||
procInfo.defaultDataRef.dataRef = dataRef;
|
||||
procInfo.defaultDataRef.dataRefType = HandleDataHandlerSubType;
|
||||
|
||||
props[prop].propClass = kQTPropertyClass_DataLocation;
|
||||
props[prop].propID = kQTDataLocationPropertyID_MovieUserProc;
|
||||
props[prop].propValueSize = sizeof (procInfo);
|
||||
props[prop].propValueAddress = (void*) &procInfo;
|
||||
++prop; */
|
||||
|
||||
DataReferenceRecord dr;
|
||||
dr.dataRef = dataRef;
|
||||
dr.dataRefType = HandleDataHandlerSubType;
|
||||
props[prop].propClass = kQTPropertyClass_DataLocation;
|
||||
props[prop].propID = kQTDataLocationPropertyID_DataReference;
|
||||
props[prop].propValueSize = sizeof (dr);
|
||||
props[prop].propValueAddress = (void*) &dr;
|
||||
++prop;
|
||||
|
||||
ok = openMovie (props, prop);
|
||||
|
||||
DisposeHandle (dataRef);
|
||||
}
|
||||
|
||||
DisposeHandle (dataHandle);
|
||||
}
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool openMovie (QTNewMoviePropertyElement* props, int prop)
|
||||
{
|
||||
Boolean trueBool = true;
|
||||
props[prop].propClass = kQTPropertyClass_MovieInstantiation;
|
||||
props[prop].propID = kQTMovieInstantiationPropertyID_DontResolveDataRefs;
|
||||
props[prop].propValueSize = sizeof (trueBool);
|
||||
props[prop].propValueAddress = &trueBool;
|
||||
++prop;
|
||||
|
||||
Boolean isActive = true;
|
||||
props[prop].propClass = kQTPropertyClass_NewMovieProperty;
|
||||
props[prop].propID = kQTNewMoviePropertyID_Active;
|
||||
props[prop].propValueSize = sizeof (isActive);
|
||||
props[prop].propValueAddress = &isActive;
|
||||
++prop;
|
||||
|
||||
#if JUCE_MAC
|
||||
SetPort (0);
|
||||
#else
|
||||
MacSetPort (0);
|
||||
#endif
|
||||
|
||||
return NewMovieFromProperties (prop, props, 0, 0, &movie) == noErr;
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
void checkThreadIsAttached()
|
||||
{
|
||||
#if JUCE_MAC
|
||||
if (Thread::getCurrentThreadId() != lastThreadId)
|
||||
EnterMoviesOnThread (0);
|
||||
AttachMovieToCurrentThread (movie);
|
||||
#endif
|
||||
}
|
||||
|
||||
void detachThread()
|
||||
{
|
||||
#if JUCE_MAC
|
||||
DetachMovieFromCurrentThread (movie);
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
//==============================================================================
|
||||
QuickTimeAudioFormat::QuickTimeAudioFormat()
|
||||
: AudioFormat (qtFormatName, (const tchar**) extensions)
|
||||
{
|
||||
}
|
||||
|
||||
QuickTimeAudioFormat::~QuickTimeAudioFormat()
|
||||
{
|
||||
}
|
||||
|
||||
const Array <int> QuickTimeAudioFormat::getPossibleSampleRates()
|
||||
{
|
||||
return Array<int>();
|
||||
}
|
||||
|
||||
const Array <int> QuickTimeAudioFormat::getPossibleBitDepths()
|
||||
{
|
||||
return Array<int>();
|
||||
}
|
||||
|
||||
bool QuickTimeAudioFormat::canDoStereo()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool QuickTimeAudioFormat::canDoMono()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
AudioFormatReader* QuickTimeAudioFormat::createReaderFor (InputStream* sourceStream,
|
||||
const bool deleteStreamIfOpeningFails)
|
||||
{
|
||||
QTAudioReader* r = new QTAudioReader (sourceStream, 0);
|
||||
|
||||
if (! r->ok)
|
||||
{
|
||||
if (! deleteStreamIfOpeningFails)
|
||||
r->input = 0;
|
||||
|
||||
deleteAndZero (r);
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
AudioFormatWriter* QuickTimeAudioFormat::createWriterFor (OutputStream* /*streamToWriteTo*/,
|
||||
double /*sampleRateToUse*/,
|
||||
unsigned int /*numberOfChannels*/,
|
||||
int /*bitsPerSample*/,
|
||||
const StringPairArray& /*metadataValues*/,
|
||||
int /*qualityOptionIndex*/)
|
||||
{
|
||||
jassertfalse // not yet implemented!
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
END_JUCE_NAMESPACE
|
||||
|
||||
#endif
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
/*
|
||||
==============================================================================
|
||||
|
||||
This file is part of the JUCE library - "Jules' Utility Class Extensions"
|
||||
Copyright 2004-7 by Raw Material Software ltd.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
JUCE can be redistributed and/or modified under the terms of the
|
||||
GNU General Public License, as published by the Free Software Foundation;
|
||||
either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
JUCE is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with JUCE; if not, visit www.gnu.org/licenses or write to the
|
||||
Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
Boston, MA 02111-1307 USA
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
If you'd like to release a closed-source product which uses JUCE, commercial
|
||||
licenses are also available: visit www.rawmaterialsoftware.com/juce for
|
||||
more information.
|
||||
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
#ifndef __JUCE_QUICKTIMEAUDIOFORMAT_JUCEHEADER__
|
||||
#define __JUCE_QUICKTIMEAUDIOFORMAT_JUCEHEADER__
|
||||
|
||||
#include "juce_AudioFormat.h"
|
||||
|
||||
|
||||
//==============================================================================
|
||||
/**
|
||||
Uses QuickTime to read the audio track a movie or media file.
|
||||
|
||||
As well as QuickTime movies, this should also manage to open other audio
|
||||
files that quicktime can understand, like mp3, m4a, etc.
|
||||
|
||||
@see AudioFormat
|
||||
*/
|
||||
class JUCE_API QuickTimeAudioFormat : public AudioFormat
|
||||
{
|
||||
public:
|
||||
//==============================================================================
|
||||
/** Creates a format object. */
|
||||
QuickTimeAudioFormat();
|
||||
|
||||
/** Destructor. */
|
||||
~QuickTimeAudioFormat();
|
||||
|
||||
//==============================================================================
|
||||
const Array <int> getPossibleSampleRates();
|
||||
const Array <int> getPossibleBitDepths();
|
||||
bool canDoStereo();
|
||||
bool canDoMono();
|
||||
|
||||
//==============================================================================
|
||||
AudioFormatReader* createReaderFor (InputStream* sourceStream,
|
||||
const bool deleteStreamIfOpeningFails);
|
||||
|
||||
AudioFormatWriter* createWriterFor (OutputStream* streamToWriteTo,
|
||||
double sampleRateToUse,
|
||||
unsigned int numberOfChannels,
|
||||
int bitsPerSample,
|
||||
const StringPairArray& metadataValues,
|
||||
int qualityOptionIndex);
|
||||
|
||||
|
||||
//==============================================================================
|
||||
juce_UseDebuggingNewOperator
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif // __JUCE_QUICKTIMEAUDIOFORMAT_JUCEHEADER__
|
||||
Loading…
Add table
Add a link
Reference in a new issue