Audacity 3.2.0
|
AudioIoCallback is a class that implements the callback required by PortAudio. The callback needs to be responsive, has no GUI, and copies data into and out of the sound card buffers. It also sends data to the meters. More...
#include <AudioIO.h>
Classes | |
class | AudioIOExtIterator |
struct | AudioIOExtRange |
struct | TransportState |
Public Types | |
using | RingBuffers = std::vector< std::unique_ptr< RingBuffer > > |
Public Member Functions | |
AudioIoCallback () | |
~AudioIoCallback () | |
int | AudioCallback (constSamplePtr inputBuffer, float *outputBuffer, unsigned long framesPerBuffer, const PaStreamCallbackTimeInfo *timeInfo, const PaStreamCallbackFlags statusFlags, void *userData) |
std::shared_ptr< AudioIOListener > | GetListener () const |
void | SetListener (const std::shared_ptr< AudioIOListener > &listener) |
int | CallbackDoSeek () |
void | CallbackCheckCompletion (int &callbackReturn, unsigned long len) |
unsigned | CountSoloingSequences () |
bool | SequenceShouldBeSilent (const PlayableSequence &ps) |
void | CheckSoundActivatedRecordingLevel (float *inputSamples, unsigned long framesPerBuffer) |
bool | FillOutputBuffers (float *outputFloats, unsigned long framesPerBuffer, float *outputMeterFloats) |
void | DrainInputBuffers (constSamplePtr inputBuffer, unsigned long framesPerBuffer, const PaStreamCallbackFlags statusFlags, float *tempFloats) |
void | UpdateTimePosition (unsigned long framesPerBuffer) |
void | DoPlaythrough (constSamplePtr inputBuffer, float *outputBuffer, unsigned long framesPerBuffer, float *outputMeterFloats) |
void | SendVuInputMeterData (const float *inputSamples, unsigned long framesPerBuffer) |
void | SendVuOutputMeterData (const float *outputMeterFloats, unsigned long framesPerBuffer) |
size_t | GetCommonlyReadyPlayback () |
Get the number of audio samples ready in all of the playback buffers. More... | |
size_t | GetCommonlyWrittenForPlayback () |
void | StartAudioThread () |
void | WaitForAudioThreadStarted () |
void | StopAudioThread () |
void | WaitForAudioThreadStopped () |
void | ProcessOnceAndWait (std::chrono::milliseconds sleepTime=std::chrono::milliseconds(50)) |
bool | HasRecordingException () const |
const std::vector< std::pair< double, double > > & | LostCaptureIntervals () |
iteration over extensions, supporting range-for syntax | |
AudioIOExtRange | Extensions () |
Public Member Functions inherited from AudioIOBase | |
AudioIOBase () | |
virtual | ~AudioIOBase () |
AudioIOBase (const AudioIOBase &)=delete | |
AudioIOBase & | operator= (const AudioIOBase &)=delete |
void | SetCaptureMeter (const std::shared_ptr< AudacityProject > &project, const std::weak_ptr< Meter > &meter) |
void | SetPlaybackMeter (const std::shared_ptr< AudacityProject > &project, const std::weak_ptr< Meter > &meter) |
void | HandleDeviceChange () |
update state after changing what audio devices are selected More... | |
wxString | GetDeviceInfo () const |
Get diagnostic information on all the available audio I/O devices. More... | |
std::vector< AudioIODiagnostics > | GetAllDeviceInfo () |
Get diagnostic information for audio devices and also for extensions. More... | |
bool | IsPaused () const |
Find out if playback / recording is currently paused. More... | |
virtual void | StopStream ()=0 |
bool | IsBusy () const |
Returns true if audio i/o is busy starting, stopping, playing, or recording. More... | |
bool | IsStreamActive () const |
Returns true if the audio i/o is running at all, but not during cleanup. More... | |
bool | IsStreamActive (int token) const |
bool | IsAudioTokenActive (int token) const |
Returns true if the stream is active, or even if audio I/O is busy cleaning up its data or writing to disk. More... | |
bool | IsMonitoring () const |
Returns true if we're monitoring input (but not recording or playing actual audio) More... | |
void | SetMixer (int inputSource) |
Static Public Attributes | |
static int | mNextStreamToken = 0 |
Static Public Attributes inherited from AudioIOBase | |
static const int | StandardRates [] |
Array of common audio sample rates. More... | |
static const int | NumStandardRates = WXSIZEOF(AudioIOBase::StandardRates) |
How many standard sample rates there are. More... | |
Protected Member Functions | |
float | GetMixerOutputVol () |
void | SetMixerOutputVol (float value) |
void | SetRecordingException () |
void | ClearRecordingException () |
Static Protected Member Functions | |
static size_t | MinValue (const RingBuffers &buffers, size_t(RingBuffer::*pmf)() const) |
Static Protected Member Functions inherited from AudioIOBase | |
static wxString | DeviceName (const PaDeviceInfo *info) |
static wxString | HostName (const PaDeviceInfo *info) |
static int | getRecordDevIndex (const wxString &devName={}) |
get the index of the supplied (named) recording device, or the device selected in the preferences if none given. More... | |
static int | getPlayDevIndex (const wxString &devName={}) |
get the index of the device selected in the preferences. More... | |
Protected Attributes | |
std::weak_ptr< AudioIOListener > | mListener |
bool | mUsingAlsa { false } |
bool | mUsingJack { false } |
wxMutex | mSuspendAudioThread |
wxAtomicInt | mRecordingException {} |
std::vector< std::pair< double, double > > | mLostCaptureIntervals |
bool | mDetectDropouts { true } |
RecordingSchedule | mRecordingSchedule {} |
PlaybackSchedule | mPlaybackSchedule |
std::unique_ptr< TransportState > | mpTransportState |
Holds some state for duration of playback or recording. More... | |
Protected Attributes inherited from AudioIOBase | |
std::weak_ptr< AudacityProject > | mOwningProject |
std::atomic< bool > | mPaused { false } |
True if audio playback is paused. More... | |
int | mStreamToken { 0 } |
double | mRate |
Audio playback rate in samples per second. More... | |
PaStream * | mPortStreamV19 |
std::weak_ptr< Meter > | mInputMeter {} |
std::weak_ptr< Meter > | mOutputMeter {} |
bool | mInputMixerWorks |
Can we control the hardware input level? More... | |
std::vector< std::unique_ptr< AudioIOExtBase > > | mAudioIOExt |
Static Protected Attributes | |
static double | mCachedBestRateOut |
static bool | mCachedBestRatePlaying |
static bool | mCachedBestRateCapturing |
Static Protected Attributes inherited from AudioIOBase | |
static std::unique_ptr< AudioIOBase > | ugAudioIO |
static std::map< int, std::vector< long > > | mCachedPlaybackRates |
static std::map< int, std::vector< long > > | mCachedCaptureRates |
static std::map< std::pair< int, int >, std::vector< long > > | mCachedSampleRates |
static int | mCurrentPlaybackIndex { -1 } |
static int | mCurrentCaptureIndex { -1 } |
static double | mCachedBestRateIn { 0.0 } |
static const int | RatesToTry [] |
Array of audio sample rates to try to use. More... | |
static const int | NumRatesToTry = WXSIZEOF(AudioIOBase::RatesToTry) |
How many sample rates to try. More... | |
Private Attributes | |
std::vector< std::unique_ptr< AudioIOExtBase > > | mAudioIOExt |
Additional Inherited Members | |
Static Public Member Functions inherited from AudioIOBase | |
static AudioIOBase * | Get () |
static std::vector< long > | GetSupportedPlaybackRates (int DevIndex=-1) |
Get a list of sample rates the output (playback) device supports. More... | |
static long | GetClosestSupportedPlaybackRate (int devIndex, long rate) |
Find the closest supported sample rate for given playback device. More... | |
static std::vector< long > | GetSupportedCaptureRates (int devIndex=-1) |
Get a list of sample rates the input (recording) device supports. More... | |
static long | GetClosestSupportedCaptureRate (int devIndex, long rate) |
Find the closest supported sample rate for given recording device. More... | |
static std::vector< long > | GetSupportedSampleRates (int playDevice=-1, int recDevice=-1) |
Get a list of sample rates the current input/output device combination supports. More... | |
static long | GetClosestSupportedSampleRate (int playDevice, int recDevice, long rate) |
Find the closest supported sample rate for given playback and recording devices. More... | |
static int | GetOptimalSupportedSampleRate () |
Get a supported sample rate which can be used a an optimal default. More... | |
static bool | IsPlaybackRateSupported (int devIndex, long rate) |
Check if the specified playback rate is supported by a device. More... | |
static bool | IsCaptureRateSupported (int devIndex, long rate) |
Check if the specified sample rate is supported by a device. More... | |
AudioIoCallback is a class that implements the callback required by PortAudio. The callback needs to be responsive, has no GUI, and copies data into and out of the sound card buffers. It also sends data to the meters.
using AudioIoCallback::RingBuffers = std::vector<std::unique_ptr<RingBuffer> > |
AudioIoCallback::AudioIoCallback | ( | ) |
Definition at line 3107 of file AudioIO.cpp.
References factory, AudioIOExt::GetFactories(), mAudioIOExt, and mPlaybackSchedule.
AudioIoCallback::~AudioIoCallback | ( | ) |
Definition at line 3116 of file AudioIO.cpp.
int AudioIoCallback::AudioCallback | ( | constSamplePtr | inputBuffer, |
float * | outputBuffer, | ||
unsigned long | framesPerBuffer, | ||
const PaStreamCallbackTimeInfo * | timeInfo, | ||
const PaStreamCallbackFlags | statusFlags, | ||
void * | userData | ||
) |
Definition at line 3121 of file AudioIO.cpp.
References CheckSoundActivatedRecordingLevel(), CountSoloingSequences(), DoPlaythrough(), DrainInputBuffers(), Extensions(), FillOutputBuffers(), floatSample, GetMixerOutputVol(), AudioIOBase::IsPaused(), mbHasSoloSequences, mbMicroFades, mCallbackReturn, mCaptureFormat, mNumCaptureChannels, mNumPauseFrames, mNumPlaybackChannels, mOldPlaybackVolume, AudioIOBase::mRate, AudioIOBase::mStreamToken, SamplesToFloats(), SendVuInputMeterData(), SendVuOutputMeterData(), stackAllocate, and UpdateTimePosition().
void AudioIoCallback::CallbackCheckCompletion | ( | int & | callbackReturn, |
unsigned long | len | ||
) |
Definition at line 3292 of file AudioIO.cpp.
References PlaybackPolicy::Done(), Extensions(), PlaybackSchedule::GetPolicy(), AudioIOBase::IsPaused(), and mPlaybackSchedule.
Referenced by FillOutputBuffers().
int AudioIoCallback::CallbackDoSeek | ( | ) |
Definition at line 3232 of file AudioIO.cpp.
References PlaybackSchedule::GetPolicy(), mAudioThreadSequenceBufferExchangeLoopActive, mAudioThreadSequenceBufferExchangeLoopRunning, mPlaybackBuffers, mPlaybackMixers, mPlaybackSchedule, mSeek, AudioIOBase::mStreamToken, mSuspendAudioThread, PlaybackSchedule::mTimeQueue, PlaybackPolicy::OffsetSequenceTime(), PlaybackSchedule::TimeQueue::Prime(), ProcessOnceAndWait(), and PlaybackSchedule::SetSequenceTime().
Referenced by FillOutputBuffers().
void AudioIoCallback::CheckSoundActivatedRecordingLevel | ( | float * | inputSamples, |
unsigned long | framesPerBuffer | ||
) |
Definition at line 2636 of file AudioIO.cpp.
References GetListener(), AudioIOBase::IsPaused(), mNumCaptureChannels, mPauseRec, and mSilenceLevel.
Referenced by AudioCallback().
|
inlineprotected |
Definition at line 375 of file AudioIO.h.
Referenced by AudioIO::StartStream(), and AudioIO::StopStream().
unsigned AudioIoCallback::CountSoloingSequences | ( | ) |
Definition at line 3076 of file AudioIO.cpp.
References Extensions(), and mPlaybackSequences.
Referenced by AudioCallback().
void AudioIoCallback::DoPlaythrough | ( | constSamplePtr | inputBuffer, |
float * | outputBuffer, | ||
unsigned long | framesPerBuffer, | ||
float * | outputMeterFloats | ||
) |
Definition at line 2996 of file AudioIO.cpp.
References DoSoftwarePlaythrough(), mCaptureFormat, mNumCaptureChannels, mNumPlaybackChannels, and mSoftwarePlaythrough.
Referenced by AudioCallback().
void AudioIoCallback::DrainInputBuffers | ( | constSamplePtr | inputBuffer, |
unsigned long | framesPerBuffer, | ||
const PaStreamCallbackFlags | statusFlags, | ||
float * | tempFloats | ||
) |
Definition at line 2838 of file AudioIO.cpp.
References PlaybackPolicy::Done(), floatSample, PlaybackSchedule::GetPolicy(), PlaybackSchedule::GetSequenceTime(), int16Sample, int24Sample, mCallbackReturn, mCaptureBuffers, mCaptureFormat, mDetectDropouts, mDetectUpstreamDropouts, min(), RecordingSchedule::mLatencyCorrection, mLostCaptureIntervals, mLostSamples, mNumCaptureChannels, mNumPlaybackChannels, mPlaybackSchedule, AudioIOBase::mRate, mRecordingSchedule, mSimulateRecordingErrors, AudioIOBase::mStreamToken, and wxT().
Referenced by AudioCallback().
|
inline |
Definition at line 163 of file AudioIO.h.
Referenced by AudioCallback(), CallbackCheckCompletion(), CountSoloingSequences(), AudioIO::StartStream(), and AudioIO::StopStream().
bool AudioIoCallback::FillOutputBuffers | ( | float * | outputFloats, |
unsigned long | framesPerBuffer, | ||
float * | outputMeterFloats | ||
) |
Definition at line 2674 of file AudioIO.cpp.
References PlaybackPolicy::AllowSeek(), CallbackCheckCompletion(), CallbackDoSeek(), ClampBuffer(), ExpGain(), floatSample, AudioIOBase::Get(), GetCommonlyReadyPlayback(), GetMixerOutputVol(), PlaybackSchedule::GetPolicy(), AudioIOBase::IsPaused(), mbMicroFades, mCallbackReturn, mForceFadeOut, mLastPlaybackTimeMillis, mMaxFramesOutput, mNumPlaybackChannels, mOldPlaybackVolume, mPlaybackBuffers, mPlaybackSchedule, mPlaybackSequences, mSeek, AudioIOBase::mStreamToken, and stackAllocate.
Referenced by AudioCallback().
size_t AudioIoCallback::GetCommonlyReadyPlayback | ( | ) |
Get the number of audio samples ready in all of the playback buffers.
Returns the smallest of the buffer ready space values in the event that they are different.
Definition at line 1854 of file AudioIO.cpp.
References RingBuffer::AvailForGet(), MinValue(), and mPlaybackBuffers.
Referenced by FillOutputBuffers().
size_t AudioIoCallback::GetCommonlyWrittenForPlayback | ( | ) |
Definition at line 1859 of file AudioIO.cpp.
References MinValue(), mPlaybackBuffers, and RingBuffer::WrittenForGet().
Referenced by AudioIO::FillPlayBuffers().
|
inline |
Definition at line 171 of file AudioIO.h.
Referenced by CheckSoundActivatedRecordingLevel(), AudioIO::DrainRecordBuffers(), AudioIO::StartMonitoring(), AudioIO::StartStream(), and AudioIO::StopStream().
|
inlineprotected |
Definition at line 340 of file AudioIO.h.
Referenced by AudioCallback(), FillOutputBuffers(), and AudioIO::GetMixer().
|
inline |
Definition at line 366 of file AudioIO.h.
Referenced by ProjectAudioManager::OnAudioIOStopRecording().
|
inline |
|
staticprotected |
Definition at line 1837 of file AudioIO.cpp.
Referenced by AudioIO::GetCommonlyAvailCapture(), AudioIO::GetCommonlyFreePlayback(), GetCommonlyReadyPlayback(), and GetCommonlyWrittenForPlayback().
void AudioIoCallback::ProcessOnceAndWait | ( | std::chrono::milliseconds | sleepTime = std::chrono::milliseconds(50) | ) |
Definition at line 3346 of file AudioIO.cpp.
References mAudioThreadShouldCallSequenceBufferExchangeOnce.
Referenced by CallbackDoSeek(), and AudioIO::StopStream().
void AudioIoCallback::SendVuInputMeterData | ( | const float * | inputSamples, |
unsigned long | framesPerBuffer | ||
) |
Definition at line 3032 of file AudioIO.cpp.
References AudioIOBase::mInputMeter, and mNumCaptureChannels.
Referenced by AudioCallback().
void AudioIoCallback::SendVuOutputMeterData | ( | const float * | outputMeterFloats, |
unsigned long | framesPerBuffer | ||
) |
Definition at line 3048 of file AudioIO.cpp.
References mNumPlaybackChannels, and AudioIOBase::mOutputMeter.
Referenced by AudioCallback().
bool AudioIoCallback::SequenceShouldBeSilent | ( | const PlayableSequence & | ps | ) |
Definition at line 3097 of file AudioIO.cpp.
References PlayableSequence::GetMute(), PlayableSequence::GetSolo(), and mbHasSoloSequences.
Referenced by AudioIO::ProcessPlaybackSlices().
void AudioIoCallback::SetListener | ( | const std::shared_ptr< AudioIOListener > & | listener | ) |
Definition at line 2419 of file AudioIO.cpp.
References AudioIOBase::IsBusy(), and mListener.
|
inlineprotected |
Definition at line 342 of file AudioIO.h.
Referenced by AudioIO::AudioIO(), and AudioIO::SetMixer().
|
inlineprotected |
Definition at line 373 of file AudioIO.h.
Referenced by AudioIO::DrainRecordBuffers().
void AudioIoCallback::StartAudioThread | ( | ) |
Definition at line 3316 of file AudioIO.cpp.
References mAudioThreadSequenceBufferExchangeLoopRunning.
Referenced by AudioIO::StartStream().
void AudioIoCallback::StopAudioThread | ( | ) |
Definition at line 3331 of file AudioIO.cpp.
References mAudioThreadSequenceBufferExchangeLoopRunning.
Referenced by AudioIO::StartStream(), and AudioIO::StopStream().
void AudioIoCallback::UpdateTimePosition | ( | unsigned long | framesPerBuffer | ) |
Definition at line 2823 of file AudioIO.cpp.
References PlaybackSchedule::TimeQueue::Consumer(), mMaxFramesOutput, mPlaybackSchedule, AudioIOBase::mRate, AudioIOBase::mStreamToken, PlaybackSchedule::mTimeQueue, and PlaybackSchedule::SetSequenceTime().
Referenced by AudioCallback().
void AudioIoCallback::WaitForAudioThreadStarted | ( | ) |
Definition at line 3321 of file AudioIO.cpp.
References eNone, eStart, and mAudioThreadAcknowledge.
Referenced by AudioIO::StartStream().
void AudioIoCallback::WaitForAudioThreadStopped | ( | ) |
Definition at line 3336 of file AudioIO.cpp.
References eNone, eStop, and mAudioThreadAcknowledge.
Referenced by AudioIO::StopStream().
|
private |
Privatize the inherited array but give access by Extensions(). This class guarantees that this array is populated only with non-null pointers to the subtype AudioIOExt
Definition at line 381 of file AudioIOBase.h.
Referenced by AudioIoCallback().
std::thread AudioIoCallback::mAudioThread |
Definition at line 252 of file AudioIO.h.
Referenced by AudioIO::StartThread(), and AudioIO::~AudioIO().
std::atomic<Acknowledge> AudioIoCallback::mAudioThreadAcknowledge |
Definition at line 314 of file AudioIO.h.
Referenced by AudioIO::AudioIO(), AudioIO::AudioThread(), WaitForAudioThreadStarted(), and WaitForAudioThreadStopped().
std::atomic<bool> AudioIoCallback::mAudioThreadSequenceBufferExchangeLoopActive |
Definition at line 312 of file AudioIO.h.
Referenced by AudioIO::AudioIO(), AudioIO::AudioThread(), and CallbackDoSeek().
std::atomic<bool> AudioIoCallback::mAudioThreadSequenceBufferExchangeLoopRunning |
Definition at line 311 of file AudioIO.h.
Referenced by AudioIO::AudioIO(), AudioIO::AudioThread(), CallbackDoSeek(), StartAudioThread(), StopAudioThread(), and AudioIO::StopStream().
std::atomic<bool> AudioIoCallback::mAudioThreadShouldCallSequenceBufferExchangeOnce |
Definition at line 310 of file AudioIO.h.
Referenced by AudioIO::AudioIO(), AudioIO::AudioThread(), AudioIO::DrainRecordBuffers(), ProcessOnceAndWait(), and AudioIO::StartStream().
int AudioIoCallback::mbHasSoloSequences |
Definition at line 182 of file AudioIO.h.
Referenced by AudioCallback(), and SequenceShouldBeSilent().
bool AudioIoCallback::mbMicroFades |
Read by a worker thread but unchanging during playback
Definition at line 283 of file AudioIO.h.
Referenced by AudioCallback(), FillOutputBuffers(), AudioIO::StartStream(), and AudioIO::StopStream().
|
staticprotected |
Definition at line 356 of file AudioIO.h.
Referenced by AudioIO::GetBestRate().
|
staticprotected |
Definition at line 354 of file AudioIO.h.
Referenced by AudioIO::GetBestRate().
|
staticprotected |
Definition at line 355 of file AudioIO.h.
Referenced by AudioIO::GetBestRate().
int AudioIoCallback::mCallbackReturn |
Definition at line 183 of file AudioIO.h.
Referenced by AudioCallback(), DrainInputBuffers(), and FillOutputBuffers().
RingBuffers AudioIoCallback::mCaptureBuffers |
Definition at line 258 of file AudioIO.h.
Referenced by AudioIO::AllocateBuffers(), DrainInputBuffers(), AudioIO::DrainRecordBuffers(), AudioIO::GetCommonlyAvailCapture(), AudioIO::StartStream(), AudioIO::StartStreamCleanup(), and AudioIO::StopStream().
sampleFormat AudioIoCallback::mCaptureFormat |
Definition at line 307 of file AudioIO.h.
Referenced by AudioIO::AllocateBuffers(), AudioCallback(), DoPlaythrough(), DrainInputBuffers(), AudioIO::DrainRecordBuffers(), AudioIO::StartMonitoring(), AudioIO::StartPortAudioStream(), and AudioIO::StartStream().
double AudioIoCallback::mCaptureRate {} |
Definition at line 308 of file AudioIO.h.
Referenced by AudioIO::DrainRecordBuffers(), AudioIO::StartMonitoring(), and AudioIO::StartStream().
double AudioIoCallback::mCaptureRingBufferSecs |
Definition at line 287 of file AudioIO.h.
Referenced by AudioIO::AllocateBuffers().
RecordableSequences AudioIoCallback::mCaptureSequences |
Definition at line 259 of file AudioIO.h.
Referenced by AudioIO::DrainRecordBuffers(), AudioIO::StartStream(), and AudioIO::StopStream().
|
protected |
Read by a worker thread but unchanging during playback
Definition at line 380 of file AudioIO.h.
Referenced by DrainInputBuffers(), and AudioIO::StartStream().
std::atomic<bool> AudioIoCallback::mDetectUpstreamDropouts { true } |
Definition at line 392 of file AudioIO.h.
Referenced by DrainInputBuffers(), and anonymous_namespace{PluginMenus.cpp}::ToolsMenu().
double AudioIoCallback::mFactor |
Definition at line 280 of file AudioIO.h.
Referenced by AudioIO::AllocateBuffers(), and AudioIO::DrainRecordBuffers().
std::atomic<bool> AudioIoCallback::mFinishAudioThread { false } |
Definition at line 253 of file AudioIO.h.
Referenced by AudioIO::StartThread(), and AudioIO::~AudioIO().
std::atomic<bool> AudioIoCallback::mForceFadeOut { false } |
Definition at line 328 of file AudioIO.h.
Referenced by FillOutputBuffers(), AudioIO::StartStream(), and AudioIO::StopStream().
size_t AudioIoCallback::mHardwarePlaybackLatencyFrames {} |
Hardware output latency in frames.
Definition at line 292 of file AudioIO.h.
Referenced by AudioIO::AllocateBuffers(), and AudioIO::StartPortAudioStream().
PaError AudioIoCallback::mLastPaError |
Definition at line 334 of file AudioIO.h.
Referenced by AudioIO::AudioIO(), AudioIO::LastPaErrorString(), AudioIO::StartMonitoring(), and AudioIO::StartPortAudioStream().
wxLongLong AudioIoCallback::mLastPlaybackTimeMillis |
Definition at line 330 of file AudioIO.h.
Referenced by AudioIO::AudioIO(), and FillOutputBuffers().
double AudioIoCallback::mLastRecordingOffset |
Not (yet) used; should perhaps be atomic when it is.
Definition at line 333 of file AudioIO.h.
Referenced by AudioIO::AudioIO(), and AudioIO::StartStream().
|
protected |
Pointer is read by a worker thread but unchanging during playback. (Whether its overriding methods are race-free is not for AudioIO to ensure.)
Definition at line 348 of file AudioIO.h.
Referenced by SetListener(), and AudioIO::StartStream().
|
protected |
Definition at line 378 of file AudioIO.h.
Referenced by DrainInputBuffers(), AudioIO::StartStream(), and AudioIO::StopStream().
unsigned long long AudioIoCallback::mLostSamples { 0 } |
Definition at line 309 of file AudioIO.h.
Referenced by DrainInputBuffers(), and AudioIO::StartStream().
std::vector<std::vector<float> > AudioIoCallback::mMasterBuffers |
These buffers are used to mix and process the result of processed source channels. Number of buffers equals to number of output channels.
Definition at line 265 of file AudioIO.h.
Referenced by AudioIO::AllocateBuffers(), and AudioIO::ProcessPlaybackSlices().
unsigned long AudioIoCallback::mMaxFramesOutput |
Definition at line 281 of file AudioIO.h.
Referenced by FillOutputBuffers(), and UpdateTimePosition().
double AudioIoCallback::mMinCaptureSecsToCopy |
Definition at line 296 of file AudioIO.h.
Referenced by AudioIO::AllocateBuffers(), and AudioIO::DrainRecordBuffers().
std::atomic<float> AudioIoCallback::mMixerOutputVol { 1.0 } |
|
static |
Definition at line 279 of file AudioIO.h.
Referenced by AudioIO::StartStream().
size_t AudioIoCallback::mNumCaptureChannels |
Read by a worker thread but unchanging during playback
Definition at line 304 of file AudioIO.h.
Referenced by AudioIO::AllocateBuffers(), AudioCallback(), AudioIO::AudioIO(), CheckSoundActivatedRecordingLevel(), AudioIO::DelayingActions(), DoPlaythrough(), DrainInputBuffers(), AudioIO::DrainRecordBuffers(), SendVuInputMeterData(), AudioIO::StartPortAudioStream(), AudioIO::StartStream(), and AudioIO::StopStream().
long AudioIoCallback::mNumPauseFrames |
How many frames of zeros were output due to pauses?
Definition at line 233 of file AudioIO.h.
Referenced by AudioCallback(), AudioIO::AudioIO(), and AudioIO::StartPortAudioStream().
size_t AudioIoCallback::mNumPlaybackChannels |
Read by a worker thread but unchanging during playback
Definition at line 306 of file AudioIO.h.
Referenced by AudioIO::AllocateBuffers(), AudioCallback(), DoPlaythrough(), DrainInputBuffers(), FillOutputBuffers(), AudioIO::FillPlayBuffers(), AudioIO::ProcessPlaybackSlices(), SendVuOutputMeterData(), AudioIO::StartPortAudioStream(), AudioIO::StartStream(), and AudioIO::StopStream().
float AudioIoCallback::mOldPlaybackVolume |
Definition at line 271 of file AudioIO.h.
Referenced by AudioIO::AllocateBuffers(), AudioCallback(), and FillOutputBuffers().
bool AudioIoCallback::mPauseRec |
True if Sound Activated Recording is enabled.
Read by a worker thread but unchanging during playback
Definition at line 301 of file AudioIO.h.
Referenced by CheckSoundActivatedRecordingLevel(), and AudioIO::StartStream().
RingBuffers AudioIoCallback::mPlaybackBuffers |
Read by worker threads but unchanging during playback
Definition at line 267 of file AudioIO.h.
Referenced by AudioIO::AllocateBuffers(), CallbackDoSeek(), FillOutputBuffers(), AudioIO::FillPlayBuffers(), AudioIO::GetCommonlyFreePlayback(), GetCommonlyReadyPlayback(), GetCommonlyWrittenForPlayback(), AudioIO::ProcessPlaybackSlices(), AudioIO::StartStream(), AudioIO::StartStreamCleanup(), and AudioIO::StopStream().
std::vector<std::unique_ptr<Mixer> > AudioIoCallback::mPlaybackMixers |
Definition at line 276 of file AudioIO.h.
Referenced by AudioIO::AllocateBuffers(), CallbackDoSeek(), AudioIO::ProcessPlaybackSlices(), AudioIO::StartStream(), AudioIO::StartStreamCleanup(), and AudioIO::StopStream().
size_t AudioIoCallback::mPlaybackQueueMinimum |
Occupancy of the queue we try to maintain, with bigger batches if needed.
Definition at line 294 of file AudioIO.h.
Referenced by AudioIO::AllocateBuffers(), and AudioIO::FillPlayBuffers().
PlaybackPolicy::Duration AudioIoCallback::mPlaybackRingBufferSecs |
Definition at line 286 of file AudioIO.h.
Referenced by AudioIO::AllocateBuffers().
size_t AudioIoCallback::mPlaybackSamplesToCopy |
Preferred batch size for replenishing the playback RingBuffer.
Definition at line 290 of file AudioIO.h.
Referenced by AudioIO::AllocateBuffers(), and AudioIO::FillPlayBuffers().
|
protected |
Definition at line 396 of file AudioIO.h.
Referenced by AudioIO::AllocateBuffers(), AudioIoCallback(), AudioIO::AudioThread(), CallbackCheckCompletion(), CallbackDoSeek(), DrainInputBuffers(), FillOutputBuffers(), AudioIO::GetStreamTime(), AudioIO::IsCapturing(), AudioIO::ProcessPlaybackSlices(), AudioIO::StartStream(), AudioIO::StartStreamCleanup(), AudioIO::StopStream(), and UpdateTimePosition().
ConstPlayableSequences AudioIoCallback::mPlaybackSequences |
Definition at line 268 of file AudioIO.h.
Referenced by AudioIO::AllocateBuffers(), CountSoloingSequences(), FillOutputBuffers(), AudioIO::ProcessPlaybackSlices(), AudioIO::StartStream(), and AudioIO::StopStream().
std::vector<std::vector<float> > AudioIoCallback::mProcessingBuffers |
Buffers that hold outcome of transformations applied to each individual sample source. Number of buffers equals to the sum of number all source channels.
Definition at line 262 of file AudioIO.h.
Referenced by AudioIO::AllocateBuffers(), and AudioIO::ProcessPlaybackSlices().
|
protected |
Holds some state for duration of playback or recording.
Definition at line 400 of file AudioIO.h.
Referenced by AudioIO::AddState(), AudioIO::FillPlayBuffers(), AudioIO::RemoveState(), AudioIO::ReplaceState(), AudioIO::StartStream(), AudioIO::StartStreamCleanup(), and AudioIO::StopStream().
|
protected |
Definition at line 372 of file AudioIO.h.
Referenced by AudioIO::DrainRecordBuffers().
|
protected |
Definition at line 395 of file AudioIO.h.
Referenced by DrainInputBuffers(), AudioIO::DrainRecordBuffers(), AudioIO::IsCapturing(), AudioIO::StartStream(), and AudioIO::StopStream().
std::vector<std::unique_ptr<Resample> > AudioIoCallback::mResample |
Definition at line 255 of file AudioIO.h.
Referenced by AudioIO::AllocateBuffers(), AudioIO::DrainRecordBuffers(), AudioIO::StartStream(), AudioIO::StartStreamCleanup(), and AudioIO::StopStream().
std::vector<SampleBuffer> AudioIoCallback::mScratchBuffers |
Definition at line 273 of file AudioIO.h.
Referenced by AudioIO::AllocateBuffers(), AudioIO::StartStream(), AudioIO::StartStreamCleanup(), and AudioIO::StopStream().
std::vector<float *> AudioIoCallback::mScratchPointers |
pointing into mScratchBuffers
Definition at line 274 of file AudioIO.h.
Referenced by AudioIO::AllocateBuffers(), AudioIO::ProcessPlaybackSlices(), AudioIO::StartStream(), AudioIO::StartStreamCleanup(), and AudioIO::StopStream().
double AudioIoCallback::mSeek |
Definition at line 285 of file AudioIO.h.
Referenced by CallbackDoSeek(), FillOutputBuffers(), and AudioIO::StartStream().
float AudioIoCallback::mSilenceLevel |
Definition at line 302 of file AudioIO.h.
Referenced by AudioIO::AudioIO(), CheckSoundActivatedRecordingLevel(), and AudioIO::StartStream().
bool AudioIoCallback::mSimulateRecordingErrors { false } |
Definition at line 388 of file AudioIO.h.
Referenced by DrainInputBuffers(), and anonymous_namespace{PluginMenus.cpp}::ToolsMenu().
bool AudioIoCallback::mSoftwarePlaythrough |
Read by a worker thread but unchanging during playback
Definition at line 298 of file AudioIO.h.
Referenced by DoPlaythrough(), AudioIO::StartMonitoring(), AudioIO::StartPortAudioStream(), and AudioIO::StartStream().
|
protected |
Definition at line 360 of file AudioIO.h.
Referenced by CallbackDoSeek(), and AudioIO::StopStream().
|
protected |
Definition at line 350 of file AudioIO.h.
Referenced by AudioIO::StartMonitoring(), AudioIO::StartPortAudioStream(), and AudioIO::StartStream().
|
protected |
Definition at line 351 of file AudioIO.h.
Referenced by AudioIO::StartPortAudioStream().