本文整理汇总了C++中AudioProcessor::releaseResources方法的典型用法代码示例。如果您正苦于以下问题:C++ AudioProcessor::releaseResources方法的具体用法?C++ AudioProcessor::releaseResources怎么用?C++ AudioProcessor::releaseResources使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AudioProcessor
的用法示例。
在下文中一共展示了AudioProcessor::releaseResources方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setProcessor
//==============================================================================
void AudioProcessorPlayer::setProcessor (AudioProcessor* const processorToPlay)
{
if (processor != processorToPlay)
{
if (processorToPlay != nullptr && sampleRate > 0 && blockSize > 0)
{
processorToPlay->setPlayConfigDetails (numInputChans, numOutputChans,
sampleRate, blockSize);
processorToPlay->prepareToPlay (sampleRate, blockSize);
}
AudioProcessor* oldOne;
{
const ScopedLock sl (lock);
oldOne = isPrepared ? processor : nullptr;
processor = processorToPlay;
isPrepared = true;
}
if (oldOne != nullptr)
oldOne->releaseResources();
}
}
示例2: renderLock
FilterIOConfigurationWindow::FilterIOConfigurationWindow (AudioProcessor& p)
: AudioProcessorEditor (&p),
title ("title", p.getName())
{
setOpaque (true);
title.setFont (title.getFont().withStyle (Font::bold));
addAndMakeVisible (title);
{
ScopedLock renderLock (p.getCallbackLock());
p.suspendProcessing (true);
p.releaseResources();
}
if (p.getBusCount (true) > 0 || p.canAddBus (true))
{
inConfig.reset (new InputOutputConfig (*this, true));
addAndMakeVisible (inConfig.get());
}
if (p.getBusCount (false) > 0 || p.canAddBus (false))
{
outConfig.reset (new InputOutputConfig (*this, false));
addAndMakeVisible (outConfig.get());
}
currentLayout = p.getBusesLayout();
setSize (400, (inConfig != nullptr && outConfig != nullptr ? 160 : 0) + 200);
}
示例3: setProcessor
//==============================================================================
void AudioProcessorPlayer::setProcessor (AudioProcessor* const processorToPlay)
{
if (processor != processorToPlay)
{
if (processorToPlay != nullptr && sampleRate > 0 && blockSize > 0)
{
processorToPlay->setPlayConfigDetails (numInputChans, numOutputChans, sampleRate, blockSize);
const bool supportsDouble = processorToPlay->supportsDoublePrecisionProcessing() && isDoublePrecision;
AudioProcessor::ProcessingPrecision precision = supportsDouble ? AudioProcessor::doublePrecision
: AudioProcessor::singlePrecision;
processorToPlay->setProcessingPrecision (precision);
processorToPlay->prepareToPlay (sampleRate, blockSize);
}
AudioProcessor* oldOne;
{
const ScopedLock sl (lock);
oldOne = isPrepared ? processor : nullptr;
processor = processorToPlay;
isPrepared = true;
}
if (oldOne != nullptr)
oldOne->releaseResources();
}
}