1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-22 01:34:21 +00:00

Fix for setting up RTAS parameters and mac messaging

This commit is contained in:
Julian Storer 2009-11-27 19:32:18 +00:00
parent 537b90de53
commit dfc5fd54db
3 changed files with 17 additions and 7 deletions

View file

@ -259,6 +259,8 @@ public:
deleteAndZero (wrapper);
wrapper = new EditorCompWrapper (hostWindow, editorComp, this);
process->touchAllParameters();
}
else
{
@ -786,6 +788,16 @@ protected:
// xxx is there an RTAS equivalent?
}
void touchAllParameters()
{
for (int i = 0; i < juceFilter->getNumParameters(); ++i)
{
audioProcessorParameterChangeGestureBegin (0, i);
audioProcessorParameterChanged (0, i, juceFilter->getParameter (i));
audioProcessorParameterChangeGestureEnd (0, i);
}
}
//==============================================================================
private:
AudioProcessor* juceFilter;

View file

@ -271445,16 +271445,15 @@ bool MessageManager::runDispatchLoopUntil (int millisecondsToRunFor)
jassert (isThisTheMessageThread()); // must only be called by the message thread
uint32 endTime = Time::getMillisecondCounter() + millisecondsToRunFor;
NSDate* endDate = [NSDate dateWithTimeIntervalSinceNow: millisecondsToRunFor * 0.001 + 1.0];
while (! quitMessagePosted)
{
const ScopedAutoReleasePool pool;
CFRunLoopRunInMode (kCFRunLoopDefaultMode, 0.002, true);
CFRunLoopRunInMode (kCFRunLoopDefaultMode, 0.001, true);
NSEvent* e = [NSApp nextEventMatchingMask: NSAnyEventMask
untilDate: endDate
untilDate: [NSDate dateWithTimeIntervalSinceNow: 0.001]
inMode: NSDefaultRunLoopMode
dequeue: YES];

View file

@ -395,22 +395,21 @@ bool MessageManager::runDispatchLoopUntil (int millisecondsToRunFor)
jassert (isThisTheMessageThread()); // must only be called by the message thread
uint32 endTime = Time::getMillisecondCounter() + millisecondsToRunFor;
NSDate* endDate = [NSDate dateWithTimeIntervalSinceNow: millisecondsToRunFor * 0.001 + 1.0];
while (! quitMessagePosted)
{
const ScopedAutoReleasePool pool;
CFRunLoopRunInMode (kCFRunLoopDefaultMode, 0.002, true);
CFRunLoopRunInMode (kCFRunLoopDefaultMode, 0.001, true);
NSEvent* e = [NSApp nextEventMatchingMask: NSAnyEventMask
untilDate: endDate
untilDate: [NSDate dateWithTimeIntervalSinceNow: 0.001]
inMode: NSDefaultRunLoopMode
dequeue: YES];
if (e != 0 && ! isEventBlockedByModalComps (e))
[NSApp sendEvent: e];
if (Time::getMillisecondCounter() >= endTime)
break;
}