| @@ -529,6 +529,7 @@ | |||
| 84F593AE09855679008153BA /* juce_DocumentWindow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84F593AC09855679008153BA /* juce_DocumentWindow.cpp */; }; | |||
| 84F593AF09855679008153BA /* juce_DocumentWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = 84F593AD09855679008153BA /* juce_DocumentWindow.h */; }; | |||
| 84F593B109855693008153BA /* juce_LassoComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = 84F593B009855693008153BA /* juce_LassoComponent.h */; }; | |||
| 84F597000E23DDBB00E92E85 /* juce_mac_NativeHeaders.h in Headers */ = {isa = PBXBuildFile; fileRef = 84F596FF0E23DDBB00E92E85 /* juce_mac_NativeHeaders.h */; }; | |||
| 84F6B7540C06E29D00BB8791 /* juce_ChannelRemappingAudioSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84F6B7520C06E29D00BB8791 /* juce_ChannelRemappingAudioSource.cpp */; }; | |||
| 84F6B7550C06E29D00BB8791 /* juce_ChannelRemappingAudioSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 84F6B7530C06E29D00BB8791 /* juce_ChannelRemappingAudioSource.h */; }; | |||
| 84F703230E1E56FB00EB338A /* juce_mac_FileChooser.mm in Sources */ = {isa = PBXBuildFile; fileRef = 84F703220E1E56FB00EB338A /* juce_mac_FileChooser.mm */; }; | |||
| @@ -1106,6 +1107,7 @@ | |||
| 84F593AC09855679008153BA /* juce_DocumentWindow.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_DocumentWindow.cpp; sourceTree = "<group>"; }; | |||
| 84F593AD09855679008153BA /* juce_DocumentWindow.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_DocumentWindow.h; sourceTree = "<group>"; }; | |||
| 84F593B009855693008153BA /* juce_LassoComponent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_LassoComponent.h; sourceTree = "<group>"; }; | |||
| 84F596FF0E23DDBB00E92E85 /* juce_mac_NativeHeaders.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = juce_mac_NativeHeaders.h; sourceTree = "<group>"; }; | |||
| 84F6B7520C06E29D00BB8791 /* juce_ChannelRemappingAudioSource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = juce_ChannelRemappingAudioSource.cpp; sourceTree = "<group>"; }; | |||
| 84F6B7530C06E29D00BB8791 /* juce_ChannelRemappingAudioSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_ChannelRemappingAudioSource.h; sourceTree = "<group>"; }; | |||
| 84F703220E1E56FB00EB338A /* juce_mac_FileChooser.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = juce_mac_FileChooser.mm; sourceTree = "<group>"; }; | |||
| @@ -1155,7 +1157,7 @@ | |||
| 84FED3C80CAA96DA00003997 /* juce_FileDragAndDropTarget.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = juce_FileDragAndDropTarget.h; sourceTree = "<group>"; }; | |||
| 84FFAF290C6C8F2B009F6E72 /* juce_FileSearchPathListComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = juce_FileSearchPathListComponent.cpp; path = filebrowser/juce_FileSearchPathListComponent.cpp; sourceTree = "<group>"; }; | |||
| 84FFAF2A0C6C8F2B009F6E72 /* juce_FileSearchPathListComponent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = juce_FileSearchPathListComponent.h; path = filebrowser/juce_FileSearchPathListComponent.h; sourceTree = "<group>"; }; | |||
| D2AAC046055464E500DB518D /* libjucedebug.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libjucedebug.a; sourceTree = BUILT_PRODUCTS_DIR; }; | |||
| D2AAC046055464E500DB518D /* libjuce.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libjuce.a; sourceTree = BUILT_PRODUCTS_DIR; }; | |||
| /* End PBXFileReference section */ | |||
| /* Begin PBXFrameworksBuildPhase section */ | |||
| @@ -1195,7 +1197,7 @@ | |||
| 1AB674ADFE9D54B511CA2CBB /* Products */ = { | |||
| isa = PBXGroup; | |||
| children = ( | |||
| D2AAC046055464E500DB518D /* libjucedebug.a */, | |||
| D2AAC046055464E500DB518D /* libjuce.a */, | |||
| ); | |||
| name = Products; | |||
| sourceTree = "<group>"; | |||
| @@ -1318,6 +1320,7 @@ | |||
| 84A4881C08A22E2400752A2B /* mac specific code */ = { | |||
| isa = PBXGroup; | |||
| children = ( | |||
| 84F596FF0E23DDBB00E92E85 /* juce_mac_NativeHeaders.h */, | |||
| 8463D31F0E1FC25A003B46B2 /* juce_mac_Fonts.mm */, | |||
| 8463D3200E1FC25A003B46B2 /* juce_mac_Messaging.mm */, | |||
| 8463D3210E1FC25A003B46B2 /* juce_mac_Windowing.mm */, | |||
| @@ -2511,6 +2514,7 @@ | |||
| 848A560E0DDDD3FB0041C706 /* juce_WebBrowserComponent.h in Headers */, | |||
| 84688AFC0DED58820077FDEA /* juce_AudioProcessorGraph.h in Headers */, | |||
| 84688AFE0DED58820077FDEA /* juce_AudioProcessorPlayer.h in Headers */, | |||
| 84F597000E23DDBB00E92E85 /* juce_mac_NativeHeaders.h in Headers */, | |||
| ); | |||
| runOnlyForDeploymentPostprocessing = 0; | |||
| }; | |||
| @@ -2531,7 +2535,7 @@ | |||
| ); | |||
| name = Juce; | |||
| productName = Juce; | |||
| productReference = D2AAC046055464E500DB518D /* libjucedebug.a */; | |||
| productReference = D2AAC046055464E500DB518D /* libjuce.a */; | |||
| productType = "com.apple.product-type.library.static"; | |||
| }; | |||
| /* End PBXNativeTarget section */ | |||
| @@ -29,11 +29,10 @@ | |||
| ============================================================================== | |||
| */ | |||
| #include "../../../src/juce_core/basics/juce_StandardHeader.h" | |||
| #include "juce_mac_NativeHeaders.h" | |||
| #if JUCE_USE_CDBURNER | |||
| #import <Cocoa/Cocoa.h> | |||
| #import <DiscRecording/DiscRecording.h> | |||
| BEGIN_JUCE_NAMESPACE | |||
| @@ -336,33 +335,29 @@ BEGIN_JUCE_NAMESPACE | |||
| AudioCDBurner::AudioCDBurner (const int deviceIndex) | |||
| : internal (0) | |||
| { | |||
| NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; | |||
| const AutoPool pool; | |||
| OpenDiskDevice* dev = [[OpenDiskDevice alloc] initWithDevice: [[DRDevice devices] objectAtIndex: deviceIndex]]; | |||
| internal = (void*) dev; | |||
| [pool release]; | |||
| } | |||
| AudioCDBurner::~AudioCDBurner() | |||
| { | |||
| NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; | |||
| const AutoPool pool; | |||
| OpenDiskDevice* dev = (OpenDiskDevice*) internal; | |||
| if (dev != 0) | |||
| [dev release]; | |||
| [pool release]; | |||
| } | |||
| AudioCDBurner* AudioCDBurner::openDevice (const int deviceIndex) | |||
| { | |||
| NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; | |||
| const AutoPool pool; | |||
| AudioCDBurner* b = new AudioCDBurner (deviceIndex); | |||
| if (b->internal == 0) | |||
| deleteAndZero (b); | |||
| [pool release]; | |||
| return b; | |||
| } | |||
| @@ -389,14 +384,13 @@ static NSArray* findDiskBurnerDevices() | |||
| const StringArray AudioCDBurner::findAvailableDevices() | |||
| { | |||
| NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; | |||
| const AutoPool pool; | |||
| NSArray* names = findDiskBurnerDevices(); | |||
| StringArray s; | |||
| for (int i = 0; i < [names count]; ++i) | |||
| s.add (String::fromUTF8 ((juce::uint8*) [[names objectAtIndex: i] UTF8String])); | |||
| [pool release]; | |||
| return s; | |||
| } | |||
| @@ -416,17 +410,15 @@ int AudioCDBurner::getNumAvailableAudioBlocks() const | |||
| bool AudioCDBurner::addAudioTrack (AudioSource* source, int numSamps) | |||
| { | |||
| NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; | |||
| const AutoPool pool; | |||
| OpenDiskDevice* dev = (OpenDiskDevice*) internal; | |||
| if (dev != 0) | |||
| { | |||
| [dev addSourceTrack: source numSamples: numSamps]; | |||
| [pool release]; | |||
| return true; | |||
| } | |||
| [pool release]; | |||
| return false; | |||
| } | |||
| @@ -434,7 +426,7 @@ const String AudioCDBurner::burn (juce::AudioCDBurner::BurnProgressListener* lis | |||
| const bool ejectDiscAfterwards, | |||
| const bool peformFakeBurnForTesting) | |||
| { | |||
| NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; | |||
| const AutoPool pool; | |||
| juce::String error ("Couldn't open or write to the CD device"); | |||
| OpenDiskDevice* dev = (OpenDiskDevice*) internal; | |||
| @@ -448,7 +440,6 @@ const String AudioCDBurner::burn (juce::AudioCDBurner::BurnProgressListener* lis | |||
| isFake: peformFakeBurnForTesting]; | |||
| } | |||
| [pool release]; | |||
| return error; | |||
| } | |||
| @@ -29,11 +29,9 @@ | |||
| ============================================================================== | |||
| */ | |||
| #include <Cocoa/Cocoa.h> | |||
| #include "juce_mac_NativeHeaders.h" | |||
| #include <fnmatch.h> | |||
| #include "../../../src/juce_core/basics/juce_StandardHeader.h" | |||
| BEGIN_JUCE_NAMESPACE | |||
| #include "../../../src/juce_appframework/gui/components/filebrowser/juce_FileChooser.h" | |||
| END_JUCE_NAMESPACE | |||
| @@ -92,6 +90,7 @@ static NSString* juceStringToNS (const juce::String& s) | |||
| BEGIN_JUCE_NAMESPACE | |||
| void FileChooser::showPlatformDialog (OwnedArray<File>& results, | |||
| const String& title, | |||
| const File& currentFileOrDirectory, | |||
| @@ -102,6 +101,8 @@ void FileChooser::showPlatformDialog (OwnedArray<File>& results, | |||
| bool selectMultipleFiles, | |||
| FilePreviewComponent* extraInfoComponent) | |||
| { | |||
| const AutoPool pool; | |||
| StringArray* filters = new StringArray(); | |||
| filters->addTokens (filter.replaceCharacters (T(",:"), T(";;")), T(";"), 0); | |||
| filters->trim(); | |||
| @@ -0,0 +1,50 @@ | |||
| /* | |||
| ============================================================================== | |||
| 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 "../../../src/juce_core/basics/juce_StandardHeader.h" | |||
| #include <Cocoa/Cocoa.h> | |||
| //============================================================================== | |||
| BEGIN_JUCE_NAMESPACE | |||
| class AutoPool | |||
| { | |||
| public: | |||
| AutoPool() { pool = [[NSAutoreleasePool alloc] init]; } | |||
| ~AutoPool() { [pool release]; } | |||
| private: | |||
| NSAutoreleasePool* pool; | |||
| }; | |||
| END_JUCE_NAMESPACE | |||
| @@ -29,9 +29,8 @@ | |||
| ============================================================================== | |||
| */ | |||
| #include "../../../src/juce_core/basics/juce_StandardHeader.h" | |||
| #include "juce_mac_NativeHeaders.h" | |||
| #include <Cocoa/Cocoa.h> | |||
| #include <IOKit/IOKitLib.h> | |||
| #include <IOKit/network/IOEthernetInterface.h> | |||
| #include <IOKit/network/IONetworkInterface.h> | |||
| @@ -143,17 +142,6 @@ int SystemStats::getMACAddresses (int64* addresses, int maxNum, const bool littl | |||
| return numResults; | |||
| } | |||
| //============================================================================== | |||
| class AutoPool | |||
| { | |||
| public: | |||
| AutoPool() { pool = [[NSAutoreleasePool alloc] init]; } | |||
| ~AutoPool() { [pool release]; } | |||
| private: | |||
| NSAutoreleasePool* pool; | |||
| }; | |||
| //============================================================================== | |||
| bool PlatformUtilities::launchEmailWithAttachments (const String& targetEmailAddress, | |||
| const String& emailSubject, | |||