Audacity  3.0.3
Public Member Functions | Private Attributes | Friends | List of all members
Mixer::WarpOptions Class Reference

#include <Mix.h>

Collaboration diagram for Mixer::WarpOptions:
[legend]

Public Member Functions

 WarpOptions (const TrackList &list)
 Construct with warp from the TimeTrack if there is one. More...
 
 WarpOptions (const BoundedEnvelope *e)
 Construct with an explicit warp. More...
 
 WarpOptions (double min, double max)
 Construct with no time warp. More...
 

Private Attributes

const BoundedEnvelopeenvelope = nullptr
 
double minSpeed
 
double maxSpeed
 

Friends

class Mixer
 

Detailed Description

Definition at line 82 of file Mix.h.

Constructor & Destructor Documentation

◆ WarpOptions() [1/3]

Mixer::WarpOptions::WarpOptions ( const TrackList list)
explicit

Construct with warp from the TimeTrack if there is one.

Definition at line 207 of file Mix.cpp.

208 : minSpeed(0.0), maxSpeed(0.0)
209 {
210  auto timeTrack = *(list.Any<const TimeTrack>().begin());
211  envelope = timeTrack ? timeTrack->GetEnvelope() : nullptr;
212 }

References TrackList::Any(), and envelope.

Here is the call graph for this function:

◆ WarpOptions() [2/3]

Mixer::WarpOptions::WarpOptions ( const BoundedEnvelope e)
explicit

Construct with an explicit warp.

Definition at line 214 of file Mix.cpp.

215  : envelope(e), minSpeed(0.0), maxSpeed(0.0)
216  {}

◆ WarpOptions() [3/3]

Mixer::WarpOptions::WarpOptions ( double  min,
double  max 
)

Construct with no time warp.

Definition at line 218 of file Mix.cpp.

219  : minSpeed(min), maxSpeed(max)
220 {
221  if (minSpeed < 0)
222  {
223  wxASSERT(false);
224  minSpeed = 0;
225  }
226  if (maxSpeed < 0)
227  {
228  wxASSERT(false);
229  maxSpeed = 0;
230  }
231  if (minSpeed > maxSpeed)
232  {
233  wxASSERT(false);
235  }
236 }

References maxSpeed, minSpeed, and anonymous_namespace{NoteTrack.cpp}::swap().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ Mixer

friend class Mixer
friend

Definition at line 95 of file Mix.h.

Member Data Documentation

◆ envelope

const BoundedEnvelope* Mixer::WarpOptions::envelope = nullptr
private

Definition at line 96 of file Mix.h.

Referenced by WarpOptions().

◆ maxSpeed

double Mixer::WarpOptions::maxSpeed
private

Definition at line 97 of file Mix.h.

Referenced by WarpOptions().

◆ minSpeed

double Mixer::WarpOptions::minSpeed
private

Definition at line 97 of file Mix.h.

Referenced by WarpOptions().


The documentation for this class was generated from the following files:
Mixer::WarpOptions::maxSpeed
double maxSpeed
Definition: Mix.h:97
Mixer::WarpOptions::minSpeed
double minSpeed
Definition: Mix.h:97
anonymous_namespace{NoteTrack.cpp}::swap
void swap(std::unique_ptr< Alg_seq > &a, std::unique_ptr< Alg_seq > &b)
Definition: NoteTrack.cpp:735
min
int min(int a, int b)
Definition: CompareAudioCommand.cpp:106
Mixer::WarpOptions::envelope
const BoundedEnvelope * envelope
Definition: Mix.h:96
TrackList::Any
auto Any() -> TrackIterRange< TrackType >
Definition: Track.h:1354
TimeTrack
A kind of Track used to 'warp time'.
Definition: TimeTrack.h:24