diff options
Diffstat (limited to 'lib/rbcodec/dsp/tdspeed.h')
-rw-r--r-- | lib/rbcodec/dsp/tdspeed.h | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/lib/rbcodec/dsp/tdspeed.h b/lib/rbcodec/dsp/tdspeed.h index e91eeb1701..ca8a7846a4 100644 --- a/lib/rbcodec/dsp/tdspeed.h +++ b/lib/rbcodec/dsp/tdspeed.h | |||
@@ -23,12 +23,8 @@ | |||
23 | #ifndef _TDSPEED_H | 23 | #ifndef _TDSPEED_H |
24 | #define _TDSPEED_H | 24 | #define _TDSPEED_H |
25 | 25 | ||
26 | #include "dsp.h" | 26 | /* some #define functions to get the pitch, stretch and speed values based |
27 | 27 | * upon two known values. Remember that params are alphabetical. */ | |
28 | #define TDSPEED_OUTBUFSIZE 4096 | ||
29 | |||
30 | /* some #define functions to get the pitch, stretch and speed values based on */ | ||
31 | /* two known values. Remember that params are alphabetical. */ | ||
32 | #define GET_SPEED(pitch, stretch) \ | 28 | #define GET_SPEED(pitch, stretch) \ |
33 | ((pitch * stretch + PITCH_SPEED_100 / 2L) / PITCH_SPEED_100) | 29 | ((pitch * stretch + PITCH_SPEED_100 / 2L) / PITCH_SPEED_100) |
34 | #define GET_PITCH(speed, stretch) \ | 30 | #define GET_PITCH(speed, stretch) \ |
@@ -36,14 +32,12 @@ | |||
36 | #define GET_STRETCH(pitch, speed) \ | 32 | #define GET_STRETCH(pitch, speed) \ |
37 | ((speed * PITCH_SPEED_100 + pitch / 2L) / pitch) | 33 | ((speed * PITCH_SPEED_100 + pitch / 2L) / pitch) |
38 | 34 | ||
39 | void tdspeed_init(void); | ||
40 | void tdspeed_finish(void); | ||
41 | bool tdspeed_config(int samplerate, bool stereo, int32_t factor); | ||
42 | long tdspeed_est_output_size(void); | ||
43 | long tdspeed_est_input_size(long size); | ||
44 | int tdspeed_doit(int32_t *src[], int count); | ||
45 | |||
46 | #define STRETCH_MAX (250L * PITCH_SPEED_PRECISION) /* 250% */ | 35 | #define STRETCH_MAX (250L * PITCH_SPEED_PRECISION) /* 250% */ |
47 | #define STRETCH_MIN (35L * PITCH_SPEED_PRECISION) /* 35% */ | 36 | #define STRETCH_MIN (35L * PITCH_SPEED_PRECISION) /* 35% */ |
48 | 37 | ||
49 | #endif | 38 | void dsp_timestretch_enable(bool enable); |
39 | void dsp_set_timestretch(int32_t percent); | ||
40 | int32_t dsp_get_timestretch(void); | ||
41 | bool dsp_timestretch_available(void); | ||
42 | |||
43 | #endif /* _TDSPEED_H */ | ||