mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-11 23:54:18 +00:00
Made the AU wrapper send notifications about parameter name changes.
This commit is contained in:
parent
6d56d590df
commit
2fc0de42f2
1 changed files with 27 additions and 12 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue