Audacity
3.0.3
|
#include <AudioIOBase.h>
Public Types | |
enum | { PLAY_STRAIGHT, PLAY_LOOPED } |
Public Member Functions | |
void | Init (double t0, double t1, const AudioIOStartStreamOptions &options, const RecordingSchedule *pRecordingSchedule) |
bool | ReversedTime () const |
True if the end time is before the start time. More... | |
double | GetTrackTime () const |
Get current track time value, unadjusted. More... | |
void | SetTrackTime (double time) |
Set current track time value, unadjusted. More... | |
double | ClampTrackTime (double trackTime) const |
Clamps argument to be between mT0 and mT1. More... | |
double | LimitTrackTime () const |
Clamps mTime to be between mT0 and mT1. More... | |
double | NormalizeTrackTime () const |
Normalizes mTime, clamping it and handling gaps from cut preview. More... | |
void | ResetMode () |
bool | PlayingStraight () const |
bool | Looping () const |
bool | Scrubbing () const |
bool | PlayingAtSpeed () const |
bool | Interactive () const |
bool | PassIsComplete () const |
bool | Overruns (double trackTime) const |
double | AdvancedTrackTime (double trackTime, double realElapsed, double speed) const |
void | TrackTimeUpdate (double realElapsed) |
double | RealDuration (double trackTime1) const |
double | RealTimeRemaining () const |
void | RealTimeAdvance (double increment) |
void | RealTimeInit (double trackTime) |
void | RealTimeRestart () |
Public Attributes | |
double | mT0 |
Playback starts at offset of mT0, which is measured in seconds. More... | |
double | mT1 |
Playback ends at offset of mT1, which is measured in seconds. Note that mT1 may be less than mT0 during scrubbing. More... | |
std::atomic< double > | mTime |
double | mWarpedTime |
double | mWarpedLength |
const BoundedEnvelope * | mEnvelope |
enum AudioIOBase::PlaybackSchedule:: { ... } | PLAY_STRAIGHT |
double | mCutPreviewGapStart |
double | mCutPreviewGapLen |
Definition at line 328 of file AudioIOBase.h.
anonymous enum |
double AudioIOBase::PlaybackSchedule::AdvancedTrackTime | ( | double | trackTime, |
double | realElapsed, | ||
double | speed | ||
) | const |
Definition at line 1237 of file AudioIOBase.cpp.
References anonymous_namespace{AudioIOBase.cpp}::ComputeWarpedLength(), and anonymous_namespace{AudioIOBase.cpp}::SolveWarpedLength().
Referenced by AudioIoCallback::TimeQueue::Producer().
double AudioIOBase::PlaybackSchedule::ClampTrackTime | ( | double | trackTime | ) | const |
Clamps argument to be between mT0 and mT1.
Returns the bound if the value is out of bounds; does not wrap. Returns a time in seconds.
Definition at line 457 of file AudioIOBase.cpp.
References min().
Referenced by AudioIoCallback::CallbackDoSeek(), and AudioIO::StartStream().
|
inline |
Get current track time value, unadjusted.
Returns a time in seconds.
Definition at line 386 of file AudioIOBase.h.
Referenced by AudioIoCallback::CallbackDoSeek(), AudioIoCallback::FillInputBuffers(), AudioIO::IsCapturing(), and AudioIO::StartStream().
void AudioIOBase::PlaybackSchedule::Init | ( | double | t0, |
double | t1, | ||
const AudioIOStartStreamOptions & | options, | ||
const RecordingSchedule * | pRecordingSchedule | ||
) |
Definition at line 382 of file AudioIOBase.cpp.
References AudioIOStartStreamOptions::cutPreviewGapLen, AudioIOStartStreamOptions::cutPreviewGapStart, AudioIOStartStreamOptions::envelope, Looping(), mCutPreviewGapLen, mCutPreviewGapStart, mEnvelope, ScrubbingOptions::MinAllowedScrubSpeed(), AudioIOBase::RecordingSchedule::mLatencyCorrection, AudioIOBase::RecordingSchedule::mPreRoll, mT0, mT1, mWarpedLength, mWarpedTime, PLAY_LOOPED, PLAY_STRAIGHT, AudioIOStartStreamOptions::playLooped, RealDuration(), Scrubbing(), and SetTrackTime().
Referenced by AudioIO::StartStream().
|
inline |
Definition at line 421 of file AudioIOBase.h.
Referenced by AudioThread::Entry(), AudioIO::FillBuffers(), AudioIoCallback::FillOutputBuffers(), AudioIO::StartStream(), and AudioIoCallback::UpdateTimePosition().
double AudioIOBase::PlaybackSchedule::LimitTrackTime | ( | ) | const |
Clamps mTime to be between mT0 and mT1.
Returns the bound if the value is out of bounds; does not wrap. Returns a time in seconds.
Definition at line 450 of file AudioIOBase.cpp.
|
inline |
Definition at line 418 of file AudioIOBase.h.
Referenced by AudioIO::FillBuffers(), and Init().
double AudioIOBase::PlaybackSchedule::NormalizeTrackTime | ( | ) | const |
Normalizes mTime, clamping it and handling gaps from cut preview.
Clamps the time (unless scrubbing), and skips over the cut section. Returns a time in seconds.
Definition at line 465 of file AudioIOBase.cpp.
Referenced by AudioIOBase::GetStreamTime().
bool AudioIOBase::PlaybackSchedule::Overruns | ( | double | trackTime | ) | const |
Definition at line 1203 of file AudioIOBase.cpp.
bool AudioIOBase::PlaybackSchedule::PassIsComplete | ( | ) | const |
Definition at line 1195 of file AudioIOBase.cpp.
Referenced by AudioIoCallback::CallbackCheckCompletion(), and AudioIoCallback::FillInputBuffers().
|
inline |
Definition at line 420 of file AudioIOBase.h.
Referenced by AudioIoCallback::CallbackCheckCompletion().
|
inline |
Definition at line 417 of file AudioIOBase.h.
Referenced by AudioIoCallback::CallbackCheckCompletion(), and AudioIO::FillBuffers().
double AudioIOBase::PlaybackSchedule::RealDuration | ( | double | trackTime1 | ) | const |
Definition at line 1307 of file AudioIOBase.cpp.
References anonymous_namespace{AudioIOBase.cpp}::ComputeWarpedLength().
Referenced by Init().
void AudioIOBase::PlaybackSchedule::RealTimeAdvance | ( | double | increment | ) |
Definition at line 1322 of file AudioIOBase.cpp.
Referenced by AudioIO::FillBuffers().
void AudioIOBase::PlaybackSchedule::RealTimeInit | ( | double | trackTime | ) |
Definition at line 1327 of file AudioIOBase.cpp.
Referenced by AudioIoCallback::CallbackDoSeek(), and AudioIO::StartStream().
double AudioIOBase::PlaybackSchedule::RealTimeRemaining | ( | ) | const |
Definition at line 1317 of file AudioIOBase.cpp.
Referenced by AudioIO::FillBuffers().
void AudioIOBase::PlaybackSchedule::RealTimeRestart | ( | ) |
Definition at line 1335 of file AudioIOBase.cpp.
Referenced by AudioIO::FillBuffers().
|
inline |
Definition at line 415 of file AudioIOBase.h.
Referenced by AudioIO::StartStream(), and AudioIO::StopStream().
|
inline |
True if the end time is before the start time.
Definition at line 377 of file AudioIOBase.h.
|
inline |
Definition at line 419 of file AudioIOBase.h.
Referenced by Init().
|
inline |
Set current track time value, unadjusted.
Definition at line 391 of file AudioIOBase.h.
Referenced by AudioIoCallback::CallbackDoSeek(), Init(), AudioIO::StartStream(), and AudioIoCallback::UpdateTimePosition().
void AudioIOBase::PlaybackSchedule::TrackTimeUpdate | ( | double | realElapsed | ) |
Definition at line 1295 of file AudioIOBase.cpp.
Referenced by AudioIoCallback::UpdateTimePosition().
double AudioIOBase::PlaybackSchedule::mCutPreviewGapLen |
Definition at line 369 of file AudioIOBase.h.
Referenced by Init().
double AudioIOBase::PlaybackSchedule::mCutPreviewGapStart |
Definition at line 368 of file AudioIOBase.h.
Referenced by Init().
const BoundedEnvelope* AudioIOBase::PlaybackSchedule::mEnvelope |
Definition at line 357 of file AudioIOBase.h.
Referenced by AudioIO::AllocateBuffers(), and Init().
double AudioIOBase::PlaybackSchedule::mT0 |
Playback starts at offset of mT0, which is measured in seconds.
Definition at line 330 of file AudioIOBase.h.
Referenced by AudioIO::AllocateBuffers(), AudioIoCallback::ComputeMidiTimings(), Init(), AudioIO::IsCapturing(), and AudioIO::StartStream().
double AudioIOBase::PlaybackSchedule::mT1 |
Playback ends at offset of mT1, which is measured in seconds. Note that mT1 may be less than mT0 during scrubbing.
Definition at line 332 of file AudioIOBase.h.
Referenced by Init().
std::atomic<double> AudioIOBase::PlaybackSchedule::mTime |
Current track time position during playback, in seconds. Initialized by the main thread but updated by worker threads during playback or recording, and periodically reread by the main thread for purposes such as display update.
Definition at line 337 of file AudioIOBase.h.
double AudioIOBase::PlaybackSchedule::mWarpedLength |
Real length to be played (if looping, for each pass) after warping via a time track, computed just once when starting the stream. Length in real seconds between mT0 and mT1. Always positive.
Definition at line 347 of file AudioIOBase.h.
Referenced by Init().
double AudioIOBase::PlaybackSchedule::mWarpedTime |
Accumulated real time (not track position), starting at zero (unlike mTime), and wrapping back to zero each time around looping play. Thus, it is the length in real seconds between mT0 and mTime.
Definition at line 342 of file AudioIOBase.h.
Referenced by AudioIO::FillBuffers(), and Init().
enum { ... } AudioIOBase::PlaybackSchedule::PLAY_STRAIGHT |
Referenced by Init().