Browse Source

removed fixed channel limit from CoreAudio, and improved channel name detection; updated juce demo plugin project to cope with XCode 3.2; fixed a mac shutdown problem

tags/2021-05-28
Julian Storer 16 years ago
parent
commit
ddf22bd416
6 changed files with 146 additions and 78 deletions
  1. +3
    -0
      .gitignore
  2. +3
    -3
      extras/amalgamator/mac/Amalgamator.xcodeproj/project.pbxproj
  3. +26
    -20
      extras/audio plugins/demo/build/mac/JuceDemoPlugin.xcodeproj/project.pbxproj
  4. +59
    -29
      juce_amalgamated.cpp
  5. +54
    -26
      src/native/mac/juce_mac_CoreAudio.cpp
  6. +1
    -0
      src/native/mac/juce_mac_MessageManager.mm

+ 3
- 0
.gitignore View File

@@ -10,7 +10,10 @@ extras/juce demo/build/macosx/build
extras/juce demo/build/win32_vc8/Debug
extras/juce demo/build/win32_vc8/Release
extras/the jucer/build/mac/build
extras/audio plugin host/build/mac/build
extras/binarybuilder/mac/build
bin/intermediate*
bin/lib*
bin/jucelib*
bin/JUCE*


+ 3
- 3
extras/amalgamator/mac/Amalgamator.xcodeproj/project.pbxproj View File

@@ -39,7 +39,7 @@
844B0AB20F52DCCD00B2F1FD /* juce_LibrarySource.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = juce_LibrarySource.mm; path = ../juce_LibrarySource.mm; sourceTree = SOURCE_ROOT; };
844B0AC20F52DEB900B2F1FD /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; };
844B0ACB0F52DECD00B2F1FD /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = "<absolute>"; };
8DD76FB20486AB0100D96B5E /* Amalgamator */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = Amalgamator; sourceTree = BUILT_PRODUCTS_DIR; };
8DD76FB20486AB0100D96B5E /* amalgamator */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = amalgamator; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
@@ -82,7 +82,7 @@
1AB674ADFE9D54B511CA2CBB /* Products */ = {
isa = PBXGroup;
children = (
8DD76FB20486AB0100D96B5E /* Amalgamator */,
8DD76FB20486AB0100D96B5E /* amalgamator */,
);
name = Products;
sourceTree = "<group>";
@@ -118,7 +118,7 @@
name = Amalgamator;
productInstallPath = "$(HOME)/bin";
productName = Amalgamator;
productReference = 8DD76FB20486AB0100D96B5E /* Amalgamator */;
productReference = 8DD76FB20486AB0100D96B5E /* amalgamator */;
productType = "com.apple.product-type.tool";
};
/* End PBXNativeTarget section */


+ 26
- 20
extras/audio plugins/demo/build/mac/JuceDemoPlugin.xcodeproj/project.pbxproj View File

