diff --git a/extras/Introjucer/JuceLibraryCode/BinaryData.cpp b/extras/Introjucer/JuceLibraryCode/BinaryData.cpp index b6d48d487d..4b9ac4367f 100644 --- a/extras/Introjucer/JuceLibraryCode/BinaryData.cpp +++ b/extras/Introjucer/JuceLibraryCode/BinaryData.cpp @@ -86,7 +86,7 @@ static const unsigned char temp_binary_data_0[] = " rm -r \"$AAX1\"\r\n" " fi\r\n" "\r\n" -" cp -r \"$original\" \"$AAX1\"\r\n" +" cp -R -H \"$original\" \"$AAX1\"\r\n" " fi\r\n" "\r\n" " if [ -d \"/Library/Application Support/Avid/Audio/Plug-Ins\" ]; then\r\n" @@ -96,7 +96,7 @@ static const unsigned char temp_binary_data_0[] = " rm -r \"$AAX2\"\r\n" " fi\r\n" "\r\n" -" cp -r \"$original\" \"$AAX2\"\r\n" +" cp -R -H \"$original\" \"$AAX2\"\r\n" " fi\r\n" "fi\r\n"; @@ -3274,7 +3274,7 @@ const char* getNamedResource (const char* resourceNameUTF8, int& numBytes) throw switch (hash) { - case 0x44be9398: numBytes = 2916; return AudioPluginXCodeScript_txt; + case 0x44be9398: numBytes = 2922; return AudioPluginXCodeScript_txt; case 0x4a0cfd09: numBytes = 151; return background_tile_png; case 0x763d39dc: numBytes = 1050; return colourscheme_dark_xml; case 0xe8b08520: numBytes = 1050; return colourscheme_light_xml; diff --git a/extras/Introjucer/JuceLibraryCode/BinaryData.h b/extras/Introjucer/JuceLibraryCode/BinaryData.h index 092459c2f3..7b016fa43c 100644 --- a/extras/Introjucer/JuceLibraryCode/BinaryData.h +++ b/extras/Introjucer/JuceLibraryCode/BinaryData.h @@ -10,7 +10,7 @@ namespace BinaryData { extern const char* AudioPluginXCodeScript_txt; - const int AudioPluginXCodeScript_txtSize = 2916; + const int AudioPluginXCodeScript_txtSize = 2922; extern const char* background_tile_png; const int background_tile_pngSize = 151; diff --git a/extras/Introjucer/Source/BinaryData/AudioPluginXCodeScript.txt b/extras/Introjucer/Source/BinaryData/AudioPluginXCodeScript.txt index e4cf3dbdf8..bddaf22ab9 100644 --- a/extras/Introjucer/Source/BinaryData/AudioPluginXCodeScript.txt +++ b/extras/Introjucer/Source/BinaryData/AudioPluginXCodeScript.txt @@ -75,7 +75,7 @@ if [ $copyAAX -gt 0 ]; then rm -r "$AAX1" fi - cp -r "$original" "$AAX1" + cp -R -H "$original" "$AAX1" fi if [ -d "/Library/Application Support/Avid/Audio/Plug-Ins" ]; then @@ -85,6 +85,6 @@ if [ $copyAAX -gt 0 ]; then rm -r "$AAX2" fi - cp -r "$original" "$AAX2" + cp -R -H "$original" "$AAX2" fi fi diff --git a/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_XCode.h b/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_XCode.h index 9dd517d309..5531cd42b6 100644 --- a/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_XCode.h +++ b/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_XCode.h @@ -910,7 +910,7 @@ private: const Identifier propertyName (o.getPropertyName(j)); String val (o.getProperty (propertyName).toString()); - if (val.isEmpty() || (val.containsAnyOf (" \t;<>()=,&+-_@~\r\n") + if (val.isEmpty() || (val.containsAnyOf (" \t;<>()=,&+-_@~\r\n\\#%^`*") && ! (val.trimStart().startsWithChar ('(') || val.trimStart().startsWithChar ('{')))) val = "\"" + val + "\""; diff --git a/modules/juce_audio_basics/synthesisers/juce_Synthesiser.h b/modules/juce_audio_basics/synthesisers/juce_Synthesiser.h index 3c20a85302..19bb7a4f1c 100644 --- a/modules/juce_audio_basics/synthesisers/juce_Synthesiser.h +++ b/modules/juce_audio_basics/synthesisers/juce_Synthesiser.h @@ -191,17 +191,17 @@ public: */ virtual void setCurrentPlaybackSampleRate (double newRate); - /** Returns the current target sample rate at which rendering is being done. - Subclasses may need to know this so that they can pitch things correctly. - */ - double getSampleRate() const noexcept { return currentSampleRate; } - /** Returns true if the voice is currently playing a sound which is mapped to the given midi channel. If it's not currently playing, this will return false. */ - bool isPlayingChannel (int midiChannel) const; + virtual bool isPlayingChannel (int midiChannel) const; + + /** Returns the current target sample rate at which rendering is being done. + Subclasses may need to know this so that they can pitch things correctly. + */ + double getSampleRate() const noexcept { return currentSampleRate; } /** Returns true if the key that triggered this voice is still held down. Note that the voice may still be playing after the key was released (e.g because the diff --git a/modules/juce_audio_devices/native/juce_linux_ALSA.cpp b/modules/juce_audio_devices/native/juce_linux_ALSA.cpp index 091ffbab54..fbb4010088 100644 --- a/modules/juce_audio_devices/native/juce_linux_ALSA.cpp +++ b/modules/juce_audio_devices/native/juce_linux_ALSA.cpp @@ -30,7 +30,7 @@ namespace #endif #if JUCE_ALSA_LOGGING - #define JUCE_ALSA_LOG(dbgtext) { juce::String tempDbgBuf ("ALSA: "); tempDbgBuf << dbgtext; Logger::writeToLog (tempDbgBuf); DBG (tempDbgBuf) } + #define JUCE_ALSA_LOG(dbgtext) { juce::String tempDbgBuf ("ALSA: "); tempDbgBuf << dbgtext; Logger::writeToLog (tempDbgBuf); DBG (tempDbgBuf); } #define JUCE_CHECKED_RESULT(x) (logErrorMessage (x, __LINE__)) static int logErrorMessage (int err, int lineNum) diff --git a/modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm b/modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm index 051348d9e3..db732fbedd 100644 --- a/modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm +++ b/modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm @@ -647,7 +647,9 @@ public: void audioProcessorChanged (AudioProcessor*) { - PropertyChanged (kAudioUnitProperty_Latency, kAudioUnitScope_Global, 0); + PropertyChanged (kAudioUnitProperty_Latency, kAudioUnitScope_Global, 0); + PropertyChanged (kAudioUnitProperty_ParameterList, kAudioUnitScope_Global, 0); + PropertyChanged (kAudioUnitProperty_ParameterInfo, kAudioUnitScope_Global, 0); } bool StreamFormatWritable (AudioUnitScope, AudioUnitElement) override @@ -664,9 +666,9 @@ public: ComponentResult Initialize() override { #if ! JucePlugin_IsSynth - const int numIns = GetInput(0) != 0 ? (int) GetInput(0)->GetStreamFormat().mChannelsPerFrame : 0; + const int numIns = findNumInputChannels(); #endif - const int numOuts = GetOutput(0) != 0 ? (int) GetOutput(0)->GetStreamFormat().mChannelsPerFrame : 0; + const int numOuts = findNumOutputChannels(); bool isValidChannelConfig = false; @@ -710,19 +712,32 @@ public: return JuceAUBaseClass::Reset (inScope, inElement); } + int findNumInputChannels() + { + #if ! JucePlugin_IsSynth + if (AUInputElement* e = GetInput(0)) + return (int) e->GetStreamFormat().mChannelsPerFrame; + #endif + + return 0; + } + + int findNumOutputChannels() + { + if (AUOutputElement* e = GetOutput(0)) + return (int) e->GetStreamFormat().mChannelsPerFrame; + + return 0; + } + void prepareToPlay() { if (juceFilter != nullptr) { - juceFilter->setPlayConfigDetails ( - #if ! JucePlugin_IsSynth - (int) GetInput(0)->GetStreamFormat().mChannelsPerFrame, - #else - 0, - #endif - (int) GetOutput(0)->GetStreamFormat().mChannelsPerFrame, - getSampleRate(), - (int) GetMaxFramesPerSlice()); + juceFilter->setPlayConfigDetails (findNumInputChannels(), + findNumOutputChannels(), + getSampleRate(), + (int) GetMaxFramesPerSlice()); bufferSpace.setSize (juceFilter->getNumInputChannels() + juceFilter->getNumOutputChannels(), (int) GetMaxFramesPerSlice() + 32); diff --git a/modules/juce_audio_plugin_client/utility/juce_PluginHostType.h b/modules/juce_audio_plugin_client/utility/juce_PluginHostType.h index c321fc1162..e304c1ed17 100644 --- a/modules/juce_audio_plugin_client/utility/juce_PluginHostType.h +++ b/modules/juce_audio_plugin_client/utility/juce_PluginHostType.h @@ -219,6 +219,7 @@ private: if (hostFilename.containsIgnoreCase ("TestHost")) return SteinbergTestHost; if (hostFilename.containsIgnoreCase ("rm-host")) return MuseReceptorGeneric; if (hostFilename.startsWith ("FL")) return FruityLoops; + if (hostFilename.contains ("ilbridge.")) return FruityLoops; if (hostPath.containsIgnoreCase ("Studio One")) return StudioOne; if (hostPath.containsIgnoreCase ("Digital Performer")) return DigitalPerformer; if (hostFilename.containsIgnoreCase ("VST_Scanner")) return VBVSTScanner; diff --git a/modules/juce_gui_basics/native/juce_mac_FileChooser.mm b/modules/juce_gui_basics/native/juce_mac_FileChooser.mm index 5a1e25e812..f256067ec6 100644 --- a/modules/juce_gui_basics/native/juce_mac_FileChooser.mm +++ b/modules/juce_gui_basics/native/juce_mac_FileChooser.mm @@ -172,10 +172,10 @@ void FileChooser::showPlatformDialog (Array& results, [panel setDirectoryURL: [NSURL fileURLWithPath: juceStringToNS (directory)]]; [panel setNameFieldStringValue: juceStringToNS (filename)]; - if ([panel runModal] == NSModalResponseOK) + if ([panel runModal] == 1 /*NSModalResponseOK*/) #else if ([panel runModalForDirectory: juceStringToNS (directory) - file: juceStringToNS (filename)] == NSModalResponseOK) + file: juceStringToNS (filename)] == 1 /*NSModalResponseOK*/) #endif { if (isSaveDialogue) diff --git a/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm b/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm index 6ec486460f..5061a6db01 100644 --- a/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm +++ b/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm @@ -1794,7 +1794,9 @@ private: static void windowDidExitFullScreen (id, SEL, NSNotification*) { + #if defined (MAC_OS_X_VERSION_10_6) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 [NSApp setPresentationOptions: NSApplicationPresentationDefault]; + #endif } static void zoom (id self, SEL, id sender) diff --git a/modules/juce_gui_basics/native/juce_mac_Windowing.mm b/modules/juce_gui_basics/native/juce_mac_Windowing.mm index 8f53304593..3d09529f12 100644 --- a/modules/juce_gui_basics/native/juce_mac_Windowing.mm +++ b/modules/juce_gui_basics/native/juce_mac_Windowing.mm @@ -164,37 +164,29 @@ bool DragAndDropContainer::performExternalDragDropOfFiles (const StringArray& fi JUCE_AUTORELEASEPOOL { - NSView* view = (NSView*) sourceComp->getWindowHandle(); + if (NSView* view = (NSView*) sourceComp->getWindowHandle()) + { + if (NSEvent* event = [[view window] currentEvent]) + { + NSPoint eventPos = [event locationInWindow]; + NSRect dragRect = [view convertRect: NSMakeRect (eventPos.x - 16.0f, eventPos.y - 16.0f, 32.0f, 32.0f) + fromView: nil]; - if (view == nil) - return false; + for (int i = 0; i < files.size(); ++i) + { + if (! [view dragFile: juceStringToNS (files[i]) + fromRect: dragRect + slideBack: YES + event: event]) + return false; + } - NSPasteboard* pboard = [NSPasteboard pasteboardWithName: NSDragPboard]; - [pboard declareTypes: [NSArray arrayWithObject: NSFilenamesPboardType] - owner: nil]; - - NSMutableArray* filesArray = [NSMutableArray arrayWithCapacity: 4]; - for (int i = 0; i < files.size(); ++i) - [filesArray addObject: juceStringToNS (files[i])]; - - [pboard setPropertyList: filesArray - forType: NSFilenamesPboardType]; - - NSPoint dragPosition = [view convertPoint: [[[view window] currentEvent] locationInWindow] - fromView: nil]; - dragPosition.x -= 16; - dragPosition.y -= 16; - - [view dragImage: [[NSWorkspace sharedWorkspace] iconForFile: juceStringToNS (files[0])] - at: dragPosition - offset: NSMakeSize (0, 0) - event: [[view window] currentEvent] - pasteboard: pboard - source: view - slideBack: YES]; + return true; + } + } } - return true; + return false; } bool DragAndDropContainer::performExternalDragDropOfText (const String& /*text*/) diff --git a/modules/juce_gui_basics/widgets/juce_ListBox.cpp b/modules/juce_gui_basics/widgets/juce_ListBox.cpp index 47f7f4c657..5364a0d098 100644 --- a/modules/juce_gui_basics/widgets/juce_ListBox.cpp +++ b/modules/juce_gui_basics/widgets/juce_ListBox.cpp @@ -174,7 +174,7 @@ public: int getRowNumberOfComponent (Component* const rowComponent) const noexcept { - const int index = getIndexOfChildComponent (rowComponent); + const int index = getViewedComponent()->getIndexOfChildComponent (rowComponent); const int num = rows.size(); for (int i = num; --i >= 0;) @@ -196,15 +196,16 @@ public: { hasUpdated = false; - const int newX = getViewedComponent()->getX(); - int newY = getViewedComponent()->getY(); + Component& content = *getViewedComponent(); + const int newX = content.getX(); + int newY = content.getY(); const int newW = jmax (owner.minimumRowWidth, getMaximumVisibleWidth()); const int newH = owner.totalItems * owner.getRowHeight(); if (newY + newH < getMaximumVisibleHeight() && newH > getMaximumVisibleHeight()) newY = getMaximumVisibleHeight() - newH; - getViewedComponent()->setBounds (newX, newY, newW, newH); + content.setBounds (newX, newY, newW, newH); if (makeSureItUpdatesContent && ! hasUpdated) updateContents(); @@ -214,11 +215,12 @@ public: { hasUpdated = true; const int rowH = owner.getRowHeight(); + Component& content = *getViewedComponent(); if (rowH > 0) { const int y = getViewPositionY(); - const int w = getViewedComponent()->getWidth(); + const int w = content.getWidth(); const int numNeeded = 2 + getMaximumVisibleHeight() / rowH; rows.removeRange (numNeeded, rows.size()); @@ -227,7 +229,7 @@ public: { RowComponent* newRow = new RowComponent (owner); rows.add (newRow); - getViewedComponent()->addAndMakeVisible (newRow); + content.addAndMakeVisible (newRow); } firstIndex = y / rowH; @@ -247,10 +249,10 @@ public: } if (owner.headerComponent != nullptr) - owner.headerComponent->setBounds (owner.outlineThickness + getViewedComponent()->getX(), + owner.headerComponent->setBounds (owner.outlineThickness + content.getX(), owner.outlineThickness, jmax (owner.getWidth() - owner.outlineThickness * 2, - getViewedComponent()->getWidth()), + content.getWidth()), owner.headerComponent->getHeight()); }