Browse Source

density - just use float on the interface, for now

usb_midi_launchpad
heck 6 months ago
parent
commit
fd635568a7
  1. 6
      src/density.cc
  2. 11
      src/density.hh

6
src/density.cc

@ -1,7 +1,11 @@
#include "density.hh"
namespace Heck {
void Density::process(const f32 *inSourceP, f32 *inDestP, u32 size)
namespace Constants {
constexpr Samplerate AUDIO_SAMPLERATE = Samplerate::SAI_48KHZ;
}
void Density::process(const float *inSourceP, float *inDestP, u32 size)
{
UInt32 nSampleFrames = size;
const Float32 *sourceP = inSourceP;

11
src/density.hh

@ -4,22 +4,17 @@
#include "types.hh"
#include <array>
namespace Heck::Constants {
constexpr Samplerate AUDIO_SAMPLERATE = Samplerate::SAI_48KHZ;
}
namespace Heck {
struct Density {
using Float32 = f32;
using Float64 = f64;
using UInt32 = u32;
static constexpr bool DO_DITHER{ false };
static constexpr bool DO_DITHER{ true };
std::array<f64, 4> params{ 0., 0., 1., 1. };
std::array<float, 4> params{ 0., 0., 1., 1. };
void process(const f32 * const inSourceP, f32 *inDestP, u32 size);
void process(const float *inSourceP, float *inDestP, u32 size);
private:
Float64 iirSampleA;

Loading…
Cancel
Save