1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00
This commit is contained in:
jules 2007-12-06 15:54:25 +00:00
parent fc304f1be0
commit c760e69648
8 changed files with 21 additions and 20 deletions

View file

@ -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

View file

@ -1075,6 +1075,9 @@ private:
{
switch (numChans)
{
case 0:
return ePlugIn_StemFormat_Generic;
case 1:
return ePlugIn_StemFormat_Mono;

View file

@ -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)

View file

@ -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;
};

View file

@ -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;
}

View file

@ -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.

View file

@ -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

View file

@ -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);