Audacity 3.2.0
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 50 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 57 of file PlaybackSchedule.h.

59 : frames{ std::min(available, frames_) }
60 , toProduce{ std::min(toProduce_, frames) }
61 {}
int min(int a, int b)
const size_t toProduce
Not more than frames; the difference will be trailing silence.
const size_t frames
Total number of frames to be buffered.

Member Data Documentation

◆ frames

const size_t PlaybackSlice::frames

Total number of frames to be buffered.

Definition at line 51 of file PlaybackSchedule.h.

Referenced by PlaybackSchedule::TimeQueue::Producer().

◆ toProduce

const size_t PlaybackSlice::toProduce

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

Definition at line 52 of file PlaybackSchedule.h.

Referenced by PlaybackSchedule::TimeQueue::Producer().


The documentation for this struct was generated from the following file: