Krotos Modules 3
Loading...
Searching...
No Matches
krotos::MuteValueGenerator Class Reference

#include <MuteValueGenerator.h>

Public Member Functions

void setMuteDirection (bool requestMute)
 Set mute direction.
 
bool isFullyMuted ()
 Query whether mute is fully muted or not.
 
void reset (float sampleRate, float rampLengthInSeconds)
 Reset to a new sample rate and ramp length.
 
bool calculateNextValue ()
 Calculate the next mute value.
 
float getValue ()
 Returns the current mute value.
 

Private Attributes

float m_muteValue {1.0f}
 
float m_muteDelta {0.001f}
 
bool m_requestMute {false}
 

Member Function Documentation

◆ calculateNextValue()

bool krotos::MuteValueGenerator::calculateNextValue ( )
inline

Calculate the next mute value.

Returns
Returns true if the value just arrived at zero

◆ getValue()

float krotos::MuteValueGenerator::getValue ( )
inline

Returns the current mute value.

Returns
The current mute value

◆ isFullyMuted()

bool krotos::MuteValueGenerator::isFullyMuted ( )
inline

Query whether mute is fully muted or not.

Parameters
Returnstrue for fully muted

◆ reset()

void krotos::MuteValueGenerator::reset ( float sampleRate,
float rampLengthInSeconds )
inline

Reset to a new sample rate and ramp length.

Parameters
sampleRateThe sample rate
rampLengthInSecondsThe duration of the ramp in seconds

◆ setMuteDirection()

void krotos::MuteValueGenerator::setMuteDirection ( bool requestMute)
inline

Set mute direction.

Parameters
Mutingif true, unmuting if false

Member Data Documentation

◆ m_muteDelta

float krotos::MuteValueGenerator::m_muteDelta {0.001f}
private

◆ m_muteValue

float krotos::MuteValueGenerator::m_muteValue {1.0f}
private

◆ m_requestMute

bool krotos::MuteValueGenerator::m_requestMute {false}
private

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