Switchboard SDK
|
Calculates and applies ducking based on configuration. More...
#include <DuckingManager.hpp>
Public Member Functions | |
DuckingManager () | |
DuckingManager constructor. | |
~DuckingManager () | |
DuckingManager destructor. | |
uint | getDuckingSignalCount () const |
Returns the number of ducking signals. | |
void | setNumberOfDuckingSignals (const uint numberOfDuckingSignals) |
Sets the number of ducking signals. | |
void | triggerDucking (const uint duckingSignalIndex=0) |
Triggers ducking for a ducking signal. | |
void | process (const uint sampleRate, const uint numberOfFrames, float *musicAudioBuffer) |
Processes and applies ducking for the music audio buffer. | |
float | getDuckingAmount (const uint duckingSignalIndex) const |
Gets the ducking amount for a ducking signal. Returned value is between 0 and 1. | |
void | setDuckingAmount (const float newDuckingAmount, const uint duckingSignalIndex) |
Sets the ducking amount for a ducking signal. The provided value has to be between 0 and 1. | |
float | getDuckReleaseAmount () const |
Returns the ducking release amount. When the ducking threshold is not exceeded, the ducking amount value will be increased by this value. Default value: 0.5 dB. | |
void | setDuckReleaseAmount (const float newDuckReleaseAmount) |
Sets the ducking release amount. When the ducking threshold is not exceeded, the ducking amount value will be increased by this value. Default value: 0.5 dB. | |
float | getDuckReleaseSeconds () const |
void | setDuckReleaseSeconds (const float duckReleaseSeconds) |
float | getNumSecondsToHoldDucking () const |
Returns the number of seconds to hold ducking value. When ducking stops being triggered, ducking will still be held for this many seconds. Default value: 2.0 secs. | |
void | setNumSecondsToHoldDucking (const float numSecondsToHoldDucking) |
Sets the number of seconds to hold ducking value. | |
DuckingManagerDelegate * | getDelegate () const |
Gets the current ducking delegate. Can be null. | |
void | setDelegate (DuckingManagerDelegate *delegate) |
Sets the ducking delegate. | |
DuckingCompressor * | getCompressor () const |
Gets the compressor. | |
void | setCompressor (DuckingCompressor *compressor) |
Sets the compressor. | |
std::map< std::string, std::string > | getState () |
Returns the internal state of the DuckingManager for diagnostics purposes. | |
Calculates and applies ducking based on configuration.
DuckingManager class.
DuckingCompressor * switchboard::DuckingManager::getCompressor | ( | ) | const |
Gets the compressor.
DuckingManagerDelegate * switchboard::DuckingManager::getDelegate | ( | ) | const |
Gets the current ducking delegate. Can be null.
float switchboard::DuckingManager::getDuckingAmount | ( | const uint | duckingSignalIndex | ) | const |
Gets the ducking amount for a ducking signal. Returned value is between 0 and 1.
duckingSignalIndex | The index of the ducking signal. |
uint switchboard::DuckingManager::getDuckingSignalCount | ( | ) | const |
Returns the number of ducking signals.
float switchboard::DuckingManager::getDuckReleaseAmount | ( | ) | const |
Returns the ducking release amount. When the ducking threshold is not exceeded, the ducking amount value will be increased by this value. Default value: 0.5 dB.
float switchboard::DuckingManager::getNumSecondsToHoldDucking | ( | ) | const |
Returns the number of seconds to hold ducking value. When ducking stops being triggered, ducking will still be held for this many seconds. Default value: 2.0 secs.
std::map< std::string, std::string > switchboard::DuckingManager::getState | ( | ) |
Returns the internal state of the DuckingManager for diagnostics purposes.
void switchboard::DuckingManager::process | ( | const uint | sampleRate, |
const uint | numberOfFrames, | ||
float * | musicAudioBuffer ) |
Processes and applies ducking for the music audio buffer.
sampleRate | the sampleRate of the data to be ducked |
numberOfFrames | the number of frames in each input buffer. |
musicAudioBuffer | The music audio buffer that will be ducked. Must be a stereo interleaved buffer. Can be nullptr if ducking is only used via the delegate. |
void switchboard::DuckingManager::setCompressor | ( | DuckingCompressor * | compressor | ) |
Sets the compressor.
compressor | The new compressor instance. Can be null. |
void switchboard::DuckingManager::setDelegate | ( | DuckingManagerDelegate * | delegate | ) |
Sets the ducking delegate.
delegate | The new ducking delegate instance. Can be null. |
void switchboard::DuckingManager::setDuckingAmount | ( | const float | newDuckingAmount, |
const uint | duckingSignalIndex ) |
Sets the ducking amount for a ducking signal. The provided value has to be between 0 and 1.
newDuckingAmount | The new amount. |
duckingSignalIndex | The index of the ducking signal. |
void switchboard::DuckingManager::setDuckReleaseAmount | ( | const float | newDuckReleaseAmount | ) |
Sets the ducking release amount. When the ducking threshold is not exceeded, the ducking amount value will be increased by this value. Default value: 0.5 dB.
newDuckReleaseAmount | The new value. |
void switchboard::DuckingManager::setNumberOfDuckingSignals | ( | const uint | numberOfDuckingSignals | ) |
Sets the number of ducking signals.
numberOfDuckingSignals | The new number of ducking signals. |
void switchboard::DuckingManager::setNumSecondsToHoldDucking | ( | const float | numSecondsToHoldDucking | ) |
Sets the number of seconds to hold ducking value.
numSecondsToHoldDucking | The new value. |
void switchboard::DuckingManager::triggerDucking | ( | const uint | duckingSignalIndex = 0 | ) |
Triggers ducking for a ducking signal.
duckingSignalIndex | The index of the ducking signal that is triggering ducking. |