78 void setGain (
float newGain) noexcept;
83 float getGain() const noexcept {
return gain; }
87 void audioDeviceIOCallback (
const float** inputChannelData,
88 int totalNumInputChannels,
89 float** outputChannelData,
90 int totalNumOutputChannels,
91 int numSamples)
override;
94 void audioDeviceAboutToStart (
AudioIODevice* device)
override;
97 void audioDeviceStopped()
override;
100 void prepareToPlay (
double sampleRate,
int blockSize);
106 double sampleRate = 0;
108 float* channels[128];
109 float* outputChans[128];
110 const float* inputChans[128];
112 float lastGain = 1.0f;
113 std::atomic<float> gain { 1.0f };
115 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioSourcePlayer)
One of these is passed to an AudioIODevice object to stream the audio data in and out.
Base class for an audio device with synchronised input and output channels.
Wrapper class to continuously stream audio from an audio source to an AudioIODevice.
AudioSource * getCurrentSource() const noexcept
Returns the source that's playing.
float getGain() const noexcept
Returns the current gain.
Base class for objects that can produce a continuous stream of audio.
#define JUCE_API
This macro is added to all JUCE public class declarations.