![]() |
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 | OldChannelGains = std::array< float, 2 > |
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) |
bool | SequenceHasBeenFadedOut (const OldChannelGains &gains) |
Returns true when playback buffer data from both channels is discardable. More... | |
bool | AllSequencesAlreadySilent () |
void | CheckSoundActivatedRecordingLevel (float *inputSamples, unsigned long framesPerBuffer) |
void | AddToOutputChannel (unsigned int chan, float *outputMeterFloats, float *outputFloats, const float *tempBuf, bool drop, unsigned long len, const PlayableSequence &ps, float &channelGain) |
bool | FillOutputBuffers (float *outputBuffer, 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 () |
![]() | |
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 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 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... | |
![]() | |
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 std::unique_ptr< AudioIOBase > | ugAudioIO |
static int | mCachedPlaybackIndex = -1 |
static std::vector< long > | mCachedPlaybackRates |
static int | mCachedCaptureIndex = -1 |
static std::vector< long > | mCachedCaptureRates |
static std::vector< long > | mCachedSampleRates |
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 AudioIOBase * | Get () |
static std::vector< long > | GetSupportedPlaybackRates (int DevIndex=-1, double rate=0.0) |
Get a list of sample rates the output (playback) device supports. More... | |
static std::vector< long > | GetSupportedCaptureRates (int devIndex=-1, double rate=0.0) |
Get a list of sample rates the input (recording) device supports. More... | |
static std::vector< long > | GetSupportedSampleRates (int playDevice=-1, int recDevice=-1, double rate=0.0) |
Get a list of sample rates the current input/output device combination supports. More... | |
static int | GetOptimalSupportedSampleRate () |
Get a supported sample rate which can be used a an optimal default. 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::OldChannelGains = std::array<float, 2> |
using AudioIoCallback::RingBuffers = std::vector<std::unique_ptr<RingBuffer> > |
AudioIoCallback::AudioIoCallback | ( | ) |
Definition at line 3089 of file AudioIO.cpp.
References cloud::factory, AudioIOExt::GetFactories(), mAudioIOExt, and mPlaybackSchedule.
AudioIoCallback::~AudioIoCallback | ( | ) |
Definition at line 3098 of file AudioIO.cpp.
void AudioIoCallback::AddToOutputChannel | ( | unsigned int | chan, |
float * | outputMeterFloats, | ||
float * | outputFloats, | ||
const float * | tempBuf, | ||
bool | drop, | ||
unsigned long | len, | ||
const PlayableSequence & | ps, | ||
float & | channelGain | ||
) |
[in,out] | channelGain |
Definition at line 2571 of file AudioIO.cpp.
References ExpGain(), WideSampleSequence::GetChannelGain(), GetMixerOutputVol(), AudioIOBase::IsPaused(), mbMicroFades, mForceFadeOut, and mNumPlaybackChannels.
Referenced by FillOutputBuffers().
bool AudioIoCallback::AllSequencesAlreadySilent | ( | ) |
Definition at line 3078 of file AudioIO.cpp.
References mOldChannelGains, mPlaybackSequences, SequenceHasBeenFadedOut(), and SequenceShouldBeSilent().
Referenced by AudioCallback().
int AudioIoCallback::AudioCallback | ( | constSamplePtr | inputBuffer, |
float * | outputBuffer, | ||
unsigned long | framesPerBuffer, | ||
const PaStreamCallbackTimeInfo * | timeInfo, | ||
const PaStreamCallbackFlags | statusFlags, | ||
void * | userData | ||
) |
Definition at line 3103 of file AudioIO.cpp.
References AllSequencesAlreadySilent(), CheckSoundActivatedRecordingLevel(), CountSoloingSequences(), DoPlaythrough(), DrainInputBuffers(), Extensions(), FillOutputBuffers(), floatSample, GetMixerOutputVol(), AudioIOBase::IsPaused(), mbHasSoloSequences, mbMicroFades, mCallbackReturn, mCaptureFormat, mNumCaptureChannels, mNumPauseFrames, mNumPlaybackChannels, AudioIOBase::mRate, AudioIOBase::mStreamToken, SamplesToFloats(), SendVuInputMeterData(), SendVuOutputMeterData(), stackAllocate, and UpdateTimePosition().
void AudioIoCallback::CallbackCheckCompletion | ( | int & | callbackReturn, |
unsigned long | len | ||
) |
Definition at line 3278 of file AudioIO.cpp.
References PlaybackPolicy::Done(), Extensions(), PlaybackSchedule::GetPolicy(), AudioIOBase::IsPaused(), and mPlaybackSchedule.
Referenced by FillOutputBuffers().
int AudioIoCallback::CallbackDoSeek | ( | ) |
Definition at line 3218 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 2543 of file AudioIO.cpp.
References GetListener(), AudioIOBase::IsPaused(), mNumCaptureChannels, mPauseRec, and mSilenceLevel.
Referenced by AudioCallback().
|
inlineprotected |
Definition at line 383 of file AudioIO.h.
Referenced by AudioIO::StartStream(), and AudioIO::StopStream().
unsigned AudioIoCallback::CountSoloingSequences | ( | ) |
Definition at line 3041 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 2961 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 2803 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 161 of file AudioIO.h.
Referenced by AudioCallback(), CallbackCheckCompletion(), CountSoloingSequences(), AudioIO::StartStream(), and AudioIO::StopStream().
bool AudioIoCallback::FillOutputBuffers | ( | float * | outputBuffer, |
unsigned long | framesPerBuffer, | ||
float * | outputMeterFloats | ||
) |
Definition at line 2625 of file AudioIO.cpp.
References AddToOutputChannel(), PlaybackPolicy::AllowSeek(), CallbackCheckCompletion(), CallbackDoSeek(), ClampBuffer(), floatSample, GetCommonlyReadyPlayback(), PlaybackSchedule::GetPolicy(), mbMicroFades, mCallbackReturn, mLastPlaybackTimeMillis, mMaxFramesOutput, mNumCaptureChannels, mNumPlaybackChannels, mOldChannelGains, mPlaybackBuffers, mPlaybackSchedule, mPlaybackSequences, mSeek, AudioIOBase::mStreamToken, SequenceHasBeenFadedOut(), SequenceShouldBeSilent(), 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 1884 of file AudioIO.cpp.
References RingBuffer::AvailForGet(), MinValue(), and mPlaybackBuffers.
Referenced by FillOutputBuffers().
size_t AudioIoCallback::GetCommonlyWrittenForPlayback | ( | ) |
Definition at line 1889 of file AudioIO.cpp.
References MinValue(), mPlaybackBuffers, and RingBuffer::WrittenForGet().
Referenced by AudioIO::FillPlayBuffers().
|
inline |
Definition at line 169 of file AudioIO.h.
Referenced by CheckSoundActivatedRecordingLevel(), AudioIO::DrainRecordBuffers(), AudioIO::StartMonitoring(), AudioIO::StartStream(), and AudioIO::StopStream().
|
inlineprotected |
Definition at line 348 of file AudioIO.h.
Referenced by AddToOutputChannel(), AudioCallback(), and AudioIO::GetMixer().
|
inline |
Definition at line 374 of file AudioIO.h.
Referenced by ProjectAudioManager::OnAudioIOStopRecording().
|
inline |
|
staticprotected |
Definition at line 1867 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 3332 of file AudioIO.cpp.
References mAudioThreadShouldCallSequenceBufferExchangeOnce.
Referenced by CallbackDoSeek(), and AudioIO::StopStream().
void AudioIoCallback::SendVuInputMeterData | ( | const float * | inputSamples, |
unsigned long | framesPerBuffer | ||
) |
Definition at line 2997 of file AudioIO.cpp.
References AudioIOBase::mInputMeter, and mNumCaptureChannels.
Referenced by AudioCallback().
void AudioIoCallback::SendVuOutputMeterData | ( | const float * | outputMeterFloats, |
unsigned long | framesPerBuffer | ||
) |
Definition at line 3013 of file AudioIO.cpp.
References mNumPlaybackChannels, and AudioIOBase::mOutputMeter.
Referenced by AudioCallback().
bool AudioIoCallback::SequenceHasBeenFadedOut | ( | const OldChannelGains & | gains | ) |
Returns true when playback buffer data from both channels is discardable.
Definition at line 3073 of file AudioIO.cpp.
Referenced by AllSequencesAlreadySilent(), and FillOutputBuffers().
bool AudioIoCallback::SequenceShouldBeSilent | ( | const PlayableSequence & | ps | ) |
Definition at line 3062 of file AudioIO.cpp.
References PlayableSequence::GetMute(), PlayableSequence::GetSolo(), AudioIOBase::IsPaused(), and mbHasSoloSequences.
Referenced by AllSequencesAlreadySilent(), and FillOutputBuffers().
void AudioIoCallback::SetListener | ( | const std::shared_ptr< AudioIOListener > & | listener | ) |
Definition at line 2326 of file AudioIO.cpp.
References AudioIOBase::IsBusy(), and mListener.
|
inlineprotected |
Definition at line 350 of file AudioIO.h.
Referenced by AudioIO::AudioIO(), and AudioIO::SetMixer().
|
inlineprotected |
Definition at line 381 of file AudioIO.h.
Referenced by AudioIO::DrainRecordBuffers().
void AudioIoCallback::StartAudioThread | ( | ) |
Definition at line 3302 of file AudioIO.cpp.
References mAudioThreadSequenceBufferExchangeLoopRunning.
Referenced by AudioIO::StartStream().
void AudioIoCallback::StopAudioThread | ( | ) |
Definition at line 3317 of file AudioIO.cpp.
References mAudioThreadSequenceBufferExchangeLoopRunning.
Referenced by AudioIO::StartStream(), and AudioIO::StopStream().
void AudioIoCallback::UpdateTimePosition | ( | unsigned long | framesPerBuffer | ) |
Definition at line 2788 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 3307 of file AudioIO.cpp.
References eNone, eStart, and mAudioThreadAcknowledge.
Referenced by AudioIO::StartStream().
void AudioIoCallback::WaitForAudioThreadStopped | ( | ) |
Definition at line 3322 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 322 of file AudioIOBase.h.
Referenced by AudioIoCallback().
std::thread AudioIoCallback::mAudioThread |
Definition at line 266 of file AudioIO.h.
Referenced by AudioIO::StartThread(), and AudioIO::~AudioIO().
std::atomic<Acknowledge> AudioIoCallback::mAudioThreadAcknowledge |
Definition at line 322 of file AudioIO.h.
Referenced by AudioIO::AudioIO(), AudioIO::AudioThread(), WaitForAudioThreadStarted(), and WaitForAudioThreadStopped().
std::atomic<bool> AudioIoCallback::mAudioThreadSequenceBufferExchangeLoopActive |
Definition at line 320 of file AudioIO.h.
Referenced by AudioIO::AudioIO(), AudioIO::AudioThread(), and CallbackDoSeek().
std::atomic<bool> AudioIoCallback::mAudioThreadSequenceBufferExchangeLoopRunning |
Definition at line 319 of file AudioIO.h.
Referenced by AudioIO::AudioIO(), AudioIO::AudioThread(), CallbackDoSeek(), StartAudioThread(), StopAudioThread(), and AudioIO::StopStream().
std::atomic<bool> AudioIoCallback::mAudioThreadShouldCallSequenceBufferExchangeOnce |
Definition at line 318 of file AudioIO.h.
Referenced by AudioIO::AudioIO(), AudioIO::AudioThread(), AudioIO::DrainRecordBuffers(), ProcessOnceAndWait(), and AudioIO::StartStream().
int AudioIoCallback::mbHasSoloSequences |
Definition at line 180 of file AudioIO.h.
Referenced by AudioCallback(), and SequenceShouldBeSilent().
bool AudioIoCallback::mbMicroFades |
Read by a worker thread but unchanging during playback
Definition at line 291 of file AudioIO.h.
Referenced by AddToOutputChannel(), AudioCallback(), FillOutputBuffers(), AudioIO::StartStream(), and AudioIO::StopStream().
|
staticprotected |
Definition at line 364 of file AudioIO.h.
Referenced by AudioIO::GetBestRate().
|
staticprotected |
Definition at line 362 of file AudioIO.h.
Referenced by AudioIO::GetBestRate().
|
staticprotected |
Definition at line 363 of file AudioIO.h.
Referenced by AudioIO::GetBestRate().
int AudioIoCallback::mCallbackReturn |
Definition at line 181 of file AudioIO.h.
Referenced by AudioCallback(), DrainInputBuffers(), and FillOutputBuffers().
RingBuffers AudioIoCallback::mCaptureBuffers |
Definition at line 272 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 315 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 316 of file AudioIO.h.
Referenced by AudioIO::DrainRecordBuffers(), AudioIO::StartMonitoring(), and AudioIO::StartStream().
double AudioIoCallback::mCaptureRingBufferSecs |
Definition at line 295 of file AudioIO.h.
Referenced by AudioIO::AllocateBuffers().
RecordableSequences AudioIoCallback::mCaptureSequences |
Definition at line 273 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 388 of file AudioIO.h.
Referenced by DrainInputBuffers(), and AudioIO::StartStream().
std::atomic<bool> AudioIoCallback::mDetectUpstreamDropouts { true } |
Definition at line 400 of file AudioIO.h.
Referenced by DrainInputBuffers(), and anonymous_namespace{PluginMenus.cpp}::ToolsMenu().
double AudioIoCallback::mFactor |
Definition at line 288 of file AudioIO.h.
Referenced by AudioIO::AllocateBuffers(), and AudioIO::DrainRecordBuffers().
std::atomic<bool> AudioIoCallback::mFinishAudioThread { false } |
Definition at line 267 of file AudioIO.h.
Referenced by AudioIO::StartThread(), and AudioIO::~AudioIO().
std::atomic<bool> AudioIoCallback::mForceFadeOut { false } |
Definition at line 336 of file AudioIO.h.
Referenced by AddToOutputChannel(), AudioIO::StartStream(), and AudioIO::StopStream().
size_t AudioIoCallback::mHardwarePlaybackLatencyFrames {} |
Hardware output latency in frames.
Definition at line 300 of file AudioIO.h.
Referenced by AudioIO::AllocateBuffers(), and AudioIO::StartPortAudioStream().
PaError AudioIoCallback::mLastPaError |
Definition at line 342 of file AudioIO.h.
Referenced by AudioIO::AudioIO(), AudioIO::LastPaErrorString(), AudioIO::StartMonitoring(), and AudioIO::StartPortAudioStream().
wxLongLong AudioIoCallback::mLastPlaybackTimeMillis |
Definition at line 338 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 341 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 356 of file AudioIO.h.
Referenced by SetListener(), and AudioIO::StartStream().
|
protected |
Definition at line 386 of file AudioIO.h.
Referenced by DrainInputBuffers(), AudioIO::StartStream(), and AudioIO::StopStream().
unsigned long long AudioIoCallback::mLostSamples { 0 } |
Definition at line 317 of file AudioIO.h.
Referenced by DrainInputBuffers(), and AudioIO::StartStream().
unsigned long AudioIoCallback::mMaxFramesOutput |
Definition at line 289 of file AudioIO.h.
Referenced by FillOutputBuffers(), and UpdateTimePosition().
double AudioIoCallback::mMinCaptureSecsToCopy |
Definition at line 304 of file AudioIO.h.
Referenced by AudioIO::AllocateBuffers(), and AudioIO::DrainRecordBuffers().
std::atomic<float> AudioIoCallback::mMixerOutputVol { 1.0 } |
|
static |
Definition at line 287 of file AudioIO.h.
Referenced by AudioIO::StartStream().
size_t AudioIoCallback::mNumCaptureChannels |
Read by a worker thread but unchanging during playback
Definition at line 312 of file AudioIO.h.
Referenced by AudioIO::AllocateBuffers(), AudioCallback(), AudioIO::AudioIO(), CheckSoundActivatedRecordingLevel(), AudioIO::DelayingActions(), DoPlaythrough(), DrainInputBuffers(), AudioIO::DrainRecordBuffers(), FillOutputBuffers(), SendVuInputMeterData(), AudioIO::StartPortAudioStream(), AudioIO::StartStream(), and AudioIO::StopStream().
long AudioIoCallback::mNumPauseFrames |
How many frames of zeros were output due to pauses?
Definition at line 247 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 314 of file AudioIO.h.
Referenced by AddToOutputChannel(), AudioIO::AllocateBuffers(), AudioCallback(), DoPlaythrough(), DrainInputBuffers(), FillOutputBuffers(), AudioIO::FillPlayBuffers(), SendVuOutputMeterData(), AudioIO::StartPortAudioStream(), AudioIO::StartStream(), AudioIO::StopStream(), and AudioIO::TransformPlayBuffers().
std::vector<OldChannelGains> AudioIoCallback::mOldChannelGains |
Definition at line 279 of file AudioIO.h.
Referenced by AudioIO::AllocateBuffers(), AllSequencesAlreadySilent(), and FillOutputBuffers().
bool AudioIoCallback::mPauseRec |
True if Sound Activated Recording is enabled.
Read by a worker thread but unchanging during playback
Definition at line 309 of file AudioIO.h.
Referenced by CheckSoundActivatedRecordingLevel(), and AudioIO::StartStream().
RingBuffers AudioIoCallback::mPlaybackBuffers |
Read by worker threads but unchanging during playback
Definition at line 275 of file AudioIO.h.
Referenced by AudioIO::AllocateBuffers(), CallbackDoSeek(), FillOutputBuffers(), AudioIO::FillPlayBuffers(), AudioIO::GetCommonlyFreePlayback(), GetCommonlyReadyPlayback(), GetCommonlyWrittenForPlayback(), AudioIO::ProcessPlaybackSlices(), AudioIO::StartStream(), AudioIO::StartStreamCleanup(), AudioIO::StopStream(), and AudioIO::TransformPlayBuffers().
std::vector<std::unique_ptr<Mixer> > AudioIoCallback::mPlaybackMixers |
Definition at line 284 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 302 of file AudioIO.h.
Referenced by AudioIO::AllocateBuffers(), and AudioIO::FillPlayBuffers().
PlaybackPolicy::Duration AudioIoCallback::mPlaybackRingBufferSecs |
Definition at line 294 of file AudioIO.h.
Referenced by AudioIO::AllocateBuffers().
size_t AudioIoCallback::mPlaybackSamplesToCopy |
Preferred batch size for replenishing the playback RingBuffer.
Definition at line 298 of file AudioIO.h.
Referenced by AudioIO::AllocateBuffers(), and AudioIO::FillPlayBuffers().
|
protected |
Definition at line 404 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 276 of file AudioIO.h.
Referenced by AudioIO::AllocateBuffers(), AllSequencesAlreadySilent(), CountSoloingSequences(), FillOutputBuffers(), AudioIO::ProcessPlaybackSlices(), AudioIO::StartStream(), AudioIO::StopStream(), and AudioIO::TransformPlayBuffers().
|
protected |
Holds some state for duration of playback or recording.
Definition at line 408 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 380 of file AudioIO.h.
Referenced by AudioIO::DrainRecordBuffers().
|
protected |
Definition at line 403 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 269 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 281 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 282 of file AudioIO.h.
Referenced by AudioIO::AllocateBuffers(), AudioIO::StartStream(), AudioIO::StartStreamCleanup(), AudioIO::StopStream(), and AudioIO::TransformPlayBuffers().
double AudioIoCallback::mSeek |
Definition at line 293 of file AudioIO.h.
Referenced by CallbackDoSeek(), FillOutputBuffers(), and AudioIO::StartStream().
float AudioIoCallback::mSilenceLevel |
Definition at line 310 of file AudioIO.h.
Referenced by AudioIO::AudioIO(), CheckSoundActivatedRecordingLevel(), and AudioIO::StartStream().
bool AudioIoCallback::mSimulateRecordingErrors { false } |
Definition at line 396 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 306 of file AudioIO.h.
Referenced by DoPlaythrough(), AudioIO::StartMonitoring(), AudioIO::StartPortAudioStream(), and AudioIO::StartStream().
|
protected |
Definition at line 368 of file AudioIO.h.
Referenced by CallbackDoSeek(), and AudioIO::StopStream().
|
protected |
Definition at line 358 of file AudioIO.h.
Referenced by AudioIO::StartMonitoring(), AudioIO::StartPortAudioStream(), and AudioIO::StartStream().
|
protected |
Definition at line 359 of file AudioIO.h.
Referenced by AudioIO::StartPortAudioStream().