1 #ifndef TIMESTRETCHENGINE_H
2 #define TIMESTRETCHENGINE_H
8 class TimeStretchEngine
11 // scale = out length / in length
12 TimeStretchEngine(double scale
, int sample_rate
);
15 void overlay(double *out
, double *in
, int size
, int skirt
);
16 // Returns the number of samples in the output buffer
17 int process(double *in_buffer
, int in_size
);
18 // Return the output buffer
19 double* get_samples();
20 // Increment output buffer counters and shift output
21 void read_output(double *buffer
, int size
);
24 // ms length of average window
28 // Queer eye for the straight buffer
31 int output_allocation
;
33 // Sample at beginning of output buffer
34 int64_t output_sample
;
38 // Sample at beginning of input buffer