mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-07 04:10:08 +00:00
AudioWorkgroup: Fix an issue with copying objects in an objective-c block
This commit is contained in:
parent
4c5cee578a
commit
5e1865c1c2
1 changed files with 8 additions and 18 deletions
|
|
@ -406,8 +406,8 @@ public:
|
|||
|
||||
#if JUCE_AUDIOWORKGROUP_TYPES_AVAILABLE
|
||||
case kAudioUnitProperty_RenderContextObserver:
|
||||
outWritable = false;
|
||||
outDataSize = sizeof (AURenderContextObserver);
|
||||
outWritable = false;
|
||||
return noErr;
|
||||
#endif
|
||||
|
||||
|
|
@ -584,14 +584,15 @@ public:
|
|||
#if JUCE_AUDIOWORKGROUP_TYPES_AVAILABLE
|
||||
case kAudioUnitProperty_RenderContextObserver:
|
||||
{
|
||||
if (auto* ptr = (AURenderContextObserver*) outData)
|
||||
AURenderContextObserver callback = ^(const AudioUnitRenderContext* context)
|
||||
{
|
||||
*ptr = contextObserver;
|
||||
return noErr;
|
||||
}
|
||||
jassert (juceFilter != nullptr);
|
||||
const auto workgroup = makeRealAudioWorkgroup (context != nullptr ? context->workgroup : nullptr);
|
||||
juceFilter->audioWorkgroupContextChanged (workgroup);
|
||||
};
|
||||
|
||||
jassertfalse;
|
||||
break;
|
||||
*(AURenderContextObserver*) outData = [callback copy];
|
||||
return noErr;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -2027,17 +2028,6 @@ private:
|
|||
HeapBlock<bool> pulledSucceeded;
|
||||
HeapBlock<MIDIPacketList> packetList { packetListBytes, 1 };
|
||||
|
||||
#if JUCE_AUDIOWORKGROUP_TYPES_AVAILABLE
|
||||
ObjCBlock<AURenderContextObserver> contextObserver { ^(const AudioUnitRenderContext* context)
|
||||
{
|
||||
if (juceFilter == nullptr)
|
||||
return;
|
||||
|
||||
auto workgroup = makeRealAudioWorkgroup (context != nullptr ? context->workgroup : nullptr);
|
||||
juceFilter->audioWorkgroupContextChanged (std::move (workgroup));
|
||||
} };
|
||||
#endif
|
||||
|
||||
ThreadLocalValue<bool> inParameterChangedCallback;
|
||||
|
||||
AudioProcessorChangedUpdater audioProcessorChangedUpdater { *this };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue