Browse Source

Minor clean-ups.

tags/2021-05-28
jules 12 years ago
parent
commit
e95d3a30c8
4 changed files with 13 additions and 20 deletions
  1. +0
    -1
      modules/juce_audio_formats/sampler/juce_Sampler.cpp
  2. +3
    -3
      modules/juce_audio_processors/scanning/juce_PluginListComponent.cpp
  3. +8
    -12
      modules/juce_audio_utils/players/juce_AudioProcessorPlayer.cpp
  4. +2
    -4
      modules/juce_audio_utils/players/juce_AudioProcessorPlayer.h

+ 0
- 1
modules/juce_audio_formats/sampler/juce_Sampler.cpp View File

@@ -23,7 +23,6 @@
============================================================================== ==============================================================================
*/ */
SamplerSound::SamplerSound (const String& name_, SamplerSound::SamplerSound (const String& name_,
AudioFormatReader& source, AudioFormatReader& source,
const BigInteger& midiNotes_, const BigInteger& midiNotes_,


+ 3
- 3
modules/juce_audio_processors/scanning/juce_PluginListComponent.cpp View File

@@ -366,12 +366,12 @@ private:
return false; return false;
} }
ScopedPointer<PluginDirectoryScanner> scanner;
AlertWindow pathChooserWindow, progressWindow;
FileSearchPathListComponent pathList;
PluginListComponent& owner; PluginListComponent& owner;
AudioPluginFormat& formatToScan; AudioPluginFormat& formatToScan;
PropertiesFile* propertiesToUse; PropertiesFile* propertiesToUse;
ScopedPointer<PluginDirectoryScanner> scanner;
AlertWindow pathChooserWindow, progressWindow;
FileSearchPathListComponent pathList;
String progressMessage; String progressMessage;
double progress; double progress;
bool shouldUseThread, finished; bool shouldUseThread, finished;


+ 8
- 12
modules/juce_audio_utils/players/juce_AudioProcessorPlayer.cpp View File

@@ -139,14 +139,18 @@ void AudioProcessorPlayer::audioDeviceIOCallback (const float** const inputChann
} }
} }
void AudioProcessorPlayer::prepareToPlay (double newSampleRate, int newBlockSize,
int numChansIn, int numChansOut)
void AudioProcessorPlayer::audioDeviceAboutToStart (AudioIODevice* const device)
{ {
const double newSampleRate = device->getCurrentSampleRate();
const int newBlockSize = device->getCurrentBufferSizeSamples();
const int numChansIn = device->getActiveInputChannels().countNumberOfSetBits();
const int numChansOut = device->getActiveOutputChannels().countNumberOfSetBits();
const ScopedLock sl (lock); const ScopedLock sl (lock);
sampleRate = newSampleRate; sampleRate = newSampleRate;
blockSize = newBlockSize;
numInputChans = numChansIn;
blockSize = newBlockSize;
numInputChans = numChansIn;
numOutputChans = numChansOut; numOutputChans = numChansOut;
messageCollector.reset (sampleRate); messageCollector.reset (sampleRate);
@@ -163,14 +167,6 @@ void AudioProcessorPlayer::prepareToPlay (double newSampleRate, int newBlockSize
} }
} }
void AudioProcessorPlayer::audioDeviceAboutToStart (AudioIODevice* const device)
{
prepareToPlay (device->getCurrentSampleRate(),
device->getCurrentBufferSizeSamples(),
device->getActiveInputChannels().countNumberOfSetBits(),
device->getActiveOutputChannels().countNumberOfSetBits());
}
void AudioProcessorPlayer::audioDeviceStopped() void AudioProcessorPlayer::audioDeviceStopped()
{ {
const ScopedLock sl (lock); const ScopedLock sl (lock);


+ 2
- 4
modules/juce_audio_utils/players/juce_AudioProcessorPlayer.h View File

@@ -77,13 +77,11 @@ public:
int totalNumOutputChannels, int totalNumOutputChannels,
int numSamples); int numSamples);
/** @internal */ /** @internal */
void audioDeviceAboutToStart (AudioIODevice* device);
void audioDeviceAboutToStart (AudioIODevice*);
/** @internal */ /** @internal */
void audioDeviceStopped(); void audioDeviceStopped();
/** @internal */ /** @internal */
void handleIncomingMidiMessage (MidiInput* source, const MidiMessage& message);
/** @internal */
void prepareToPlay (double sampleRate, int blockSize, int numChansIn, int numChansOut);
void handleIncomingMidiMessage (MidiInput*, const MidiMessage&);
private: private:
//============================================================================== //==============================================================================


Loading…
Cancel
Save