diff options
Diffstat (limited to 'apps/dsp.c')
-rw-r--r-- | apps/dsp.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/apps/dsp.c b/apps/dsp.c index 496e333bc5..a68b8615f8 100644 --- a/apps/dsp.c +++ b/apps/dsp.c | |||
@@ -161,7 +161,6 @@ struct dsp_config | |||
161 | int sample_depth; | 161 | int sample_depth; |
162 | int sample_bytes; | 162 | int sample_bytes; |
163 | int stereo_mode; | 163 | int stereo_mode; |
164 | bool tdspeed_enabled; /* User has enabled timestretch */ | ||
165 | int tdspeed_percent; /* Speed % */ | 164 | int tdspeed_percent; /* Speed % */ |
166 | bool tdspeed_active; /* Timestretch is in use */ | 165 | bool tdspeed_active; /* Timestretch is in use */ |
167 | int frac_bits; | 166 | int frac_bits; |
@@ -266,12 +265,12 @@ void sound_set_pitch(int permille) | |||
266 | AUDIO_DSP.codec_frequency); | 265 | AUDIO_DSP.codec_frequency); |
267 | } | 266 | } |
268 | 267 | ||
269 | void tdspeed_setup(struct dsp_config *dspc) | 268 | static void tdspeed_setup(struct dsp_config *dspc) |
270 | { | 269 | { |
271 | dspc->tdspeed_active = false; | 270 | dspc->tdspeed_active = false; |
272 | if (dspc == &AUDIO_DSP) | 271 | if (dspc == &AUDIO_DSP) |
273 | { | 272 | { |
274 | if (!dspc->tdspeed_enabled) | 273 | if(!dsp_timestretch_enabled()) |
275 | return; | 274 | return; |
276 | if (dspc->tdspeed_percent == 0) | 275 | if (dspc->tdspeed_percent == 0) |
277 | dspc->tdspeed_percent = 100; | 276 | dspc->tdspeed_percent = 100; |
@@ -304,7 +303,7 @@ void dsp_timestretch_enable(bool enable) | |||
304 | if (big_sample_buf_count < 0) | 303 | if (big_sample_buf_count < 0) |
305 | big_sample_buf_count = 0; | 304 | big_sample_buf_count = 0; |
306 | } | 305 | } |
307 | AUDIO_DSP.tdspeed_enabled = enable; | 306 | global_settings.timestretch_enabled = enable; |
308 | tdspeed_setup(&AUDIO_DSP); | 307 | tdspeed_setup(&AUDIO_DSP); |
309 | } | 308 | } |
310 | 309 | ||
@@ -321,7 +320,7 @@ int dsp_get_timestretch() | |||
321 | 320 | ||
322 | bool dsp_timestretch_enabled() | 321 | bool dsp_timestretch_enabled() |
323 | { | 322 | { |
324 | return (AUDIO_DSP.tdspeed_enabled && big_sample_buf_count > 0); | 323 | return (global_settings.timestretch_enabled && big_sample_buf_count > 0); |
325 | } | 324 | } |
326 | 325 | ||
327 | /* Convert count samples to the internal format, if needed. Updates src | 326 | /* Convert count samples to the internal format, if needed. Updates src |