TracktionEngine
Loading...
Searching...
No Matches
tracktion_AudioUtilities.h File Reference

Classes

class  engine::AudioMidiFifo
class  engine::AudioBufferSnapshot
struct  juce::VariantConverter< tracktion::engine::ResamplingQuality >

Namespaces

namespace  engine
namespace  juce

Typedefs

using engine::SampleCount = int64_t
using engine::SampleRange = juce::Range<SampleCount>

Enumerations

enum class  engine::ResamplingQuality { engine::lagrange , engine::sincFast , engine::sincMedium , engine::sincBest }
 Specifies a number of resampling qualities that can be used. More...
enum  engine::PanLaw {
  engine::PanLawDefault = -1 , engine::PanLawLinear = 0 , engine::PanLaw2point5dBCenter = 1 , engine::PanLaw3dBCenter = 2 ,
  engine::PanLaw4point5dBCenter = 3 , engine::PanLaw6dBCenter = 4
}
 All laws have been designed to be equal-power, excluding linear respectively. More...

Functions

float engine::dbToGain (float db) noexcept
float engine::gainToDb (float gain) noexcept
juce::String engine::gainToDbString (float gain, float infLevel=-96.0f, int decPlaces=2)
float engine::dbStringToDb (const juce::String &dbStr)
float engine::dbStringToGain (const juce::String &dbStr)
juce::String engine::getPanString (float pan)
juce::String engine::getSemitonesAsString (double semitones)
template<typename FloatType>
FloatType engine::midiNoteToFrequency (FloatType midiNote)
template<typename FloatType>
FloatType engine::frequencyToMidiNote (FloatType freq)
void engine::sanitiseValues (juce::AudioBuffer< float > &, int startSample, int numSamples, float maxAbsValue, float minAbsThreshold=1.0f/262144.0f)
void engine::addAntiDenormalisationNoise (juce::AudioBuffer< float > &, int start, int numSamples) noexcept
void engine::resetFP () noexcept
bool engine::hasFloatingPointDenormaliseOccurred () noexcept
void engine::zeroDenormalisedValuesIfNeeded (juce::AudioBuffer< float > &) noexcept
bool engine::isAudioDataAlmostSilent (const float *data, int num)
float engine::getAudioDataMagnitude (const float *data, int num)
void engine::convertIntsToFloats (juce::AudioBuffer< float > &)
void engine::convertFloatsToInts (juce::AudioBuffer< float > &)
template<typename SampleType>
choc::buffer::BufferView< SampleType, choc::buffer::SeparateChannelLayout > engine::toBufferView (juce::AudioBuffer< SampleType > &buffer)
 Converts a juce::AudioBuffer<SampleType> to a choc::buffer::BufferView.
template<typename SampleType>
SampleType engine::getRMS (choc::buffer::MonoView< SampleType >)
 Returns the RMS of a single channel buffer.
PanLaw engine::getDefaultPanLaw () noexcept
void engine::setDefaultPanLaw (PanLaw)
juce::StringArray engine::getPanLawChoices (bool includeDefault) noexcept
float engine::decibelsToVolumeFaderPosition (float dB) noexcept
float engine::volumeFaderPositionToDB (float position) noexcept
float engine::volumeFaderPositionToGain (float position) noexcept
float engine::gainToVolumeFaderPosition (float gain) noexcept
void engine::getGainsFromVolumeFaderPositionAndPan (float volSliderPos, float pan, PanLaw lawToUse, float &leftGain, float &rightGain) noexcept
void engine::clearChannels (juce::AudioBuffer< float > &buffer, int startChannel, int endChannel=-1, int startSample=0, int endSample=-1)