Browse Source

tags/2021-05-28
jules 18 years ago
parent
commit
9fc74e09a8
2 changed files with 21 additions and 25 deletions
  1. +11
    -9
      build/win32/platform_specific_code/juce_win32_ASIO.cpp
  2. +10
    -16
      extras/audio plugins/wrapper/formats/Standalone/juce_AudioFilterStreamer.cpp

+ 11
- 9
build/win32/platform_specific_code/juce_win32_ASIO.cpp View File

@@ -773,7 +773,9 @@ public:
bool isPlaying()
{
return isASIOOpen && (isThreadRunning() || !isUsingThread) && (currentCallback != 0);
return isASIOOpen
&& (isThreadRunning() || ! isUsingThread)
&& (currentCallback != 0);
}
const String getLastError()
@@ -849,12 +851,12 @@ public:
}
}
void resetRequest()
void resetRequest() throw()
{
needToReset = true;
}
void resyncRequest()
void resyncRequest() throw()
{
needToReset = true;
isReSync = true;
@@ -1241,7 +1243,7 @@ private:
}
//==============================================================================
void callback (long index)
void callback (const long index) throw()
{
if (isStarted)
{
@@ -1268,7 +1270,7 @@ private:
calledback = true;
}
void processBuffer()
void processBuffer() throw()
{
const ASIOBufferInfo* const infos = bufferInfos;
const int bi = bufferIndex;
@@ -1416,7 +1418,7 @@ private:
}
//==============================================================================
static ASIOTime* bufferSwitchTimeInfoCallback (ASIOTime*, long index, long)
static ASIOTime* bufferSwitchTimeInfoCallback (ASIOTime*, long index, long) throw()
{
if (currentASIODev != 0)
currentASIODev->callback (index);
@@ -1424,13 +1426,13 @@ private:
return 0;
}
static void bufferSwitchCallback (long index, long)
static void bufferSwitchCallback (long index, long) throw()
{
if (currentASIODev != 0)
currentASIODev->callback (index);
}
static long asioMessagesCallback (long selector, long value, void*, double*)
static long asioMessagesCallback (long selector, long value, void*, double*) throw()
{
switch (selector)
{
@@ -1472,7 +1474,7 @@ private:
return 0;
}
static void sampleRateChangedCallback (ASIOSampleRate)
static void sampleRateChangedCallback (ASIOSampleRate) throw()
{
}


+ 10
- 16
extras/audio plugins/wrapper/formats/Standalone/juce_AudioFilterStreamer.cpp View File

@@ -100,29 +100,23 @@ void AudioFilterStreamer::audioDeviceAboutToStart (double sampleRate_,
{
sampleRate = sampleRate_;
if (! isPlaying)
{
isPlaying = true;
isPlaying = true;
emptyBuffer.setSize (1 + filter.getNumOutputChannels(),
jmax (2048, numSamplesPerBlock * 2));
emptyBuffer.clear();
emptyBuffer.setSize (1 + filter.getNumOutputChannels(),
jmax (2048, numSamplesPerBlock * 2));
emptyBuffer.clear();
midiCollector.reset (sampleRate);
midiCollector.reset (sampleRate);
filter.prepareToPlay (sampleRate, numSamplesPerBlock);
}
filter.prepareToPlay (sampleRate, numSamplesPerBlock);
}
void AudioFilterStreamer::audioDeviceStopped()
{
if (isPlaying)
{
isPlaying = false;
filter.releaseResources();
midiCollector.reset (sampleRate);
emptyBuffer.setSize (1, 32);
}
isPlaying = false;
filter.releaseResources();
midiCollector.reset (sampleRate);
emptyBuffer.setSize (1, 32);
}
void AudioFilterStreamer::handleIncomingMidiMessage (MidiInput* source, const MidiMessage& message)


Loading…
Cancel
Save