Jamba C++ API 7.5.0
Loading...
Searching...
No Matches
AudioUtils.h File Reference
#include <pluginterfaces/vst/ivstaudioprocessor.h>
#include <cmath>
#include <type_traits>

Go to the source code of this file.

Namespaces

namespace  pongasoft
namespace  pongasoft::VST

Macros

#define BIT_CLEAR(a, b)
#define BIT_SET(a, b)
#define BIT_TEST(a, b)

Functions

template<typename T>
constexpr T bitClear (T a, int bit)
 Clears bit bit in a.
template<typename T>
constexpr T bitSet (T a, int bit)
 Sets bit bit in a.
template<typename T>
constexpr bool bitTest (T a, int bit)
 Test if bit bit is set in a.
template<typename SampleType>
SampleType dbToSample (double valueInDb)
template<typename SampleType>
SampleType getSampleSilentThreshold () noexcept
template<>
constexpr Sample32 getSampleSilentThreshold< Sample32 > () noexcept
template<>
constexpr Sample64 getSampleSilentThreshold< Sample64 > () noexcept
bool isSilent (Sample32 value)
bool isSilent (Sample64 value)
template<typename SampleType>
double sampleToDb (SampleType valueInSample)

Variables

constexpr Sample32 Sample32SilentThreshold = ((Sample32)2.0e-8)
constexpr Sample64 Sample64SilentThreshold = ((Sample64)2.0e-8)

Macro Definition Documentation

◆ BIT_CLEAR

#define BIT_CLEAR ( a,
b )
Value:
((a) &= ~(static_cast<std::make_unsigned_t<decltype(a)>>(1)<<(b)))

◆ BIT_SET

#define BIT_SET ( a,
b )
Value:
((a) |= (static_cast<std::make_unsigned_t<decltype(a)>>(1)<<(b)))

◆ BIT_TEST

#define BIT_TEST ( a,
b )
Value:
(((a) & (static_cast<std::make_unsigned_t<decltype(a)>>(1)<<(b))) != 0)