Rearange menu of mpegplayer. Add new menu with "settings" and "quit", and remove...
[kugel-rb.git] / apps / dsp.h
blobb2d8493445cb67e4cf5c4d18d32906a55f5c1653
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2005 Miika Pekkarinen
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
22 #ifndef _DSP_H
23 #define _DSP_H
25 #include <stdlib.h>
26 #include <stdbool.h>
28 #define NATIVE_FREQUENCY 44100
29 #define LIMITER_BUFFER_SIZE 288 /* ~6.5 ms */
30 #define MAX_LIMITER_GAIN 80 /* 8 dB */
31 enum
33 STEREO_INTERLEAVED = 0,
34 STEREO_NONINTERLEAVED,
35 STEREO_MONO,
36 STEREO_NUM_MODES,
39 enum
41 CODEC_IDX_AUDIO = 0,
42 CODEC_IDX_VOICE,
45 enum
47 DSP_MYDSP = 1,
48 DSP_SET_FREQUENCY,
49 DSP_SWITCH_FREQUENCY,
50 DSP_SET_SAMPLE_DEPTH,
51 DSP_SET_STEREO_MODE,
52 DSP_RESET,
53 DSP_FLUSH,
54 DSP_SET_TRACK_GAIN,
55 DSP_SET_ALBUM_GAIN,
56 DSP_SET_TRACK_PEAK,
57 DSP_SET_ALBUM_PEAK,
58 DSP_CROSSFEED
61 struct dsp_config;
63 int dsp_process(struct dsp_config *dsp, char *dest,
64 const char *src[], int count);
65 int dsp_input_count(struct dsp_config *dsp, int count);
66 int dsp_output_count(struct dsp_config *dsp, int count);
67 intptr_t dsp_configure(struct dsp_config *dsp, int setting,
68 intptr_t value);
69 void dsp_set_replaygain(void);
70 void dsp_set_crossfeed(bool enable);
71 void dsp_set_crossfeed_direct_gain(int gain);
72 void dsp_set_crossfeed_cross_params(long lf_gain, long hf_gain,
73 long cutoff);
74 void dsp_set_eq(bool enable);
75 void dsp_set_eq_precut(int precut);
76 void dsp_set_eq_coefs(int band);
77 void dsp_dither_enable(bool enable);
78 void dsp_timestretch_enable(bool enable);
79 bool dsp_timestretch_available(void);
80 void sound_set_pitch(int32_t r);
81 int32_t sound_get_pitch(void);
82 void dsp_set_timestretch(int32_t percent);
83 int32_t dsp_get_timestretch(void);
84 int dsp_callback(int msg, intptr_t param);
85 int dsp_flush_limiter_buffer(char *dest);
86 void dsp_set_limiter(int limiter_level);
88 #endif