Audacity  3.0.3
Public Member Functions | Public Attributes | List of all members
PlaybackSlice Struct Reference

Describes an amount of contiguous (but maybe time-warped) data to be extracted from tracks to play. More...

#include <PlaybackSchedule.h>

Public Member Functions

 PlaybackSlice (size_t available, size_t frames_, size_t toProduce_)
 Constructor enforces some invariants. More...
 

Public Attributes

const size_t frames
 Total number of frames to be buffered. More...
 
const size_t toProduce
 Not more than frames; the difference will be trailing silence. More...
 

Detailed Description

Describes an amount of contiguous (but maybe time-warped) data to be extracted from tracks to play.

Definition at line 152 of file PlaybackSchedule.h.

Constructor & Destructor Documentation

◆ PlaybackSlice()

PlaybackSlice::PlaybackSlice ( size_t  available,
size_t  frames_,
size_t  toProduce_ 
)
inline

Constructor enforces some invariants.

Invariant
result.toProduce <= result.frames && result.frames <= available

Definition at line 159 of file PlaybackSchedule.h.

161  : frames{ std::min(available, frames_) }
162  , toProduce{ std::min(toProduce_, frames) }
163  {}

References min().

Here is the call graph for this function:

Member Data Documentation

◆ frames

const size_t PlaybackSlice::frames

Total number of frames to be buffered.

Definition at line 153 of file PlaybackSchedule.h.

◆ toProduce

const size_t PlaybackSlice::toProduce

Not more than frames; the difference will be trailing silence.

Definition at line 154 of file PlaybackSchedule.h.


The documentation for this struct was generated from the following file:
PlaybackSlice::toProduce
const size_t toProduce
Not more than frames; the difference will be trailing silence.
Definition: PlaybackSchedule.h:154
PlaybackSlice::frames
const size_t frames
Total number of frames to be buffered.
Definition: PlaybackSchedule.h:153
min
int min(int a, int b)
Definition: CompareAudioCommand.cpp:106