Browse Source

tags/2021-05-28
jules 17 years ago
parent
commit
8347a814f5
3 changed files with 24 additions and 8 deletions
  1. +4
    -0
      src/juce_appframework/audio/processors/juce_AudioProcessor.cpp
  2. +7
    -0
      src/juce_appframework/audio/processors/juce_AudioProcessor.h
  3. +13
    -8
      src/juce_appframework/gui/components/special/juce_AudioDeviceSelectorComponent.cpp

+ 4
- 0
src/juce_appframework/audio/processors/juce_AudioProcessor.cpp View File

@@ -203,6 +203,10 @@ void AudioProcessor::suspendProcessing (const bool shouldBeSuspended)
suspended = shouldBeSuspended;
}
void AudioProcessor::reset()
{
}
//==============================================================================
void AudioProcessor::editorBeingDeleted (AudioProcessorEditor* const editor) throw()
{


+ 7
- 0
src/juce_appframework/audio/processors/juce_AudioProcessor.h View File

@@ -285,6 +285,13 @@ public:
*/
bool isSuspended() const throw() { return suspended; }
/** A plugin can override this to be told when it should reset any playing voices.
The default implementation does nothing, but a host may call this to tell the
plugin that it should stop any tails or sounds that have been left running.
*/
virtual void reset();
//==============================================================================
/** Returns true if the processor is being run in an offline mode for rendering.


+ 13
- 8
src/juce_appframework/gui/components/special/juce_AudioDeviceSelectorComponent.cpp View File

@@ -277,10 +277,12 @@ public:
if (outputDeviceDropDown != 0)
{
outputDeviceDropDown->setBounds (lx, y, w, h);
testButton->setBounds (proportionOfWidth (0.77f),
outputDeviceDropDown->getY(),
proportionOfWidth (0.18f),
h);
if (testButton != 0)
testButton->setBounds (proportionOfWidth (0.77f),
outputDeviceDropDown->getY(),
proportionOfWidth (0.18f),
h);
y += dh;
}
@@ -424,7 +426,7 @@ public:
getTopLevelComponent()->toFront (true);
}
}
else if (button == testButton)
else if (button == testButton && testButton != 0)
{
setup.manager->playTestSound();
}
@@ -463,8 +465,11 @@ public:
: TRANS ("device:"));
outputDeviceLabel->attachToComponent (outputDeviceDropDown, true);
addAndMakeVisible (testButton = new TextButton (TRANS ("Test")));
testButton->addButtonListener (this);
if (setup.maxNumOutputChannels > 0)
{
addAndMakeVisible (testButton = new TextButton (TRANS ("Test")));
testButton->addButtonListener (this);
}
}
addNamesToDeviceBox (*outputDeviceDropDown, false);
@@ -646,7 +651,7 @@ private:
box->setSelectedId (index + 1, true);
if (! isInput)
if (testButton != 0 && ! isInput)
testButton->setEnabled (index >= 0);
}
}


Loading…
Cancel
Save