@@ -10,6 +10,7 @@
3EEA126E089847F5002C6BFC /* CAVectorUnit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3EEA126B089847F5002C6BFC /* CAVectorUnit.cpp */; };
3EEA126F089847F5002C6BFC /* CAVectorUnit.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EEA126C089847F5002C6BFC /* CAVectorUnit.h */; };
3EEA1270089847F5002C6BFC /* CAVectorUnitTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EEA126D089847F5002C6BFC /* CAVectorUnitTypes.h */; };
8412B0331048273000072EA3 /* CADebugMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 8412B0321048273000072EA3 /* CADebugMacros.h */; };
843792AA0EFBF14B002A2725 /* DemoEditorComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 843792A20EFBF14B002A2725 /* DemoEditorComponent.cpp */; };
843792AB0EFBF14B002A2725 /* DemoEditorComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = 843792A30EFBF14B002A2725 /* DemoEditorComponent.h */; };
843792AC0EFBF14B002A2725 /* DemoJuceFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 843792A40EFBF14B002A2725 /* DemoJuceFilter.cpp */; };
@@ -118,6 +119,7 @@
3EEA126B089847F5002C6BFC /* CAVectorUnit.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CAVectorUnit.cpp; sourceTree = "<group>"; };
3EEA126C089847F5002C6BFC /* CAVectorUnit.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAVectorUnit.h; sourceTree = "<group>"; };
3EEA126D089847F5002C6BFC /* CAVectorUnitTypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAVectorUnitTypes.h; sourceTree = "<group>"; };
8412B0321048273000072EA3 /* CADebugMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CADebugMacros.h; sourceTree = "<group>"; };
843792A20EFBF14B002A2725 /* DemoEditorComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DemoEditorComponent.cpp; path = ../../src/DemoEditorComponent.cpp; sourceTree = SOURCE_ROOT; };
843792A30EFBF14B002A2725 /* DemoEditorComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DemoEditorComponent.h; path = ../../src/DemoEditorComponent.h; sourceTree = SOURCE_ROOT; };
843792A40EFBF14B002A2725 /* DemoJuceFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DemoJuceFilter.cpp; path = ../../src/DemoJuceFilter.cpp; sourceTree = SOURCE_ROOT; };
@@ -138,14 +140,14 @@
8437956B0EFBF323002A2725 /* DiscRecording.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DiscRecording.framework; path = /System/Library/Frameworks/DiscRecording.framework; sourceTree = "<absolute>"; };
8437956C0EFBF323002A2725 /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = /System/Library/Frameworks/QTKit.framework; sourceTree = "<absolute>"; };
8437956D0EFBF323002A2725 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = /System/Library/Frameworks/WebKit.framework; sourceTree = "<absolute>"; };
8437965F0EFBF357002A2725 /* AUMIDIBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AUMIDIBase.cpp; path = Examples/CoreAudio/AudioUnits/AUPublic/OtherBases/AUMIDIBase.cpp; sourceTree = DEVELOPER_DIR; };
843796600EFBF357002A2725 /* AUMIDIBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AUMIDIBase.h; path = Examples/CoreAudio/AudioUnits/AUPublic/OtherBases/AUMIDIBase.h; sourceTree = DEVELOPER_DIR; };
843796610EFBF357002A2725 /* AUMIDIEffectBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AUMIDIEffectBase.cpp; path = Examples/CoreAudio/AudioUnits/AUPublic/OtherBases/AUMIDIEffectBase.cpp; sourceTree = DEVELOPER_DIR; };
843796620EFBF357002A2725 /* AUMIDIEffectBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AUMIDIEffectBase.h; path = Examples/CoreAudio/AudioUnits/AUPublic/OtherBases/AUMIDIEffectBase.h; sourceTree = DEVELOPER_DIR; };
843796630EFBF357002A2725 /* AUOutputBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AUOutputBase.cpp; path = Examples/CoreAudio/AudioUnits/AUPublic/OtherBases/AUOutputBase.cpp; sourceTree = DEVELOPER_DIR; };
843796640EFBF357002A2725 /* AUOutputBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AUOutputBase.h; path = Examples/CoreAudio/AudioUnits/AUPublic/OtherBases/AUOutputBase.h; sourceTree = DEVELOPER_DIR; };
843796670EFBF357002A2725 /* MusicDeviceBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MusicDeviceBase.cpp; path = Examples/CoreAudio/AudioUnits/AUPublic/OtherBases/MusicDeviceBase.cpp; sourceTree = DEVELOPER_DIR; };
843796680EFBF357002A2725 /* MusicDeviceBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MusicDeviceBase.h; path = Examples/CoreAudio/AudioUnits/AUPublic/OtherBases/MusicDeviceBase.h; sourceTree = DEVELOPER_DIR; };
8437965F0EFBF357002A2725 /* AUMIDIBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AUMIDIBase.cpp; sourceTree = "<group>"; };
843796600EFBF357002A2725 /* AUMIDIBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUMIDIBase.h; sourceTree = "<group>"; };
843796610EFBF357002A2725 /* AUMIDIEffectBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AUMIDIEffectBase.cpp; sourceTree = "<group>"; };
843796620EFBF357002A2725 /* AUMIDIEffectBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUMIDIEffectBase.h; sourceTree = "<group>"; };
843796630EFBF357002A2725 /* AUOutputBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AUOutputBase.cpp; sourceTree = "<group>"; };
843796640EFBF357002A2725 /* AUOutputBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUOutputBase.h; sourceTree = "<group>"; };
843796670EFBF357002A2725 /* MusicDeviceBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MusicDeviceBase.cpp; sourceTree = "<group>"; };
843796680EFBF357002A2725 /* MusicDeviceBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MusicDeviceBase.h; sourceTree = "<group>"; };
8437967D0EFBF5E4002A2725 /* juce_VST_Wrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = juce_VST_Wrapper.cpp; path = ../../../wrapper/VST/juce_VST_Wrapper.cpp; sourceTree = SOURCE_ROOT; };
8437967E0EFBF5E4002A2725 /* juce_VST_Wrapper.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 2; name = juce_VST_Wrapper.mm; path = ../../../wrapper/VST/juce_VST_Wrapper.mm; sourceTree = SOURCE_ROOT; };
843796D50EFBFD16002A2725 /* juce_RTAS_DigiCode1.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = juce_RTAS_DigiCode1.cpp; path = ../../../wrapper/RTAS/juce_RTAS_DigiCode1.cpp; sourceTree = SOURCE_ROOT; };
@@ -159,14 +161,14 @@
843796F50EFC0102002A2725 /* CommonReleaseSettings.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = CommonReleaseSettings.xcconfig; path = /Users/jules/SDKs/PT_80_SDK/AlturaPorts/TDMPlugIns/common/Mac/CommonReleaseSettings.xcconfig; sourceTree = "<absolute>"; };
843796FE0EFC022E002A2725 /* PluginLibrary.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = PluginLibrary.xcodeproj; path = /Users/jules/stuff/PT_73_SDK/AlturaPorts/TDMPlugIns/PlugInLibrary/MacBuild/PluginLibrary.xcodeproj; sourceTree = "<absolute>"; };
84978758103561A60020003B /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
84D3AB5E0FCC744600EA8080 /* AUCarbonViewBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AUCarbonViewBase.cpp; path = Examples/CoreAudio/AudioUnits/AUPublic/AUCarbonViewBase/AUCarbonViewBase.cpp; sourceTree = DEVELOPER_DIR; };
84D3AB620FCC749100EA8080 /* AUCarbonViewBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AUCarbonViewBase.h; path = Examples/CoreAudio/AudioUnits/AUPublic/AUCarbonViewBase/AUCarbonViewBase.h; sourceTree = DEVELOPER_DIR; };
84D3AB650FCC74B300EA8080 /* CarbonEventHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CarbonEventHandler.cpp; path = Examples/CoreAudio/AudioUnits/AUPublic/AUCarbonViewBase/CarbonEventHandler.cpp; sourceTree = DEVELOPER_DIR; };
84D3AB660FCC74B300EA8080 /* CarbonEventHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CarbonEventHandler.h; path = Examples/CoreAudio/AudioUnits/AUPublic/AUCarbonViewBase/CarbonEventHandler.h; sourceTree = DEVELOPER_DIR; };
84D3AB6A0FCC74DA00EA8080 /* AUCarbonViewControl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AUCarbonViewControl.cpp; path = Examples/CoreAudio/AudioUnits/AUPublic/AUCarbonViewBase/AUCarbonViewControl.cpp; sourceTree = DEVELOPER_DIR; };
84D3AB6B0FCC74DA00EA8080 /* AUCarbonViewControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AUCarbonViewControl.h; path = Examples/CoreAudio/AudioUnits/AUPublic/AUCarbonViewBase/AUCarbonViewControl.h; sourceTree = DEVELOPER_DIR; };
84D3AB6F0FCC74F400EA8080 /* AUCarbonViewDispatch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AUCarbonViewDispatch.cpp; path = Examples/CoreAudio/AudioUnits/AUPublic/AUCarbonViewBase/AUCarbonViewDispatch.cpp; sourceTree = DEVELOPER_DIR; };
84D3AB730FCC759700EA8080 /* AUViewLocalizedStringKeys.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AUViewLocalizedStringKeys.h; path = Examples/CoreAudio/AudioUnits/AUPublic/AUViewBase/AUViewLocalizedStringKeys.h; sourceTree = DEVELOPER_DIR; };
84D3AB5E0FCC744600EA8080 /* AUCarbonViewBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AUCarbonViewBase.cpp; path = AUCarbonViewBase/AUCarbonViewBase.cpp; sourceTree = "<group>"; };
84D3AB620FCC749100EA8080 /* AUCarbonViewBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AUCarbonViewBase.h; path = AUCarbonViewBase/AUCarbonViewBase.h; sourceTree = "<group>"; };
84D3AB650FCC74B300EA8080 /* CarbonEventHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CarbonEventHandler.cpp; path = AUCarbonViewBase/CarbonEventHandler.cpp; sourceTree = "<group>"; };
84D3AB660FCC74B300EA8080 /* CarbonEventHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CarbonEventHandler.h; path = AUCarbonViewBase/CarbonEventHandler.h; sourceTree = "<group>"; };
84D3AB6A0FCC74DA00EA8080 /* AUCarbonViewControl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AUCarbonViewControl.cpp; path = AUCarbonViewBase/AUCarbonViewControl.cpp; sourceTree = "<group>"; };
84D3AB6B0FCC74DA00EA8080 /* AUCarbonViewControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AUCarbonViewControl.h; path = AUCarbonViewBase/AUCarbonViewControl.h; sourceTree = "<group>"; };
84D3AB6F0FCC74F400EA8080 /* AUCarbonViewDispatch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AUCarbonViewDispatch.cpp; path = AUCarbonViewBase/AUCarbonViewDispatch.cpp; sourceTree = "<group>"; };
84D3AB730FCC759700EA8080 /* AUViewLocalizedStringKeys.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AUViewLocalizedStringKeys.h; path = AUViewBase/AUViewLocalizedStringKeys.h; sourceTree = "<group>"; };
8BA05A7F072073D200365D66 /* AUBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUBase.cpp; sourceTree = "<group>"; };
8BA05A80072073D200365D66 /* AUBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUBase.h; sourceTree = "<group>"; };
8BA05A81072073D200365D66 /* AUDispatch.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUDispatch.cpp; sourceTree = "<group>"; };
@@ -381,7 +383,7 @@
8BA05AA6072073D200365D66 /* Utility */,
);
name = AUPublic;
path = Examples/CoreAudio/AudioUnits/AUPublic;
path = Extras/CoreAudio/AudioUnits/AUPublic;
sourceTree = DEVELOPER_DIR;
};
8BA05A7E072073D200365D66 /* AUBase */ = {
@@ -438,6 +440,7 @@
8BA05AEB0720742700365D66 /* PublicUtility */ = {
isa = PBXGroup;
children = (
8412B0321048273000072EA3 /* CADebugMacros.h */,
8BA05B050720754400365D66 /* CAAUParameter.cpp */,
8BA05B060720754400365D66 /* CAAUParameter.h */,
8BA05ADF0720742100365D66 /* CAAudioChannelLayout.cpp */,
@@ -451,7 +454,7 @@
3EEA126C089847F5002C6BFC /* CAVectorUnit.h */,
);
name = PublicUtility;
path = Examples/CoreAudio/PublicUtility;
path = Extras/CoreAudio/PublicUtility;
sourceTree = DEVELOPER_DIR;
};
/* End PBXGroup section */
@@ -493,6 +496,7 @@
84D3AB680FCC74B300EA8080 /* CarbonEventHandler.h in Headers */,
84D3AB6D0FCC74DA00EA8080 /* AUCarbonViewControl.h in Headers */,
84D3AB740FCC759700EA8080 /* AUViewLocalizedStringKeys.h in Headers */,
8412B0331048273000072EA3 /* CADebugMacros.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -647,7 +651,7 @@
LIBRARY_STYLE = Bundle;
MACOSX_DEPLOYMENT_TARGET = 10.4;
OTHER_LDFLAGS = "-bundle";
OTHER_REZFLAGS = "-d ppc_$ppc -d i386_$i386 -d ppc64_$ppc64 -d x86_64_$x86_64 -I /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Versions/A/Headers -I \"$(DEVELOPER_DIR)/Examples/CoreAudio/AudioUnits/AUPublic/AUBase\"";
OTHER_REZFLAGS = "-d ppc_$ppc -d i386_$i386 -d ppc64_$ppc64 -d x86_64_$x86_64 -I /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Versions/A/Headers -I \"$(DEVELOPER_DIR)/Extras/CoreAudio/AudioUnits/AUPublic/AUBase\"";
PRODUCT_NAME = JuceDemoPlugin;
WARNING_CFLAGS = (
"-Wmost",
@@ -672,7 +676,7 @@
INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/Components/";
LIBRARY_STYLE = Bundle;
OTHER_LDFLAGS = "-bundle";
OTHER_REZFLAGS = "-d ppc_$ppc -d i386_$i386 -d ppc64_$ppc64 -d x86_64_$x86_64 -I /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Versions/A/Headers -I \"$(DEVELOPER_DIR)/Examples/CoreAudio/AudioUnits/AUPublic/AUBase\"";
OTHER_REZFLAGS = "-d ppc_$ppc -d i386_$i386 -d ppc64_$ppc64 -d x86_64_$x86_64 -I /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Versions/A/Headers -I \"$(DEVELOPER_DIR)/Extras/CoreAudio/AudioUnits/AUPublic/AUBase\"";
PRODUCT_NAME = JuceDemoPlugin;
WARNING_CFLAGS = (
"-Wmost",
@@ -688,6 +692,7 @@
baseConfigurationReference = 843796F40EFC0102002A2725 /* CommonDebugSettings.xcconfig */;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
GCC_VERSION = 4.0;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx10.5;
};
@@ -699,6 +704,7 @@
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_VERSION = 4.0;
SDKROOT = macosx10.5;
};
name = Release;


