r1009: Move the dependencies to newer package names
[cinelerra_cv/mob.git] / plugins / timestretch / timestretchengine.h
blob0bcbc3a10a1547ad4e21314153f05406ea528a4e
1 #ifndef TIMESTRETCHENGINE_H
2 #define TIMESTRETCHENGINE_H
5 #include <stdint.h>
8 class TimeStretchEngine
10 public:
11 // scale = out length / in length
12 TimeStretchEngine(double scale, int sample_rate);
13 ~TimeStretchEngine();
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);
23 private:
24 // ms length of average window
25 int window_time;
26 int sample_rate;
27 int window_size;
28 // Queer eye for the straight buffer
29 int window_skirt;
30 double *output;
31 int output_allocation;
32 int output_size;
33 // Sample at beginning of output buffer
34 int64_t output_sample;
35 double *input;
36 int input_allocation;
37 int input_size;
38 // Sample at beginning of input buffer
39 int64_t input_sample;
40 double scale;
47 #endif