diff --git a/extras/audio plugins/wrapper/formats/AudioUnit/juce_AudioUnitWrapper.cpp b/extras/audio plugins/wrapper/formats/AudioUnit/juce_AudioUnitWrapper.cpp index dfe4befa4e..956eb9a521 100644 --- a/extras/audio plugins/wrapper/formats/AudioUnit/juce_AudioUnitWrapper.cpp +++ b/extras/audio plugins/wrapper/formats/AudioUnit/juce_AudioUnitWrapper.cpp @@ -453,19 +453,16 @@ public: return ! IsInitialized(); } - ComponentResult StartNote (MusicDeviceInstrumentID, MusicDeviceGroupID, NoteInstanceID&, UInt32, const MusicDeviceNoteParams&) - { - return noErr; - } - - ComponentResult StopNote (MusicDeviceGroupID, NoteInstanceID, UInt32) - { - return noErr; - } + // (these two slightly different versions are because the definition changed between 10.4 and 10.5) + ComponentResult StartNote (MusicDeviceInstrumentID, MusicDeviceGroupID, NoteInstanceID&, UInt32, const MusicDeviceNoteParams&) { return noErr; } + ComponentResult StartNote (MusicDeviceInstrumentID, MusicDeviceGroupID, NoteInstanceID*, UInt32, const MusicDeviceNoteParams&) { return noErr; } + ComponentResult StopNote (MusicDeviceGroupID, NoteInstanceID, UInt32) { return noErr; } //============================================================================== ComponentResult Initialize() { + SetMaxFramesPerSlice (16384); + #if ! JucePlugin_IsSynth const int numIns = GetInput(0) != 0 ? GetInput(0)->GetStreamFormat().mChannelsPerFrame : 0; #endif diff --git a/extras/audio plugins/wrapper/formats/RTAS/juce_RTASWrapper.cpp b/extras/audio plugins/wrapper/formats/RTAS/juce_RTASWrapper.cpp index 460b284ef0..dec39dae91 100644 --- a/extras/audio plugins/wrapper/formats/RTAS/juce_RTASWrapper.cpp +++ b/extras/audio plugins/wrapper/formats/RTAS/juce_RTASWrapper.cpp @@ -1075,6 +1075,9 @@ private: { switch (numChans) { + case 0: + return ePlugIn_StemFormat_Generic; + case 1: return ePlugIn_StemFormat_Mono; diff --git a/src/juce_appframework/application/juce_ApplicationCommandManager.cpp b/src/juce_appframework/application/juce_ApplicationCommandManager.cpp index 22580d0f5c..3f3d98aeb1 100644 --- a/src/juce_appframework/application/juce_ApplicationCommandManager.cpp +++ b/src/juce_appframework/application/juce_ApplicationCommandManager.cpp @@ -190,6 +190,10 @@ bool ApplicationCommandManager::invokeDirectly (const CommandID commandID, const bool ApplicationCommandManager::invoke (const ApplicationCommandTarget::InvocationInfo& info_, const bool asynchronously) { + // This call isn't thread-safe for use from a non-UI thread without locking the message + // manager first.. + checkMessageManagerIsLocked + ApplicationCommandTarget* const target = getFirstCommandTarget (info_.commandID); if (target == 0) diff --git a/src/juce_appframework/gui/components/controls/juce_ComboBox.h b/src/juce_appframework/gui/components/controls/juce_ComboBox.h index 7cc0db62dc..4f20baf817 100644 --- a/src/juce_appframework/gui/components/controls/juce_ComboBox.h +++ b/src/juce_appframework/gui/components/controls/juce_ComboBox.h @@ -52,7 +52,7 @@ public: /** Destructor. */ virtual ~ComboBoxListener() {} - /** Called when a Label's text has changed. + /** Called when a ComboBox has its selected item changed. */ virtual void comboBoxChanged (ComboBox* comboBoxThatHasChanged) = 0; }; diff --git a/src/juce_appframework/gui/components/controls/juce_ListBox.cpp b/src/juce_appframework/gui/components/controls/juce_ListBox.cpp index b60dd4288a..596358e65a 100644 --- a/src/juce_appframework/gui/components/controls/juce_ListBox.cpp +++ b/src/juce_appframework/gui/components/controls/juce_ListBox.cpp @@ -435,12 +435,7 @@ void ListBox::updateContent() if (selected [selected.size() - 1] >= totalItems) { selected.removeRange (totalItems, INT_MAX - totalItems); - - if (selected.size() == 0) - lastRowSelected = totalItems - 1; - else if (lastRowSelected >= totalItems) - lastRowSelected = getSelectedRow (0); - + lastRowSelected = getSelectedRow (0); selectionChanged = true; } diff --git a/src/juce_appframework/gui/components/controls/juce_TableListBox.h b/src/juce_appframework/gui/components/controls/juce_TableListBox.h index 4990303417..3a4e49ab88 100644 --- a/src/juce_appframework/gui/components/controls/juce_TableListBox.h +++ b/src/juce_appframework/gui/components/controls/juce_TableListBox.h @@ -155,7 +155,7 @@ public: @see ListBox::selectedRowsChanged() */ - virtual void selectedRowsChanged (int lastRowselected); + virtual void selectedRowsChanged (int lastRowSelected); /** Override this to be informed when the delete key is pressed. diff --git a/src/juce_appframework/gui/components/keyboard/juce_KeyPressMappingSet.h b/src/juce_appframework/gui/components/keyboard/juce_KeyPressMappingSet.h index 00162c0017..b3b2aaea66 100644 --- a/src/juce_appframework/gui/components/keyboard/juce_KeyPressMappingSet.h +++ b/src/juce_appframework/gui/components/keyboard/juce_KeyPressMappingSet.h @@ -66,8 +66,8 @@ // first, make sure the command manager has registered all the commands that its // targets can perform.. - myCommandManager->registerCommandsForTarget (myCommandTarget1); - myCommandManager->registerCommandsForTarget (myCommandTarget2); + myCommandManager->registerAllCommandsForTarget (myCommandTarget1); + myCommandManager->registerAllCommandsForTarget (myCommandTarget2); // this will use the command manager to initialise the KeyPressMappingSet with // the default keypresses that were specified when the targets added their commands diff --git a/src/juce_core/text/juce_String.cpp b/src/juce_core/text/juce_String.cpp index aea4155cb8..f621574494 100644 --- a/src/juce_core/text/juce_String.cpp +++ b/src/juce_core/text/juce_String.cpp @@ -1268,7 +1268,7 @@ void String::vprintf (const tchar* const pf, va_list& args) throw() deleteInternal(); - for (;;) + do { const int num = CharacterFunctions::vprintf (buf, bufSize - 1, pf, args); @@ -1291,6 +1291,8 @@ void String::vprintf (const tchar* const pf, va_list& args) throw() bufSize += 256; buf = (tchar*) juce_malloc (bufSize * sizeof (tchar)); } + while (bufSize < 65536); // this is a sanity check to avoid situations where vprintf repeatedly + // returns -1 because of an error rather than because it needs more space. if (buf != stackBuf) juce_free (buf);