20 #include <pluginterfaces/vst/ivstaudioprocessor.h> 27 using namespace Steinberg;
28 using namespace Steinberg::Vst;
30 #define BIT_SET(a,b) ((a) |= (static_cast<uint64>(1)<<(b))) 31 #define BIT_CLEAR(a,b) ((a) &= ~(static_cast<uint64>(1)<<(b))) 32 #define BIT_TEST(a,b) (((a) & (static_cast<uint64>(1)<<(b))) != 0) 36 constexpr T
bitSet(T a,
int bit) {
return a | (static_cast<uint64>(1) << bit); }
40 constexpr T
bitClear(T a,
int bit) {
return a & ~(static_cast<uint64>(1) << bit); }
44 constexpr
bool bitTest(T a,
int bit) {
return (a & (static_cast<uint64>(1) << bit)) != 0; }
51 template<
typename SampleType>
81 template<
typename SampleType>
84 return static_cast<SampleType>(std::pow(10.0, valueInDb / 20.0));
90 template<
typename SampleType>
93 return std::log10(valueInSample) * 20.0;
SampleType dbToSample(double valueInDb)
Definition: AudioUtils.h:82
constexpr Sample64 getSampleSilentThreshold< Sample64 >() noexcept
Definition: AudioUtils.h:56
SampleType getSampleSilentThreshold() noexcept
bool isSilent(Sample32 value)
Definition: AudioUtils.h:61
constexpr Sample32 Sample32SilentThreshold
Definition: AudioUtils.h:47
constexpr T bitSet(T a, int bit)
Sets bit bit in a
Definition: AudioUtils.h:36
constexpr Sample64 Sample64SilentThreshold
Definition: AudioUtils.h:48
double sampleToDb(SampleType valueInSample)
Definition: AudioUtils.h:91
constexpr T bitClear(T a, int bit)
Clears bit bit in a
Definition: AudioUtils.h:40
constexpr bool bitTest(T a, int bit)
Test if bit bit is set in a
Definition: AudioUtils.h:44