1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-09 23:34:20 +00:00
This commit is contained in:
jules 2007-06-13 17:50:50 +00:00
parent 1ab50e37e6
commit 9fc74e09a8
2 changed files with 21 additions and 25 deletions

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()
{
}

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)