Browse Source

samplerate and convolver cleanup

tags/v0.6.2
Andrew Belt 6 years ago
parent
commit
7004502ed9
4 changed files with 15 additions and 2 deletions
  1. +3
    -1
      README.md
  2. +1
    -1
      include/dsp/fir.hpp
  3. +1
    -0
      include/dsp/samplerate.hpp
  4. +10
    -0
      include/util/math.hpp

+ 3
- 1
README.md View File

@@ -17,7 +17,9 @@ I rarely accept code contributions to Rack itself, so please notify me in advanc

## Setting up your development environment

Rack's dependencies (GLEW, glfw, etc) do not need to be installed on your system, since specific versions are compiled locally during the build process. However, you need proper tools to build these dependencies.
Before building Rack, you must install build dependencies provided by your system's package manager.
Rack's own dependencies (GLEW, glfw, etc) do not need to be installed on your system, since specific versions are compiled locally during the build process.
However, you need proper tools to build Rack and these dependencies.

### Mac



+ 1
- 1
include/dsp/fir.hpp View File

@@ -102,7 +102,7 @@ struct RealTimeConvolver {
}

/** Applies reverb to input
input and output must be size blockSize
input and output must be of size `blockSize`
*/
void processBlock(const float *input, float *output) {
if (kernelBlocks == 0) {


+ 1
- 0
include/dsp/samplerate.hpp View File

@@ -34,6 +34,7 @@ struct SampleRateConverter {
refreshState();
}

/** From 0 (worst, fastest) to 10 (best, slowest) */
void setQuality(int quality) {
if (quality == this->quality)
return;


+ 10
- 0
include/util/math.hpp View File

@@ -18,6 +18,16 @@ namespace rack {
// basic integer functions
////////////////////

/** Returns true if x is odd */
inline bool isOdd(int x) {
return x % 2 != 0;
}

/** Returns true if x is odd */
inline bool isEven(int x) {
return x % 2 == 0;
}

/** Returns the minimum of `a` and `b` */
inline int min(int a, int b) {
return (a < b) ? a : b;


Loading…
Cancel
Save