| @@ -55,20 +55,20 @@ END_JUCE_NAMESPACE | |||
| - (void) dealloc; | |||
| - (bool) isDiskPresent; | |||
| - (int) getNumAvailableAudioBlocks; | |||
| - (void) addSourceTrack: (juce::AudioSource*) source numSamples: (int) numSamples_; | |||
| - (void) burn: (juce::AudioCDBurner::BurnProgressListener*) listener errorString: (juce::String*) error | |||
| - (void) addSourceTrack: (JUCE_NAMESPACE::AudioSource*) source numSamples: (int) numSamples_; | |||
| - (void) burn: (JUCE_NAMESPACE::AudioCDBurner::BurnProgressListener*) listener errorString: (JUCE_NAMESPACE::String*) error | |||
| ejectAfterwards: (bool) shouldEject isFake: (bool) peformFakeBurnForTesting; | |||
| @end | |||
| //============================================================================== | |||
| @interface AudioTrackProducer : NSObject | |||
| { | |||
| juce::AudioSource* source; | |||
| JUCE_NAMESPACE::AudioSource* source; | |||
| int readPosition, lengthInFrames; | |||
| } | |||
| - (AudioTrackProducer*) init: (int) lengthInFrames; | |||
| - (AudioTrackProducer*) initWithAudioSource: (juce::AudioSource*) source numSamples: (int) lengthInSamples; | |||
| - (AudioTrackProducer*) initWithAudioSource: (JUCE_NAMESPACE::AudioSource*) source numSamples: (int) lengthInSamples; | |||
| - (void) dealloc; | |||
| - (void) setupTrackProperties: (DRTrack*) track; | |||
| @@ -125,7 +125,7 @@ END_JUCE_NAMESPACE | |||
| objectForKey: DRDeviceMediaBlocksFreeKey] intValue]; | |||
| } | |||
| - (void) addSourceTrack: (juce::AudioSource*) source_ numSamples: (int) numSamples_ | |||
| - (void) addSourceTrack: (JUCE_NAMESPACE::AudioSource*) source_ numSamples: (int) numSamples_ | |||
| { | |||
| AudioTrackProducer* p = [[AudioTrackProducer alloc] initWithAudioSource: source_ numSamples: numSamples_]; | |||
| DRTrack* t = [[DRTrack alloc] initWithProducer: p]; | |||
| @@ -137,7 +137,7 @@ END_JUCE_NAMESPACE | |||
| [p release]; | |||
| } | |||
| - (void) burn: (juce::AudioCDBurner::BurnProgressListener*) listener errorString: (juce::String*) error | |||
| - (void) burn: (JUCE_NAMESPACE::AudioCDBurner::BurnProgressListener*) listener errorString: (JUCE_NAMESPACE::String*) error | |||
| ejectAfterwards: (bool) shouldEject isFake: (bool) peformFakeBurnForTesting | |||
| { | |||
| DRBurn* burn = [DRBurn burnForDevice: device]; | |||
| @@ -162,7 +162,7 @@ END_JUCE_NAMESPACE | |||
| for (;;) | |||
| { | |||
| juce::Thread::sleep (300); | |||
| JUCE_NAMESPACE::Thread::sleep (300); | |||
| float progress = [[[burn status] objectForKey: DRStatusPercentCompleteKey] floatValue]; | |||
| NSLog ([[burn status] description]); | |||
| @@ -189,7 +189,7 @@ NSLog ([[burn status] description]); | |||
| if ([err length] > 0) | |||
| { | |||
| *error = juce::String::fromUTF8 ((juce::uint8*) [err UTF8String]); | |||
| *error = JUCE_NAMESPACE::String::fromUTF8 ((JUCE_NAMESPACE::uint8*) [err UTF8String]); | |||
| break; | |||
| } | |||
| } | |||
| @@ -224,7 +224,7 @@ NSLog ([[burn status] description]); | |||
| [p release]; | |||
| } | |||
| - (AudioTrackProducer*) initWithAudioSource: (juce::AudioSource*) source_ numSamples: (int) lengthInSamples | |||
| - (AudioTrackProducer*) initWithAudioSource: (JUCE_NAMESPACE::AudioSource*) source_ numSamples: (int) lengthInSamples | |||
| { | |||
| AudioTrackProducer* s = [self init: (lengthInSamples + 587) / 588]; | |||
| @@ -283,23 +283,23 @@ NSLog ([[burn status] description]); | |||
| { | |||
| if (source != 0) | |||
| { | |||
| const int numSamples = juce::jmin (bufferLength / 4, (lengthInFrames * (44100 / 75)) - readPosition); | |||
| const int numSamples = JUCE_NAMESPACE::jmin (bufferLength / 4, (lengthInFrames * (44100 / 75)) - readPosition); | |||
| if (numSamples > 0) | |||
| { | |||
| juce::AudioSampleBuffer tempBuffer (2, numSamples); | |||
| JUCE_NAMESPACE::AudioSampleBuffer tempBuffer (2, numSamples); | |||
| juce::AudioSourceChannelInfo info; | |||
| JUCE_NAMESPACE::AudioSourceChannelInfo info; | |||
| info.buffer = &tempBuffer; | |||
| info.startSample = 0; | |||
| info.numSamples = numSamples; | |||
| source->getNextAudioBlock (info); | |||
| juce::AudioDataConverters::convertFloatToInt16LE (tempBuffer.getSampleData (0), | |||
| buffer, numSamples, 4); | |||
| juce::AudioDataConverters::convertFloatToInt16LE (tempBuffer.getSampleData (1), | |||
| buffer + 2, numSamples, 4); | |||
| JUCE_NAMESPACE::AudioDataConverters::convertFloatToInt16LE (tempBuffer.getSampleData (0), | |||
| buffer, numSamples, 4); | |||
| JUCE_NAMESPACE::AudioDataConverters::convertFloatToInt16LE (tempBuffer.getSampleData (1), | |||
| buffer + 2, numSamples, 4); | |||
| readPosition += numSamples; | |||
| } | |||
| @@ -389,7 +389,7 @@ const StringArray AudioCDBurner::findAvailableDevices() | |||
| StringArray s; | |||
| for (int i = 0; i < [names count]; ++i) | |||
| s.add (String::fromUTF8 ((juce::uint8*) [[names objectAtIndex: i] UTF8String])); | |||
| s.add (String::fromUTF8 ((JUCE_NAMESPACE::uint8*) [[names objectAtIndex: i] UTF8String])); | |||
| return s; | |||
| } | |||
| @@ -422,18 +422,18 @@ bool AudioCDBurner::addAudioTrack (AudioSource* source, int numSamps) | |||
| return false; | |||
| } | |||
| const String AudioCDBurner::burn (juce::AudioCDBurner::BurnProgressListener* listener, | |||
| const String AudioCDBurner::burn (JUCE_NAMESPACE::AudioCDBurner::BurnProgressListener* listener, | |||
| const bool ejectDiscAfterwards, | |||
| const bool peformFakeBurnForTesting) | |||
| { | |||
| const AutoPool pool; | |||
| juce::String error ("Couldn't open or write to the CD device"); | |||
| JUCE_NAMESPACE::String error ("Couldn't open or write to the CD device"); | |||
| OpenDiskDevice* dev = (OpenDiskDevice*) internal; | |||
| if (dev != 0) | |||
| { | |||
| error = juce::String::empty; | |||
| error = JUCE_NAMESPACE::String::empty; | |||
| [dev burn: listener | |||
| errorString: &error | |||
| ejectAfterwards: ejectDiscAfterwards | |||
| @@ -36,12 +36,12 @@ BEGIN_JUCE_NAMESPACE | |||
| #include "../../../src/juce_appframework/gui/components/filebrowser/juce_FileChooser.h" | |||
| END_JUCE_NAMESPACE | |||
| static const juce::String nsStringToJuce (NSString* s) | |||
| static const JUCE_NAMESPACE::String nsStringToJuce (NSString* s) | |||
| { | |||
| return juce::String::fromUTF8 ((juce::uint8*) [s UTF8String]); | |||
| return JUCE_NAMESPACE::String::fromUTF8 ((JUCE_NAMESPACE::uint8*) [s UTF8String]); | |||
| } | |||
| static NSString* juceStringToNS (const juce::String& s) | |||
| static NSString* juceStringToNS (const JUCE_NAMESPACE::String& s) | |||
| { | |||
| return [NSString stringWithUTF8String: (const char*) s.toUTF8()]; | |||
| } | |||
| @@ -49,17 +49,17 @@ static NSString* juceStringToNS (const juce::String& s) | |||
| //============================================================================== | |||
| @interface JuceFileChooserDelegate : NSObject | |||
| { | |||
| juce::StringArray* filters; | |||
| JUCE_NAMESPACE::StringArray* filters; | |||
| } | |||
| - (JuceFileChooserDelegate*) initWithFilters: (juce::StringArray*) filters_; | |||
| - (JuceFileChooserDelegate*) initWithFilters: (JUCE_NAMESPACE::StringArray*) filters_; | |||
| - (void) dealloc; | |||
| - (BOOL) panel:(id) sender shouldShowFilename: (NSString*) filename; | |||
| @end | |||
| @implementation JuceFileChooserDelegate | |||
| - (JuceFileChooserDelegate*) initWithFilters: (juce::StringArray*) filters_ | |||
| - (JuceFileChooserDelegate*) initWithFilters: (JUCE_NAMESPACE::StringArray*) filters_ | |||
| { | |||
| [super init]; | |||
| filters = filters_; | |||
| @@ -78,7 +78,7 @@ static NSString* juceStringToNS (const juce::String& s) | |||
| for (int i = filters->size(); --i >= 0;) | |||
| { | |||
| const juce::String wildcard ((*filters)[i].toLowerCase()); | |||
| const JUCE_NAMESPACE::String wildcard ((*filters)[i].toLowerCase()); | |||
| if (fnmatch (wildcard.toUTF8(), filenameUTF8, 0) == 0) | |||
| return true; | |||
| @@ -29,7 +29,7 @@ | |||
| ============================================================================== | |||
| */ | |||
| #include "../../../src/juce_core/basics/juce_StandardHeader.h" | |||
| #include "../../../src/juce_core/basics/juce_StandardHeader. h" | |||
| #include <Cocoa/Cocoa.h> | |||
| @@ -45,10 +45,10 @@ END_JUCE_NAMESPACE | |||
| //============================================================================== | |||
| @interface DownloadClickDetector : NSObject | |||
| { | |||
| juce::WebBrowserComponent* ownerComponent; | |||
| JUCE_NAMESPACE::WebBrowserComponent* ownerComponent; | |||
| } | |||
| - (DownloadClickDetector*) initWithOwner: (juce::WebBrowserComponent*) ownerComponent; | |||
| - (DownloadClickDetector*) initWithOwner: (JUCE_NAMESPACE::WebBrowserComponent*) ownerComponent; | |||
| - (void) webView: (WebView*) webView decidePolicyForNavigationAction: (NSDictionary*) actionInformation | |||
| request: (NSURLRequest*) request | |||
| @@ -59,7 +59,7 @@ END_JUCE_NAMESPACE | |||
| //============================================================================== | |||
| @implementation DownloadClickDetector | |||
| - (DownloadClickDetector*) initWithOwner: (juce::WebBrowserComponent*) ownerComponent_ | |||
| - (DownloadClickDetector*) initWithOwner: (JUCE_NAMESPACE::WebBrowserComponent*) ownerComponent_ | |||
| { | |||
| [super init]; | |||
| ownerComponent = ownerComponent_; | |||
| @@ -70,7 +70,7 @@ END_JUCE_NAMESPACE | |||
| { | |||
| NSURL* url = [actionInformation valueForKey: @"WebActionOriginalURLKey"]; | |||
| if (ownerComponent->pageAboutToLoad (juce::String::fromUTF8 ((const juce::uint8*) [[url absoluteString] UTF8String]))) | |||
| if (ownerComponent->pageAboutToLoad (JUCE_NAMESPACE::String::fromUTF8 ((const JUCE_NAMESPACE::uint8*) [[url absoluteString] UTF8String]))) | |||
| [listener use]; | |||
| else | |||
| [listener ignore]; | |||
| @@ -190,11 +190,11 @@ public: | |||
| { | |||
| const String headerName ((*headers)[i].upToFirstOccurrenceOf (T(":"), false, false).trim()); | |||
| headerNamesAsChars[i] = (char*) juce_calloc (headerName.copyToUTF8 (0)); | |||
| headerName.copyToUTF8 ((juce::uint8*) headerNamesAsChars[i]); | |||
| headerName.copyToUTF8 ((JUCE_NAMESPACE::uint8*) headerNamesAsChars[i]); | |||
| const String headerValue ((*headers)[i].fromFirstOccurrenceOf (T(":"), false, false).trim()); | |||
| headerValuesAsChars[i] = (char*) juce_calloc (headerValue.copyToUTF8 (0)); | |||
| headerValue.copyToUTF8 ((juce::uint8*) headerValuesAsChars[i]); | |||
| headerValue.copyToUTF8 ((JUCE_NAMESPACE::uint8*) headerValuesAsChars[i]); | |||
| } | |||
| } | |||
| @@ -341,6 +341,7 @@ bool SystemStats::isOperatingSystem64Bit() throw() | |||
| #endif | |||
| } | |||
| //============================================================================== | |||
| int SystemStats::getMemorySizeInMegabytes() throw() | |||
| { | |||
| @@ -107,8 +107,8 @@ | |||
| //============================================================================== | |||
| #if JUCE_WIN32 | |||
| extern void JUCE_CALLTYPE attachSubWindow (void* hostWindow, int& titleW, int& titleH, juce::Component* comp); | |||
| extern void JUCE_CALLTYPE resizeHostWindow (void* hostWindow, int& titleW, int& titleH, juce::Component* comp); | |||
| extern void JUCE_CALLTYPE attachSubWindow (void* hostWindow, int& titleW, int& titleH, JUCE_NAMESPACE::Component* comp); | |||
| extern void JUCE_CALLTYPE resizeHostWindow (void* hostWindow, int& titleW, int& titleH, JUCE_NAMESPACE::Component* comp); | |||
| #if ! JucePlugin_EditorRequiresKeyboardFocus | |||
| extern void JUCE_CALLTYPE passFocusToHostWindow (void* hostWindow); | |||
| #endif | |||
| @@ -295,7 +295,7 @@ public: | |||
| private: | |||
| AudioProcessor* const filter; | |||
| JucePlugInProcess* const process; | |||
| juce::Component* wrapper; | |||
| JUCE_NAMESPACE::Component* wrapper; | |||
| AudioProcessorEditor* editorComp; | |||
| void deleteEditorComp() | |||
| @@ -304,7 +304,7 @@ public: | |||
| { | |||
| PopupMenu::dismissAllActiveMenus(); | |||
| juce::Component* const modalComponent = juce::Component::getCurrentlyModalComponent(); | |||
| JUCE_NAMESPACE::Component* const modalComponent = JUCE_NAMESPACE::Component::getCurrentlyModalComponent(); | |||
| if (modalComponent != 0) | |||
| modalComponent->exitModalState (0); | |||
| @@ -317,7 +317,7 @@ public: | |||
| //============================================================================== | |||
| // A component to hold the AudioProcessorEditor, and cope with some housekeeping | |||
| // chores when it changes or repaints. | |||
| class EditorCompWrapper : public juce::Component, | |||
| class EditorCompWrapper : public JUCE_NAMESPACE::Component, | |||
| #if JUCE_MAC | |||
| public Timer | |||
| #else | |||
| @@ -435,7 +435,7 @@ public: | |||
| void resized() | |||
| { | |||
| juce::Component* const c = getChildComponent (0); | |||
| JUCE_NAMESPACE::Component* const c = getChildComponent (0); | |||
| if (c != 0) | |||
| c->setBounds (0, 0, getWidth(), getHeight()); | |||
| @@ -476,7 +476,7 @@ public: | |||
| #endif | |||
| #if JUCE_WIN32 | |||
| void globalFocusChanged (juce::Component*) | |||
| void globalFocusChanged (JUCE_NAMESPACE::Component*) | |||
| { | |||
| #if ! JucePlugin_EditorRequiresKeyboardFocus | |||
| if (hasKeyboardFocus (true)) | |||
| @@ -485,7 +485,7 @@ public: | |||
| } | |||
| #endif | |||
| void childBoundsChanged (juce::Component* child) | |||
| void childBoundsChanged (JUCE_NAMESPACE::Component* child) | |||
| { | |||
| setSize (child->getWidth(), child->getHeight()); | |||
| child->setTopLeftPosition (0, 0); | |||
| @@ -81,7 +81,7 @@ StandaloneFilterWindow::StandaloneFilterWindow (const String& title, | |||
| if (globalSettings != 0) | |||
| { | |||
| juce::MemoryBlock data; | |||
| JUCE_NAMESPACE::MemoryBlock data; | |||
| if (data.fromBase64Encoding (globalSettings->getValue (T("filterState"))) | |||
| && data.getSize() > 0) | |||
| @@ -130,7 +130,7 @@ StandaloneFilterWindow::~StandaloneFilterWindow() | |||
| if (globalSettings != 0 && filter != 0) | |||
| { | |||
| juce::MemoryBlock data; | |||
| JUCE_NAMESPACE::MemoryBlock data; | |||
| filter->getStateInformation (data); | |||
| globalSettings->setValue (T("filterState"), data.toBase64Encoding()); | |||
| @@ -185,7 +185,7 @@ void StandaloneFilterWindow::saveState() | |||
| if (fc.browseForFileToSave (true)) | |||
| { | |||
| juce::MemoryBlock data; | |||
| JUCE_NAMESPACE::MemoryBlock data; | |||
| filter->getStateInformation (data); | |||
| if (! fc.getResult().replaceWithData (data.getData(), data.getSize())) | |||
| @@ -207,7 +207,7 @@ void StandaloneFilterWindow::loadState() | |||
| if (fc.browseForFileToOpen()) | |||
| { | |||
| juce::MemoryBlock data; | |||
| JUCE_NAMESPACE::MemoryBlock data; | |||
| if (fc.getResult().loadFileAsData (data)) | |||
| { | |||
| @@ -129,7 +129,7 @@ | |||
| class JuceVSTWrapper; | |||
| static bool recursionCheck = false; | |||
| static juce::uint32 lastMasterIdleCall = 0; | |||
| static JUCE_NAMESPACE::uint32 lastMasterIdleCall = 0; | |||
| BEGIN_JUCE_NAMESPACE | |||
| extern void juce_callAnyTimersSynchronously(); | |||
| @@ -564,7 +564,7 @@ public: | |||
| { | |||
| const VstMidiEvent* const vme = (const VstMidiEvent*) e; | |||
| midiEvents.addEvent ((const juce::uint8*) vme->midiData, | |||
| midiEvents.addEvent ((const JUCE_NAMESPACE::uint8*) vme->midiData, | |||
| 4, | |||
| vme->deltaFrames); | |||
| } | |||
| @@ -692,7 +692,7 @@ public: | |||
| ensureOutgoingEventSize (numEvents); | |||
| outgoingEvents->numEvents = 0; | |||
| const juce::uint8* midiEventData; | |||
| const JUCE_NAMESPACE::uint8* midiEventData; | |||
| int midiEventSize, midiEventPosition; | |||
| MidiBuffer::Iterator i (midiEvents); | |||
| @@ -1072,7 +1072,7 @@ public: | |||
| if (Component::isMouseButtonDownAnywhere() | |||
| && ! recursionCheck) | |||
| { | |||
| const juce::uint32 now = JUCE_NAMESPACE::Time::getMillisecondCounter(); | |||
| const JUCE_NAMESPACE::uint32 now = JUCE_NAMESPACE::Time::getMillisecondCounter(); | |||
| if (now > lastMasterIdleCall + 20 && editorComp != 0) | |||
| { | |||
| @@ -1378,8 +1378,8 @@ public: | |||
| private: | |||
| AudioProcessor* filter; | |||
| juce::MemoryBlock chunkMemory; | |||
| juce::uint32 chunkMemoryTime; | |||
| JUCE_NAMESPACE::MemoryBlock chunkMemory; | |||
| JUCE_NAMESPACE::uint32 chunkMemoryTime; | |||
| EditorCompWrapper* editorComp; | |||
| ERect editorSize; | |||
| MidiBuffer midiEvents; | |||
| @@ -13834,6 +13834,24 @@ void ReadWriteLock::enterWrite() const throw() | |||
| } | |||
| } | |||
| bool ReadWriteLock::tryEnterWrite() const throw() | |||
| { | |||
| const int threadId = Thread::getCurrentThreadId(); | |||
| const ScopedLock sl (accessLock); | |||
| if (readerThreads.size() + numWriters == 0 | |||
| || threadId == writerThreadId | |||
| || (readerThreads.size() == 2 | |||
| && readerThreads.getUnchecked(0) == threadId)) | |||
| { | |||
| writerThreadId = threadId; | |||
| ++numWriters; | |||
| return true; | |||
| } | |||
| return false; | |||
| } | |||
| void ReadWriteLock::exitWrite() const throw() | |||
| { | |||
| const ScopedLock sl (accessLock); | |||
| @@ -97849,6 +97867,8 @@ void zcfree (voidpf opaque, voidpf ptr) | |||
| #endif /* MY_ZCALLOC */ | |||
| /********* End of inlined file: zutil.c *********/ | |||
| #undef Byte | |||
| #undef Bytef | |||
| } | |||
| } | |||
| @@ -253097,6 +253117,7 @@ END_JUCE_NAMESPACE | |||
| /********* Start of inlined file: juce_mac_Network.mm *********/ | |||
| /********* Start of inlined file: juce_mac_NativeHeaders.h *********/ | |||
| #include "../../../src/juce_core/basics/juce_StandardHeader. h" | |||
| #include <Cocoa/Cocoa.h> | |||
| @@ -253627,6 +253648,7 @@ END_JUCE_NAMESPACE | |||
| /********* Start of inlined file: juce_mac_AudioCDBurner.mm *********/ | |||
| /********* Start of inlined file: juce_mac_NativeHeaders.h *********/ | |||
| #include "../../../src/juce_core/basics/juce_StandardHeader. h" | |||
| #include <Cocoa/Cocoa.h> | |||
| @@ -253664,19 +253686,19 @@ END_JUCE_NAMESPACE | |||
| - (void) dealloc; | |||
| - (bool) isDiskPresent; | |||
| - (int) getNumAvailableAudioBlocks; | |||
| - (void) addSourceTrack: (juce::AudioSource*) source numSamples: (int) numSamples_; | |||
| - (void) burn: (juce::AudioCDBurner::BurnProgressListener*) listener errorString: (juce::String*) error | |||
| - (void) addSourceTrack: (JUCE_NAMESPACE::AudioSource*) source numSamples: (int) numSamples_; | |||
| - (void) burn: (JUCE_NAMESPACE::AudioCDBurner::BurnProgressListener*) listener errorString: (JUCE_NAMESPACE::String*) error | |||
| ejectAfterwards: (bool) shouldEject isFake: (bool) peformFakeBurnForTesting; | |||
| @end | |||
| @interface AudioTrackProducer : NSObject | |||
| { | |||
| juce::AudioSource* source; | |||
| JUCE_NAMESPACE::AudioSource* source; | |||
| int readPosition, lengthInFrames; | |||
| } | |||
| - (AudioTrackProducer*) init: (int) lengthInFrames; | |||
| - (AudioTrackProducer*) initWithAudioSource: (juce::AudioSource*) source numSamples: (int) lengthInSamples; | |||
| - (AudioTrackProducer*) initWithAudioSource: (JUCE_NAMESPACE::AudioSource*) source numSamples: (int) lengthInSamples; | |||
| - (void) dealloc; | |||
| - (void) setupTrackProperties: (DRTrack*) track; | |||
| @@ -253732,7 +253754,7 @@ END_JUCE_NAMESPACE | |||
| objectForKey: DRDeviceMediaBlocksFreeKey] intValue]; | |||
| } | |||
| - (void) addSourceTrack: (juce::AudioSource*) source_ numSamples: (int) numSamples_ | |||
| - (void) addSourceTrack: (JUCE_NAMESPACE::AudioSource*) source_ numSamples: (int) numSamples_ | |||
| { | |||
| AudioTrackProducer* p = [[AudioTrackProducer alloc] initWithAudioSource: source_ numSamples: numSamples_]; | |||
| DRTrack* t = [[DRTrack alloc] initWithProducer: p]; | |||
| @@ -253744,7 +253766,7 @@ END_JUCE_NAMESPACE | |||
| [p release]; | |||
| } | |||
| - (void) burn: (juce::AudioCDBurner::BurnProgressListener*) listener errorString: (juce::String*) error | |||
| - (void) burn: (JUCE_NAMESPACE::AudioCDBurner::BurnProgressListener*) listener errorString: (JUCE_NAMESPACE::String*) error | |||
| ejectAfterwards: (bool) shouldEject isFake: (bool) peformFakeBurnForTesting | |||
| { | |||
| DRBurn* burn = [DRBurn burnForDevice: device]; | |||
| @@ -253769,7 +253791,7 @@ END_JUCE_NAMESPACE | |||
| for (;;) | |||
| { | |||
| juce::Thread::sleep (300); | |||
| JUCE_NAMESPACE::Thread::sleep (300); | |||
| float progress = [[[burn status] objectForKey: DRStatusPercentCompleteKey] floatValue]; | |||
| NSLog ([[burn status] description]); | |||
| @@ -253796,7 +253818,7 @@ NSLog ([[burn status] description]); | |||
| if ([err length] > 0) | |||
| { | |||
| *error = juce::String::fromUTF8 ((juce::uint8*) [err UTF8String]); | |||
| *error = JUCE_NAMESPACE::String::fromUTF8 ((JUCE_NAMESPACE::uint8*) [err UTF8String]); | |||
| break; | |||
| } | |||
| } | |||
| @@ -253829,7 +253851,7 @@ NSLog ([[burn status] description]); | |||
| [p release]; | |||
| } | |||
| - (AudioTrackProducer*) initWithAudioSource: (juce::AudioSource*) source_ numSamples: (int) lengthInSamples | |||
| - (AudioTrackProducer*) initWithAudioSource: (JUCE_NAMESPACE::AudioSource*) source_ numSamples: (int) lengthInSamples | |||
| { | |||
| AudioTrackProducer* s = [self init: (lengthInSamples + 587) / 588]; | |||
| @@ -253888,23 +253910,23 @@ NSLog ([[burn status] description]); | |||
| { | |||
| if (source != 0) | |||
| { | |||
| const int numSamples = juce::jmin (bufferLength / 4, (lengthInFrames * (44100 / 75)) - readPosition); | |||
| const int numSamples = JUCE_NAMESPACE::jmin (bufferLength / 4, (lengthInFrames * (44100 / 75)) - readPosition); | |||
| if (numSamples > 0) | |||
| { | |||
| juce::AudioSampleBuffer tempBuffer (2, numSamples); | |||
| JUCE_NAMESPACE::AudioSampleBuffer tempBuffer (2, numSamples); | |||
| juce::AudioSourceChannelInfo info; | |||
| JUCE_NAMESPACE::AudioSourceChannelInfo info; | |||
| info.buffer = &tempBuffer; | |||
| info.startSample = 0; | |||
| info.numSamples = numSamples; | |||
| source->getNextAudioBlock (info); | |||
| juce::AudioDataConverters::convertFloatToInt16LE (tempBuffer.getSampleData (0), | |||
| buffer, numSamples, 4); | |||
| juce::AudioDataConverters::convertFloatToInt16LE (tempBuffer.getSampleData (1), | |||
| buffer + 2, numSamples, 4); | |||
| JUCE_NAMESPACE::AudioDataConverters::convertFloatToInt16LE (tempBuffer.getSampleData (0), | |||
| buffer, numSamples, 4); | |||
| JUCE_NAMESPACE::AudioDataConverters::convertFloatToInt16LE (tempBuffer.getSampleData (1), | |||
| buffer + 2, numSamples, 4); | |||
| readPosition += numSamples; | |||
| } | |||
| @@ -253992,7 +254014,7 @@ const StringArray AudioCDBurner::findAvailableDevices() | |||
| StringArray s; | |||
| for (int i = 0; i < [names count]; ++i) | |||
| s.add (String::fromUTF8 ((juce::uint8*) [[names objectAtIndex: i] UTF8String])); | |||
| s.add (String::fromUTF8 ((JUCE_NAMESPACE::uint8*) [[names objectAtIndex: i] UTF8String])); | |||
| return s; | |||
| } | |||
| @@ -254025,18 +254047,18 @@ bool AudioCDBurner::addAudioTrack (AudioSource* source, int numSamps) | |||
| return false; | |||
| } | |||
| const String AudioCDBurner::burn (juce::AudioCDBurner::BurnProgressListener* listener, | |||
| const String AudioCDBurner::burn (JUCE_NAMESPACE::AudioCDBurner::BurnProgressListener* listener, | |||
| const bool ejectDiscAfterwards, | |||
| const bool peformFakeBurnForTesting) | |||
| { | |||
| const AutoPool pool; | |||
| juce::String error ("Couldn't open or write to the CD device"); | |||
| JUCE_NAMESPACE::String error ("Couldn't open or write to the CD device"); | |||
| OpenDiskDevice* dev = (OpenDiskDevice*) internal; | |||
| if (dev != 0) | |||
| { | |||
| error = juce::String::empty; | |||
| error = JUCE_NAMESPACE::String::empty; | |||
| [dev burn: listener | |||
| errorString: &error | |||
| ejectAfterwards: ejectDiscAfterwards | |||
| @@ -255837,6 +255859,7 @@ END_JUCE_NAMESPACE | |||
| /********* Start of inlined file: juce_mac_FileChooser.mm *********/ | |||
| /********* Start of inlined file: juce_mac_NativeHeaders.h *********/ | |||
| #include "../../../src/juce_core/basics/juce_StandardHeader. h" | |||
| #include <Cocoa/Cocoa.h> | |||
| @@ -255861,29 +255884,29 @@ BEGIN_JUCE_NAMESPACE | |||
| END_JUCE_NAMESPACE | |||
| static const juce::String nsStringToJuce (NSString* s) | |||
| static const JUCE_NAMESPACE::String nsStringToJuce (NSString* s) | |||
| { | |||
| return juce::String::fromUTF8 ((juce::uint8*) [s UTF8String]); | |||
| return JUCE_NAMESPACE::String::fromUTF8 ((JUCE_NAMESPACE::uint8*) [s UTF8String]); | |||
| } | |||
| static NSString* juceStringToNS (const juce::String& s) | |||
| static NSString* juceStringToNS (const JUCE_NAMESPACE::String& s) | |||
| { | |||
| return [NSString stringWithUTF8String: (const char*) s.toUTF8()]; | |||
| } | |||
| @interface JuceFileChooserDelegate : NSObject | |||
| { | |||
| juce::StringArray* filters; | |||
| JUCE_NAMESPACE::StringArray* filters; | |||
| } | |||
| - (JuceFileChooserDelegate*) initWithFilters: (juce::StringArray*) filters_; | |||
| - (JuceFileChooserDelegate*) initWithFilters: (JUCE_NAMESPACE::StringArray*) filters_; | |||
| - (void) dealloc; | |||
| - (BOOL) panel:(id) sender shouldShowFilename: (NSString*) filename; | |||
| @end | |||
| @implementation JuceFileChooserDelegate | |||
| - (JuceFileChooserDelegate*) initWithFilters: (juce::StringArray*) filters_ | |||
| - (JuceFileChooserDelegate*) initWithFilters: (JUCE_NAMESPACE::StringArray*) filters_ | |||
| { | |||
| [super init]; | |||
| filters = filters_; | |||
| @@ -255902,7 +255925,7 @@ static NSString* juceStringToNS (const juce::String& s) | |||
| for (int i = filters->size(); --i >= 0;) | |||
| { | |||
| const juce::String wildcard ((*filters)[i].toLowerCase()); | |||
| const JUCE_NAMESPACE::String wildcard ((*filters)[i].toLowerCase()); | |||
| if (fnmatch (wildcard.toUTF8(), filenameUTF8, 0) == 0) | |||
| return true; | |||
| @@ -256796,10 +256819,10 @@ END_JUCE_NAMESPACE | |||
| @interface DownloadClickDetector : NSObject | |||
| { | |||
| juce::WebBrowserComponent* ownerComponent; | |||
| JUCE_NAMESPACE::WebBrowserComponent* ownerComponent; | |||
| } | |||
| - (DownloadClickDetector*) initWithOwner: (juce::WebBrowserComponent*) ownerComponent; | |||
| - (DownloadClickDetector*) initWithOwner: (JUCE_NAMESPACE::WebBrowserComponent*) ownerComponent; | |||
| - (void) webView: (WebView*) webView decidePolicyForNavigationAction: (NSDictionary*) actionInformation | |||
| request: (NSURLRequest*) request | |||
| @@ -256809,7 +256832,7 @@ END_JUCE_NAMESPACE | |||
| @implementation DownloadClickDetector | |||
| - (DownloadClickDetector*) initWithOwner: (juce::WebBrowserComponent*) ownerComponent_ | |||
| - (DownloadClickDetector*) initWithOwner: (JUCE_NAMESPACE::WebBrowserComponent*) ownerComponent_ | |||
| { | |||
| [super init]; | |||
| ownerComponent = ownerComponent_; | |||
| @@ -256820,7 +256843,7 @@ END_JUCE_NAMESPACE | |||
| { | |||
| NSURL* url = [actionInformation valueForKey: @"WebActionOriginalURLKey"]; | |||
| if (ownerComponent->pageAboutToLoad (juce::String::fromUTF8 ((const juce::uint8*) [[url absoluteString] UTF8String]))) | |||
| if (ownerComponent->pageAboutToLoad (JUCE_NAMESPACE::String::fromUTF8 ((const JUCE_NAMESPACE::uint8*) [[url absoluteString] UTF8String]))) | |||
| [listener use]; | |||
| else | |||
| [listener ignore]; | |||
| @@ -256939,11 +256962,11 @@ public: | |||
| { | |||
| const String headerName ((*headers)[i].upToFirstOccurrenceOf (T(":"), false, false).trim()); | |||
| headerNamesAsChars[i] = (char*) juce_calloc (headerName.copyToUTF8 (0)); | |||
| headerName.copyToUTF8 ((juce::uint8*) headerNamesAsChars[i]); | |||
| headerName.copyToUTF8 ((JUCE_NAMESPACE::uint8*) headerNamesAsChars[i]); | |||
| const String headerValue ((*headers)[i].fromFirstOccurrenceOf (T(":"), false, false).trim()); | |||
| headerValuesAsChars[i] = (char*) juce_calloc (headerValue.copyToUTF8 (0)); | |||
| headerValue.copyToUTF8 ((juce::uint8*) headerValuesAsChars[i]); | |||
| headerValue.copyToUTF8 ((JUCE_NAMESPACE::uint8*) headerValuesAsChars[i]); | |||
| } | |||
| } | |||
| @@ -674,13 +674,13 @@ extern bool JUCE_API JUCE_CALLTYPE juce_isRunningUnderDebugger() throw(); | |||
| extern JUCE_API void juce_DebugFree (void* const block); | |||
| /** This should be used instead of calling malloc directly. */ | |||
| #define juce_malloc(numBytes) juce::juce_DebugMalloc (numBytes, __FILE__, __LINE__) | |||
| #define juce_malloc(numBytes) JUCE_NAMESPACE::juce_DebugMalloc (numBytes, __FILE__, __LINE__) | |||
| /** This should be used instead of calling calloc directly. */ | |||
| #define juce_calloc(numBytes) juce::juce_DebugCalloc (numBytes, __FILE__, __LINE__) | |||
| #define juce_calloc(numBytes) JUCE_NAMESPACE::juce_DebugCalloc (numBytes, __FILE__, __LINE__) | |||
| /** This should be used instead of calling realloc directly. */ | |||
| #define juce_realloc(location, numBytes) juce::juce_DebugRealloc (location, numBytes, __FILE__, __LINE__) | |||
| #define juce_realloc(location, numBytes) JUCE_NAMESPACE::juce_DebugRealloc (location, numBytes, __FILE__, __LINE__) | |||
| /** This should be used instead of calling free directly. */ | |||
| #define juce_free(location) juce::juce_DebugFree (location) | |||
| #define juce_free(location) JUCE_NAMESPACE::juce_DebugFree (location) | |||
| #endif | |||
| #if ! defined (_AFXDLL) | |||
| @@ -706,13 +706,13 @@ extern bool JUCE_API JUCE_CALLTYPE juce_isRunningUnderDebugger() throw(); | |||
| extern JUCE_API void juce_Free (void* const block); | |||
| /** This should be used instead of calling malloc directly. */ | |||
| #define juce_malloc(numBytes) juce::juce_Malloc (numBytes) | |||
| #define juce_malloc(numBytes) JUCE_NAMESPACE::juce_Malloc (numBytes) | |||
| /** This should be used instead of calling calloc directly. */ | |||
| #define juce_calloc(numBytes) juce::juce_Calloc (numBytes) | |||
| #define juce_calloc(numBytes) JUCE_NAMESPACE::juce_Calloc (numBytes) | |||
| /** This should be used instead of calling realloc directly. */ | |||
| #define juce_realloc(location, numBytes) juce::juce_Realloc (location, numBytes) | |||
| #define juce_realloc(location, numBytes) JUCE_NAMESPACE::juce_Realloc (location, numBytes) | |||
| /** This should be used instead of calling free directly. */ | |||
| #define juce_free(location) juce::juce_Free (location) | |||
| #define juce_free(location) JUCE_NAMESPACE::juce_Free (location) | |||
| #define juce_UseDebuggingNewOperator \ | |||
| static void* operator new (size_t sz) { void* const p = juce_malloc ((int) sz); return (p != 0) ? p : ::operator new (sz); } \ | |||
| @@ -7480,6 +7480,10 @@ public: | |||
| */ | |||
| static bool isOperatingSystem64Bit() throw(); | |||
| /** Returns a country code based on the current locale of the OS. | |||
| */ | |||
| static const String getCountryCode(); | |||
| // CPU and memory information.. | |||
| /** Returns the approximate CPU speed. | |||
| @@ -13922,6 +13926,15 @@ public: | |||
| */ | |||
| void enterWrite() const throw(); | |||
| /** Tries to lock this object for writing. | |||
| This is like enterWrite(), but doesn't block - it returns true if it manages | |||
| to obtain the lock. | |||
| @see enterWrite | |||
| */ | |||
| bool tryEnterWrite() const throw(); | |||
| /** Releases the write-lock. | |||
| If the caller thread hasn't got the lock, this can have unpredictable results. | |||
| @@ -64,13 +64,13 @@ | |||
| extern JUCE_API void juce_DebugFree (void* const block); | |||
| /** This should be used instead of calling malloc directly. */ | |||
| #define juce_malloc(numBytes) juce::juce_DebugMalloc (numBytes, __FILE__, __LINE__) | |||
| #define juce_malloc(numBytes) JUCE_NAMESPACE::juce_DebugMalloc (numBytes, __FILE__, __LINE__) | |||
| /** This should be used instead of calling calloc directly. */ | |||
| #define juce_calloc(numBytes) juce::juce_DebugCalloc (numBytes, __FILE__, __LINE__) | |||
| #define juce_calloc(numBytes) JUCE_NAMESPACE::juce_DebugCalloc (numBytes, __FILE__, __LINE__) | |||
| /** This should be used instead of calling realloc directly. */ | |||
| #define juce_realloc(location, numBytes) juce::juce_DebugRealloc (location, numBytes, __FILE__, __LINE__) | |||
| #define juce_realloc(location, numBytes) JUCE_NAMESPACE::juce_DebugRealloc (location, numBytes, __FILE__, __LINE__) | |||
| /** This should be used instead of calling free directly. */ | |||
| #define juce_free(location) juce::juce_DebugFree (location) | |||
| #define juce_free(location) JUCE_NAMESPACE::juce_DebugFree (location) | |||
| #endif | |||
| #if ! defined (_AFXDLL) | |||
| @@ -96,13 +96,13 @@ | |||
| extern JUCE_API void juce_Free (void* const block); | |||
| /** This should be used instead of calling malloc directly. */ | |||
| #define juce_malloc(numBytes) juce::juce_Malloc (numBytes) | |||
| #define juce_malloc(numBytes) JUCE_NAMESPACE::juce_Malloc (numBytes) | |||
| /** This should be used instead of calling calloc directly. */ | |||
| #define juce_calloc(numBytes) juce::juce_Calloc (numBytes) | |||
| #define juce_calloc(numBytes) JUCE_NAMESPACE::juce_Calloc (numBytes) | |||
| /** This should be used instead of calling realloc directly. */ | |||
| #define juce_realloc(location, numBytes) juce::juce_Realloc (location, numBytes) | |||
| #define juce_realloc(location, numBytes) JUCE_NAMESPACE::juce_Realloc (location, numBytes) | |||
| /** This should be used instead of calling free directly. */ | |||
| #define juce_free(location) juce::juce_Free (location) | |||
| #define juce_free(location) JUCE_NAMESPACE::juce_Free (location) | |||
| #define juce_UseDebuggingNewOperator \ | |||
| static void* operator new (size_t sz) { void* const p = juce_malloc ((int) sz); return (p != 0) ? p : ::operator new (sz); } \ | |||
| @@ -66,6 +66,8 @@ namespace zlibNamespace | |||
| #include "zlib/trees.c" | |||
| #include "zlib/uncompr.c" | |||
| #include "zlib/zutil.c" | |||
| #undef Byte | |||
| #undef Bytef | |||
| } | |||
| } | |||
| @@ -144,6 +144,24 @@ void ReadWriteLock::enterWrite() const throw() | |||
| } | |||
| } | |||
| bool ReadWriteLock::tryEnterWrite() const throw() | |||
| { | |||
| const int threadId = Thread::getCurrentThreadId(); | |||
| const ScopedLock sl (accessLock); | |||
| if (readerThreads.size() + numWriters == 0 | |||
| || threadId == writerThreadId | |||
| || (readerThreads.size() == 2 | |||
| && readerThreads.getUnchecked(0) == threadId)) | |||
| { | |||
| writerThreadId = threadId; | |||
| ++numWriters; | |||
| return true; | |||
| } | |||
| return false; | |||
| } | |||
| void ReadWriteLock::exitWrite() const throw() | |||
| { | |||
| const ScopedLock sl (accessLock); | |||
| @@ -105,6 +105,15 @@ public: | |||
| */ | |||
| void enterWrite() const throw(); | |||
| /** Tries to lock this object for writing. | |||
| This is like enterWrite(), but doesn't block - it returns true if it manages | |||
| to obtain the lock. | |||
| @see enterWrite | |||
| */ | |||
| bool tryEnterWrite() const throw(); | |||
| /** Releases the write-lock. | |||
| If the caller thread hasn't got the lock, this can have unpredictable results. | |||