mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Remove AudioIODeviceCallback::audioDeviceIOCallback
This commit is contained in:
parent
f075de78fa
commit
c97864d7f3
12 changed files with 83 additions and 53 deletions
|
|
@ -1891,10 +1891,19 @@ private:
|
|||
std::function<void()> stopped;
|
||||
std::function<void()> error;
|
||||
|
||||
void audioDeviceIOCallback (const float* const*, int, float* const*, int, int) override { NullCheckedInvocation::invoke (callback); }
|
||||
void audioDeviceAboutToStart (AudioIODevice*) override { NullCheckedInvocation::invoke (aboutToStart); }
|
||||
void audioDeviceStopped() override { NullCheckedInvocation::invoke (stopped); }
|
||||
void audioDeviceError (const String&) override { NullCheckedInvocation::invoke (error); }
|
||||
void audioDeviceIOCallbackWithContext (const float* const*,
|
||||
int,
|
||||
float* const*,
|
||||
int,
|
||||
int,
|
||||
const AudioIODeviceCallbackContext&) override
|
||||
{
|
||||
NullCheckedInvocation::invoke (callback);
|
||||
}
|
||||
|
||||
void audioDeviceAboutToStart (AudioIODevice*) override { NullCheckedInvocation::invoke (aboutToStart); }
|
||||
void audioDeviceStopped() override { NullCheckedInvocation::invoke (stopped); }
|
||||
void audioDeviceError (const String&) override { NullCheckedInvocation::invoke (error); }
|
||||
};
|
||||
|
||||
void initialiseManager (AudioDeviceManager& manager)
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ struct AudioIODeviceCallbackContext
|
|||
One of these is passed to an AudioIODevice object to stream the audio data
|
||||
in and out.
|
||||
|
||||
The AudioIODevice will repeatedly call this class's audioDeviceIOCallback()
|
||||
The AudioIODevice will repeatedly call this class's audioDeviceIOCallbackWithContext()
|
||||
method on its own high-priority audio thread, when it needs to send or receive
|
||||
the next block of data.
|
||||
|
||||
|
|
@ -90,20 +90,8 @@ public:
|
|||
processing into several smaller callbacks to ensure higher audio
|
||||
performance. So make sure your code can cope with reasonable
|
||||
changes in the buffer size from one callback to the next.
|
||||
*/
|
||||
virtual void audioDeviceIOCallback (const float* const* inputChannelData,
|
||||
int numInputChannels,
|
||||
float* const* outputChannelData,
|
||||
int numOutputChannels,
|
||||
int numSamples)
|
||||
{
|
||||
ignoreUnused (inputChannelData, numInputChannels, outputChannelData, numOutputChannels, numSamples);
|
||||
}
|
||||
|
||||
/** The same as audioDeviceIOCallback(), but with an additional context argument.
|
||||
|
||||
The default implementation of this function will call audioDeviceIOCallback(),
|
||||
but you can override this function if you need to make use of the context information.
|
||||
@param context Additional information that may be passed to the
|
||||
AudioIODeviceCallback.
|
||||
*/
|
||||
virtual void audioDeviceIOCallbackWithContext (const float* const* inputChannelData,
|
||||
int numInputChannels,
|
||||
|
|
@ -112,8 +100,7 @@ public:
|
|||
int numSamples,
|
||||
const AudioIODeviceCallbackContext& context)
|
||||
{
|
||||
audioDeviceIOCallback (inputChannelData, numInputChannels, outputChannelData, numOutputChannels, numSamples);
|
||||
ignoreUnused (context);
|
||||
ignoreUnused (inputChannelData, numInputChannels, outputChannelData, numOutputChannels, numSamples, context);
|
||||
}
|
||||
|
||||
/** Called to indicate that the device is about to start calling back.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue