mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Minor code style tidy-ups
This commit is contained in:
parent
7d07f51ce7
commit
c587d4b495
10 changed files with 31 additions and 30 deletions
|
|
@ -162,7 +162,7 @@ bool BufferingAudioSource::waitForNextAudioBlockReady (const AudioSourceChannelI
|
|||
if (! isLooping() && nextPlayPos > getTotalLength())
|
||||
return true;
|
||||
|
||||
const uint32 endTime = Time::getMillisecondCounter () + timeout;
|
||||
const uint32 endTime = Time::getMillisecondCounter() + timeout;
|
||||
uint32 now = Time::getMillisecondCounter();
|
||||
|
||||
while (now < endTime)
|
||||
|
|
|
|||
|
|
@ -34,8 +34,8 @@ struct ModifierKeyProvider
|
|||
struct ModifierKeyReceiver
|
||||
{
|
||||
virtual ~ModifierKeyReceiver() {}
|
||||
virtual void setModifierKeyProvider (ModifierKeyProvider* provider) = 0;
|
||||
virtual void removeModifierKeyProvider () = 0;
|
||||
virtual void setModifierKeyProvider (ModifierKeyProvider*) = 0;
|
||||
virtual void removeModifierKeyProvider() = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -529,13 +529,14 @@ namespace AAXClasses
|
|||
};
|
||||
|
||||
static void AAX_CALLBACK algorithmProcessCallback (JUCEAlgorithmContext* const instancesBegin[], const void* const instancesEnd);
|
||||
|
||||
//==============================================================================
|
||||
class JuceAAX_Processor : public AAX_CEffectParameters,
|
||||
public juce::AudioPlayHead,
|
||||
public AudioProcessorListener
|
||||
{
|
||||
public:
|
||||
JuceAAX_Processor ()
|
||||
JuceAAX_Processor()
|
||||
: pluginInstance (createPluginFilterOfType (AudioProcessor::wrapperType_AAX)),
|
||||
isPrepared (false),
|
||||
sampleRate (0), lastBufferSize (1024), maxBufferSize (1024)
|
||||
|
|
@ -551,7 +552,7 @@ namespace AAXClasses
|
|||
static AAX_CEffectParameters* AAX_CALLBACK Create()
|
||||
{
|
||||
PluginHostType::jucePlugInClientCurrentWrapperType = AudioProcessor::wrapperType_AAX;
|
||||
return new JuceAAX_Processor ();
|
||||
return new JuceAAX_Processor();
|
||||
}
|
||||
|
||||
AAX_Result Uninitialize() override
|
||||
|
|
@ -629,7 +630,7 @@ namespace AAXClasses
|
|||
juce::MemoryBlock& tempFilterData = getTemporaryChunkMemory();
|
||||
|
||||
if (tempFilterData.getSize() == 0)
|
||||
return 20700 /*AAX_ERROR_PLUGIN_API_INVALID_THREAD*/;
|
||||
return 20700; // AAX_ERROR_PLUGIN_API_INVALID_THREAD
|
||||
|
||||
oChunk->fSize = (int32_t) tempFilterData.getSize();
|
||||
tempFilterData.copyTo (oChunk->fData, 0, tempFilterData.getSize());
|
||||
|
|
|
|||
|
|
@ -1472,8 +1472,8 @@ private:
|
|||
}
|
||||
else
|
||||
{
|
||||
maxTotalIns = numInputBuses > 0 ? filter->getBus (true, 0)->getMaxSupportedChannels () : 0;
|
||||
maxTotalOuts = numOutputBuses > 0 ? filter->getBus (false, 0)->getMaxSupportedChannels () : 0;
|
||||
maxTotalIns = numInputBuses > 0 ? filter->getBus (true, 0)->getMaxSupportedChannels() : 0;
|
||||
maxTotalOuts = numOutputBuses > 0 ? filter->getBus (false, 0)->getMaxSupportedChannels() : 0;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -632,14 +632,14 @@ private:
|
|||
parameterToMidiControllerOffset = static_cast<Vst::ParamID> (usingManagedParameter ? paramMidiControllerOffset
|
||||
: parameters.getParameterCount());
|
||||
|
||||
initialiseMidiControllerMappings ();
|
||||
initialiseMidiControllerMappings();
|
||||
#endif
|
||||
|
||||
audioProcessorChanged (pluginInstance);
|
||||
}
|
||||
}
|
||||
|
||||
void initialiseMidiControllerMappings ()
|
||||
void initialiseMidiControllerMappings()
|
||||
{
|
||||
for (int c = 0, p = 0; c < numMIDIChannels; ++c)
|
||||
{
|
||||
|
|
@ -1942,7 +1942,7 @@ private:
|
|||
processParameterChanges (*data.inputParameterChanges);
|
||||
|
||||
#if JUCE_DEBUG && ! JucePlugin_ProducesMidiOutput
|
||||
const int numMidiEventsComingIn = midiBuffer.getNumEvents ();
|
||||
const int numMidiEventsComingIn = midiBuffer.getNumEvents();
|
||||
#endif
|
||||
|
||||
if (pluginInstance->isSuspended())
|
||||
|
|
|
|||
|
|
@ -363,7 +363,7 @@ struct AudioUnitHelpers
|
|||
HeapBlock<int>& layoutMapStorage = isInput ? inputLayoutMapStorage : outputLayoutMapStorage;
|
||||
int**& layoutMap = isInput ? inputLayoutMap : outputLayoutMap;
|
||||
|
||||
const int totalInChannels = processor.getTotalNumInputChannels ();
|
||||
const int totalInChannels = processor.getTotalNumInputChannels();
|
||||
const int totalOutChannels = processor.getTotalNumOutputChannels();
|
||||
|
||||
layoutMapPtrStorage.calloc (static_cast<size_t> (numBuses));
|
||||
|
|
|
|||
|
|
@ -361,7 +361,7 @@ class VST3HostContext : public Vst::IComponentHandler, // From VST V3.0.0
|
|||
public Vst::IUnitHandler
|
||||
{
|
||||
public:
|
||||
VST3HostContext () : plugin (nullptr)
|
||||
VST3HostContext() : plugin (nullptr)
|
||||
{
|
||||
appName = File::getSpecialLocation (File::currentApplicationFile).getFileNameWithoutExtension();
|
||||
attributeList = new AttributeList (this);
|
||||
|
|
@ -1627,7 +1627,7 @@ struct VST3ComponentHolder
|
|||
}
|
||||
|
||||
// transfers ownership to the plugin instance!
|
||||
AudioPluginInstance* createPluginInstance ();
|
||||
AudioPluginInstance* createPluginInstance();
|
||||
|
||||
bool fetchController (ComSmartPtr<Vst::IEditController>& editController)
|
||||
{
|
||||
|
|
@ -2364,7 +2364,7 @@ public:
|
|||
|
||||
struct ParamValueQueue : public Vst::IParamValueQueue
|
||||
{
|
||||
ParamValueQueue () : paramID (static_cast<Vst::ParamID> (-1))
|
||||
ParamValueQueue() : paramID (static_cast<Vst::ParamID> (-1))
|
||||
{
|
||||
points.ensureStorageAllocated (1024);
|
||||
}
|
||||
|
|
@ -2686,7 +2686,7 @@ private:
|
|||
return paramInfo;
|
||||
}
|
||||
|
||||
void syncProgramNames ()
|
||||
void syncProgramNames()
|
||||
{
|
||||
programNames.clear();
|
||||
|
||||
|
|
@ -2767,12 +2767,13 @@ private:
|
|||
};
|
||||
|
||||
//==============================================================================
|
||||
AudioPluginInstance* VST3Classes::VST3ComponentHolder::createPluginInstance ()
|
||||
AudioPluginInstance* VST3Classes::VST3ComponentHolder::createPluginInstance()
|
||||
{
|
||||
if (! initialise()) return nullptr;
|
||||
if (! initialise())
|
||||
return nullptr;
|
||||
|
||||
VST3PluginInstance* plugin = new VST3PluginInstance (this);
|
||||
host->setPlugin (plugin);
|
||||
|
||||
return plugin;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ bool AudioProcessor::setChannelLayoutOfBus (bool isInputBus, int busIdx, const A
|
|||
return false;
|
||||
}
|
||||
|
||||
bool AudioProcessor::enableAllBuses ()
|
||||
bool AudioProcessor::enableAllBuses()
|
||||
{
|
||||
BusesLayout layouts;
|
||||
const int numInputs = getBusCount (true);
|
||||
|
|
@ -382,7 +382,7 @@ void AudioProcessor::setPlayConfigDetails (const int newNumIns,
|
|||
success &= setChannelLayoutOfBus (false, 0, AudioChannelSet::canonicalChannelSet (newNumOuts));
|
||||
|
||||
// if the user is using this method then they do not want any side-buses or aux outputs
|
||||
success &= disableNonMainBuses ();
|
||||
success &= disableNonMainBuses();
|
||||
jassert (success);
|
||||
|
||||
// the processor may not support this arrangement at all
|
||||
|
|
@ -840,15 +840,14 @@ bool AudioProcessor::containsLayout (const BusesLayout& layouts, const Array<InO
|
|||
if (layouts.inputBuses.size() > 1 || layouts.outputBuses.size() > 1)
|
||||
return false;
|
||||
|
||||
const InOutChannelPair mainLayout
|
||||
( static_cast<int16> (layouts.getNumChannels (true, 0)),
|
||||
static_cast<int16> (layouts.getNumChannels (false, 0)) );
|
||||
const InOutChannelPair mainLayout (static_cast<int16> (layouts.getNumChannels (true, 0)),
|
||||
static_cast<int16> (layouts.getNumChannels (false, 0)));
|
||||
|
||||
return channelLayouts.contains (mainLayout);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
bool AudioProcessor::disableNonMainBuses ()
|
||||
bool AudioProcessor::disableNonMainBuses()
|
||||
{
|
||||
BusesLayout layouts = getBusesLayout();
|
||||
|
||||
|
|
|
|||
|
|
@ -602,7 +602,7 @@ public:
|
|||
bool enableAllBuses();
|
||||
|
||||
/** Disables all non-main buses (aux and sidechains). */
|
||||
bool disableNonMainBuses ();
|
||||
bool disableNonMainBuses();
|
||||
|
||||
//==============================================================================
|
||||
/** Returns the position of a bus's channels within the processBlock buffer.
|
||||
|
|
@ -1452,7 +1452,7 @@ private:
|
|||
{
|
||||
int16 inChannels, outChannels;
|
||||
|
||||
InOutChannelPair () noexcept : inChannels (0), outChannels (0) {}
|
||||
InOutChannelPair() noexcept : inChannels (0), outChannels (0) {}
|
||||
InOutChannelPair (short inCh, short outCh) noexcept : inChannels (inCh), outChannels (outCh) {}
|
||||
InOutChannelPair (const InOutChannelPair& o) noexcept : inChannels (o.inChannels), outChannels (o.outChannels) {}
|
||||
InOutChannelPair (const short (&config)[2]) noexcept : inChannels (config[0]), outChannels (config[1]) {}
|
||||
|
|
|
|||
|
|
@ -66,12 +66,12 @@ struct AudioProcessorValueTreeState::Parameter : public AudioProcessorParamete
|
|||
: AudioProcessorParameter::getText (v, length);
|
||||
}
|
||||
|
||||
int getNumSteps () const override
|
||||
int getNumSteps() const override
|
||||
{
|
||||
if (range.interval > 0)
|
||||
return (static_cast<int> ((range.end - range.start) / range.interval) + 1);
|
||||
else
|
||||
return AudioProcessor::getDefaultNumParameterSteps ();
|
||||
|
||||
return AudioProcessor::getDefaultNumParameterSteps();
|
||||
}
|
||||
|
||||
void setValue (float newValue) override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue