summaryrefslogtreecommitdiff
path: root/plugins/ZamSFZ/Sfz.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/ZamSFZ/Sfz.hpp')
-rw-r--r--plugins/ZamSFZ/Sfz.hpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/ZamSFZ/Sfz.hpp b/plugins/ZamSFZ/Sfz.hpp
index 5566495..3240310 100644
--- a/plugins/ZamSFZ/Sfz.hpp
+++ b/plugins/ZamSFZ/Sfz.hpp
@@ -5,9 +5,12 @@
#include "libsfz/sfz.h"
#include <rubberband/RubberBandStretcher.h>
#include <sndfile.h>
+#include <samplerate.h>
#include <math.h>
#define MAX_LAYERS 12
#define MAX_SAMPLES 130000
+#define BLOCK_SIZE 512
+#define CONVERTER_TYPE SRC_SINC_BEST_QUALITY
class Sfz {
@@ -30,8 +33,9 @@ public:
layer_t layers[128];
void clearsamples();
- void loadsamples(std::string path, std::string filename);
+ void loadsamples(std::string path, std::string filename, int target_rate);
void readsamples (SNDFILE *infile, int channels, int note, int layer);
+ void readsamples_resample (SNDFILE *infile, SF_INFO *sfinfo, int note, int layer, int target_rate);
void pitchshiftsamples(int srate);
void remapvelocityranges(::sfz::Instrument *inst);
};