+ 59
- 29
juce_amalgamated.cpp View File

@@ -256229,14 +256229,14 @@ void juce_findFileClose (void* handle) throw()

bool juce_launchExecutable (const String& pathAndArguments) throw()
{
char* const argv[4] = { "/bin/sh", "-c", (char*) (const char*) pathAndArguments, 0 };
const char* const argv[4] = { "/bin/sh", "-c", (const char*) pathAndArguments, 0 };

const int cpid = fork();

if (cpid == 0)
{
// Child process
if (execve (argv[0], argv, 0) < 0)
if (execve (argv[0], (char**) argv, 0) < 0)
exit (0);
}
else
@@ -257359,7 +257359,7 @@ NSViewComponentPeer::NSViewComponentPeer (Component* const component,

[((JuceNSWindow*) window) setOwner: this];
[window orderOut: nil];
[window setDelegate: window];
[window setDelegate: (JuceNSWindow*) window];
[window setOpaque: component->isOpaque()];
[window setHasShadow: ((windowStyleFlags & windowHasDropShadow) != 0)];

@@ -259611,7 +259611,7 @@ static QTMovie* openMovieFromStream (InputStream* movieStream, File& movieFile)
{
movie = [QTMovie movieWithDataReference: [QTDataReference dataReferenceWithReferenceToData: [NSData dataWithBytes: temp.getData()
length: temp.getSize()]
name: [NSString stringWithCString: suffixesToTry[i]]
name: [NSString stringWithUTF8String: suffixesToTry[i]]
MIMEType: @""]
error: nil];

@@ -260798,6 +260798,7 @@ void MessageManager::stopDispatchLoop()
quitMessagePosted = true;
[NSApp stop: nil];
[NSApp activateIgnoringOtherApps: YES]; // (if the app is inactive, it sits there and ignores the quit request until the next time it gets activated)
[NSEvent startPeriodicEventsAfterDelay: 0 withPeriod: 0.1];
}

static bool isEventBlockedByModalComps (NSEvent* e)
@@ -261270,8 +261271,6 @@ bool WebBrowserComponent::pageAboutToLoad (const String& url)
#define OK(a) (a == noErr)
#endif

static const int maxNumChans = 96;

class CoreAudioInternal : public Timer
{
public:
@@ -261292,7 +261291,11 @@ public:
numOutputChans (0),
callbacksAllowed (true),
numInputChannelInfos (0),
numOutputChannelInfos (0)
numOutputChannelInfos (0),
tempInputBuffers (0),
tempOutputBuffers (0),
inputChannelInfo (0),
outputChannelInfo (0)
{
sampleRate = 0;
bufferSize = 512;
@@ -261324,6 +261327,10 @@ public:
stop (false);

juce_free (audioBuffer);
juce_free (tempInputBuffers);
juce_free (tempOutputBuffers);
juce_free (inputChannelInfo);
juce_free (outputChannelInfo);
delete inputDevice;
}

@@ -261333,8 +261340,10 @@ public:
juce_free (audioBuffer);
audioBuffer = (float*) juce_calloc ((numInputChans + numOutputChans) * tempBufSize * sizeof (float));

zeromem (tempInputBuffers, sizeof (tempInputBuffers));
zeromem (tempOutputBuffers, sizeof (tempOutputBuffers));
juce_free (tempInputBuffers);
tempInputBuffers = (float**) juce_calloc (sizeof (float*) * (numInputChans + 2));
juce_free (tempOutputBuffers);
tempOutputBuffers = (float**) juce_calloc (sizeof (float*) * (numOutputChans + 2));

int i, count = 0;
for (i = 0; i < numInputChans; ++i)
@@ -261345,9 +261354,9 @@ public:
}

// returns the number of actual available channels
void fillInChannelInfo (bool input)
void fillInChannelInfo (const bool input)
{
int chanNum = 0, activeChans = 0;
int chanNum = 0;
UInt32 size;

if (OK (AudioDeviceGetPropertyInfo (deviceID, 0, input, kAudioDevicePropertyStreamConfiguration, &size, 0)))
@@ -261364,31 +261373,47 @@ public:

for (unsigned int j = 0; j < b.mNumberChannels; ++j)
{
String name;

{
uint8 channelName [256];
zerostruct (channelName);
UInt32 nameSize = sizeof (channelName);

if (AudioDeviceGetProperty (deviceID, chanNum + 1, input, kAudioDevicePropertyChannelName,
&nameSize, &channelName) == noErr)
name = String::fromUTF8 (channelName, nameSize);
}

if (input)
{
if (activeInputChans[chanNum])
{
inputChannelInfo [activeChans].streamNum = i;
inputChannelInfo [activeChans].dataOffsetSamples = j;
inputChannelInfo [activeChans].dataStrideSamples = b.mNumberChannels;
++activeChans;
numInputChannelInfos = activeChans;
inputChannelInfo [numInputChannelInfos].streamNum = i;
inputChannelInfo [numInputChannelInfos].dataOffsetSamples = j;
inputChannelInfo [numInputChannelInfos].dataStrideSamples = b.mNumberChannels;
++numInputChannelInfos;
}

inChanNames.add (T("input ") + String (chanNum + 1));
if (name.isEmpty())
name << "Input " << (chanNum + 1);

inChanNames.add (name);
}
else
{
if (activeOutputChans[chanNum])
{
outputChannelInfo [activeChans].streamNum = i;
outputChannelInfo [activeChans].dataOffsetSamples = j;
outputChannelInfo [activeChans].dataStrideSamples = b.mNumberChannels;
++activeChans;
numOutputChannelInfos = activeChans;
outputChannelInfo [numOutputChannelInfos].streamNum = i;
outputChannelInfo [numOutputChannelInfos].dataOffsetSamples = j;
outputChannelInfo [numOutputChannelInfos].dataStrideSamples = b.mNumberChannels;
++numOutputChannelInfos;
}

outChanNames.add (T("output ") + String (chanNum + 1));
if (name.isEmpty())
name << "Output " << (chanNum + 1);

outChanNames.add (name);
}

++chanNum;
@@ -261507,8 +261532,13 @@ public:
inChanNames.clear();
outChanNames.clear();

zeromem (inputChannelInfo, sizeof (inputChannelInfo));
zeromem (outputChannelInfo, sizeof (outputChannelInfo));
juce_free (inputChannelInfo);
inputChannelInfo = (CallbackDetailsForChannel*) juce_calloc (sizeof (CallbackDetailsForChannel) * (numInputChans + 2));
numInputChannelInfos = 0;

juce_free (outputChannelInfo);
outputChannelInfo = (CallbackDetailsForChannel*) juce_calloc (sizeof (CallbackDetailsForChannel) * (numOutputChans + 2));
numOutputChannelInfos = 0;

fillInChannelInfo (true);
fillInChannelInfo (false);
@@ -261961,10 +261991,10 @@ private:
};

int numInputChannelInfos, numOutputChannelInfos;
CallbackDetailsForChannel inputChannelInfo [maxNumChans];
CallbackDetailsForChannel outputChannelInfo [maxNumChans];
float* tempInputBuffers [maxNumChans];
float* tempOutputBuffers [maxNumChans];
CallbackDetailsForChannel* inputChannelInfo;
CallbackDetailsForChannel* outputChannelInfo;
float** tempInputBuffers;
float** tempOutputBuffers;

CoreAudioInternal (const CoreAudioInternal&);
const CoreAudioInternal& operator= (const CoreAudioInternal&);


+ 54
- 26
src/native/mac/juce_mac_CoreAudio.cpp View File

@@ -58,9 +58,6 @@
#define OK(a) (a == noErr)
#endif
//==============================================================================
static const int maxNumChans = 96;
//==============================================================================
class CoreAudioInternal : public Timer
@@ -83,7 +80,11 @@ public:
numOutputChans (0),
callbacksAllowed (true),
numInputChannelInfos (0),
numOutputChannelInfos (0)
numOutputChannelInfos (0),
tempInputBuffers (0),
tempOutputBuffers (0),
inputChannelInfo (0),
outputChannelInfo (0)
{
sampleRate = 0;
bufferSize = 512;
@@ -115,6 +116,10 @@ public:
stop (false);
juce_free (audioBuffer);
juce_free (tempInputBuffers);
juce_free (tempOutputBuffers);
juce_free (inputChannelInfo);
juce_free (outputChannelInfo);
delete inputDevice;
}
@@ -124,8 +129,10 @@ public:
juce_free (audioBuffer);
audioBuffer = (float*) juce_calloc ((numInputChans + numOutputChans) * tempBufSize * sizeof (float));
zeromem (tempInputBuffers, sizeof (tempInputBuffers));
zeromem (tempOutputBuffers, sizeof (tempOutputBuffers));
juce_free (tempInputBuffers);
tempInputBuffers = (float**) juce_calloc (sizeof (float*) * (numInputChans + 2));
juce_free (tempOutputBuffers);
tempOutputBuffers = (float**) juce_calloc (sizeof (float*) * (numOutputChans + 2));
int i, count = 0;
for (i = 0; i < numInputChans; ++i)
@@ -136,9 +143,9 @@ public:
}
// returns the number of actual available channels
void fillInChannelInfo (bool input)
void fillInChannelInfo (const bool input)
{
int chanNum = 0, activeChans = 0;
int chanNum = 0;
UInt32 size;
if (OK (AudioDeviceGetPropertyInfo (deviceID, 0, input, kAudioDevicePropertyStreamConfiguration, &size, 0)))
@@ -155,31 +162,47 @@ public:
for (unsigned int j = 0; j < b.mNumberChannels; ++j)
{
String name;
{
uint8 channelName [256];
zerostruct (channelName);
UInt32 nameSize = sizeof (channelName);
if (AudioDeviceGetProperty (deviceID, chanNum + 1, input, kAudioDevicePropertyChannelName,
&nameSize, &channelName) == noErr)
name = String::fromUTF8 (channelName, nameSize);
}
if (input)
{
if (activeInputChans[chanNum])
{
inputChannelInfo [activeChans].streamNum = i;
inputChannelInfo [activeChans].dataOffsetSamples = j;
inputChannelInfo [activeChans].dataStrideSamples = b.mNumberChannels;
++activeChans;
numInputChannelInfos = activeChans;
inputChannelInfo [numInputChannelInfos].streamNum = i;
inputChannelInfo [numInputChannelInfos].dataOffsetSamples = j;
inputChannelInfo [numInputChannelInfos].dataStrideSamples = b.mNumberChannels;
++numInputChannelInfos;
}
inChanNames.add (T("input ") + String (chanNum + 1));
if (name.isEmpty())
name << "Input " << (chanNum + 1);
inChanNames.add (name);
}
else
{
if (activeOutputChans[chanNum])
{
outputChannelInfo [activeChans].streamNum = i;
outputChannelInfo [activeChans].dataOffsetSamples = j;
outputChannelInfo [activeChans].dataStrideSamples = b.mNumberChannels;
++activeChans;
numOutputChannelInfos = activeChans;
outputChannelInfo [numOutputChannelInfos].streamNum = i;
outputChannelInfo [numOutputChannelInfos].dataOffsetSamples = j;
outputChannelInfo [numOutputChannelInfos].dataStrideSamples = b.mNumberChannels;
++numOutputChannelInfos;
}
outChanNames.add (T("output ") + String (chanNum + 1));
if (name.isEmpty())
name << "Output " << (chanNum + 1);
outChanNames.add (name);
}
++chanNum;
@@ -298,8 +321,13 @@ public:
inChanNames.clear();
outChanNames.clear();
zeromem (inputChannelInfo, sizeof (inputChannelInfo));
zeromem (outputChannelInfo, sizeof (outputChannelInfo));
juce_free (inputChannelInfo);
inputChannelInfo = (CallbackDetailsForChannel*) juce_calloc (sizeof (CallbackDetailsForChannel) * (numInputChans + 2));
numInputChannelInfos = 0;
juce_free (outputChannelInfo);
outputChannelInfo = (CallbackDetailsForChannel*) juce_calloc (sizeof (CallbackDetailsForChannel) * (numOutputChans + 2));
numOutputChannelInfos = 0;
fillInChannelInfo (true);
fillInChannelInfo (false);
@@ -755,10 +783,10 @@ private:
};
int numInputChannelInfos, numOutputChannelInfos;
CallbackDetailsForChannel inputChannelInfo [maxNumChans];
CallbackDetailsForChannel outputChannelInfo [maxNumChans];
float* tempInputBuffers [maxNumChans];
float* tempOutputBuffers [maxNumChans];
CallbackDetailsForChannel* inputChannelInfo;
CallbackDetailsForChannel* outputChannelInfo;
float** tempInputBuffers;
float** tempOutputBuffers;
CoreAudioInternal (const CoreAudioInternal&);
const CoreAudioInternal& operator= (const CoreAudioInternal&);


+ 1
- 0
src/native/mac/juce_mac_MessageManager.mm View File

@@ -264,6 +264,7 @@ void MessageManager::stopDispatchLoop()
quitMessagePosted = true;
[NSApp stop: nil];
[NSApp activateIgnoringOtherApps: YES]; // (if the app is inactive, it sits there and ignores the quit request until the next time it gets activated)
[NSEvent startPeriodicEventsAfterDelay: 0 withPeriod: 0.1];
}
static bool isEventBlockedByModalComps (NSEvent* e)


Loading…
Cancel
Save