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 80 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 206 of file Mix.cpp.

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

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 213 of file Mix.cpp.

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

◆ WarpOptions() [3/3]

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

Construct with no time warp.

Definition at line 217 of file Mix.cpp.

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

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 93 of file Mix.h.

Member Data Documentation

◆ envelope

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

Definition at line 94 of file Mix.h.

Referenced by WarpOptions().

◆ maxSpeed

double Mixer::WarpOptions::maxSpeed
private

Definition at line 95 of file Mix.h.

Referenced by WarpOptions().

◆ minSpeed

double Mixer::WarpOptions::minSpeed
private

Definition at line 95 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:95
Mixer::WarpOptions::minSpeed
double minSpeed
Definition: Mix.h:95
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:94
TrackList::Any
auto Any() -> TrackIterRange< TrackType >
Definition: Track.h:1371
TimeTrack
A kind of Track used to 'warp time'.
Definition: TimeTrack.h:24