tracktion-engine 3.0-10-g034fdde4aa5
Tracktion Engine — High level data model for audio applications

« « « Anklang Documentation
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
tracktion::engine::AudioFadeCurve::CrossfadeLevels Struct Reference

Calculates the two gain multipliers to use for mixing between two sources, given a position alpha from 0 to 1.0. More...

#include "tracktion_AudioFadeCurve.h"

Public Member Functions

 CrossfadeLevels (float alpha) noexcept
 Creates the object and calculates the two gain levels.
 

Public Attributes

float gain1
 
float gain2
 

Detailed Description

Calculates the two gain multipliers to use for mixing between two sources, given a position alpha from 0 to 1.0.

An alpha of 0 will produce gain1 = 1, gain2 = 0. An alpha of 1.0 will produce the opposite, and in-between, the levels will be calculated based on a pair of convex sine curves.

Definition at line 121 of file tracktion_AudioFadeCurve.h.

Constructor & Destructor Documentation

◆ CrossfadeLevels()

tracktion::engine::AudioFadeCurve::CrossfadeLevels::CrossfadeLevels ( float  alpha)
noexcept

Creates the object and calculates the two gain levels.

An alpha of 0 will produce gain1 = 1 and gain2 = 0. An alpha of 1.0 will produce the opposite, and alpha values in-between will be calculated based on a pair of overlapping convex sine curves.

Definition at line 127 of file tracktion_AudioFadeCurve.h.

Member Data Documentation

◆ gain1

float tracktion::engine::AudioFadeCurve::CrossfadeLevels::gain1

Definition at line 133 of file tracktion_AudioFadeCurve.h.

◆ gain2

float tracktion::engine::AudioFadeCurve::CrossfadeLevels::gain2

Definition at line 133 of file tracktion_AudioFadeCurve.h.


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