blob: cec951c841bb0b8c3a24de0af2e8352dae3c973e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#include <math.h>
#include <samplerate.h>
#include "ardour/types.h"
#ifndef __interpolation_h__
#define __interpolation_h__
namespace ARDOUR {
class LibSamplerateInterpolation {
protected:
double _speed;
std::vector<SRC_STATE*> state;
std::vector<SRC_DATA*> data;
int error;
void reset_state ();
public:
LibSamplerateInterpolation ();
~LibSamplerateInterpolation ();
void set_speed (double new_speed);
void set_target_speed (double new_speed) {}
double speed () const { return _speed; }
void add_channel_to (int input_buffer_size, int output_buffer_size);
void remove_channel_from ();
nframes_t interpolate (int channel, nframes_t nframes, Sample* input, Sample* output);
};
} // namespace ARDOUR
#endif
|