2005-06-26 19:41:29 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* __________ __ ___.
|
|
|
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
* \/ \/ \/ \/ \/
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
* Copyright (C) 2005 Miika Pekkarinen
|
|
|
|
*
|
2008-06-28 18:10:04 +00:00
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
2005-06-26 19:41:29 +00:00
|
|
|
*
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#ifndef _DSP_H
|
|
|
|
#define _DSP_H
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdbool.h>
|
|
|
|
|
|
|
|
#define NATIVE_FREQUENCY 44100
|
2009-09-25 15:46:38 +00:00
|
|
|
|
2007-02-19 02:49:26 +00:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
STEREO_INTERLEAVED = 0,
|
|
|
|
STEREO_NONINTERLEAVED,
|
|
|
|
STEREO_MONO,
|
|
|
|
STEREO_NUM_MODES,
|
|
|
|
};
|
2005-06-26 19:41:29 +00:00
|
|
|
|
2007-11-18 17:12:19 +00:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
CODEC_IDX_AUDIO = 0,
|
|
|
|
CODEC_IDX_VOICE,
|
|
|
|
};
|
|
|
|
|
2007-02-24 17:06:36 +00:00
|
|
|
enum
|
|
|
|
{
|
2009-01-10 21:10:56 +00:00
|
|
|
DSP_MYDSP = 1,
|
2005-09-21 13:09:10 +00:00
|
|
|
DSP_SET_FREQUENCY,
|
|
|
|
DSP_SWITCH_FREQUENCY,
|
|
|
|
DSP_SET_SAMPLE_DEPTH,
|
|
|
|
DSP_SET_STEREO_MODE,
|
|
|
|
DSP_RESET,
|
2006-11-26 12:02:47 +00:00
|
|
|
DSP_FLUSH,
|
2005-09-21 13:09:10 +00:00
|
|
|
DSP_SET_TRACK_GAIN,
|
|
|
|
DSP_SET_ALBUM_GAIN,
|
|
|
|
DSP_SET_TRACK_PEAK,
|
2005-11-14 21:56:56 +00:00
|
|
|
DSP_SET_ALBUM_PEAK,
|
|
|
|
DSP_CROSSFEED
|
2005-09-21 13:09:10 +00:00
|
|
|
};
|
|
|
|
|
2007-11-18 17:12:19 +00:00
|
|
|
struct dsp_config;
|
|
|
|
|
|
|
|
int dsp_process(struct dsp_config *dsp, char *dest,
|
|
|
|
const char *src[], int count);
|
|
|
|
int dsp_input_count(struct dsp_config *dsp, int count);
|
|
|
|
int dsp_output_count(struct dsp_config *dsp, int count);
|
|
|
|
intptr_t dsp_configure(struct dsp_config *dsp, int setting,
|
|
|
|
intptr_t value);
|
2009-10-22 00:59:42 +00:00
|
|
|
int get_replaygain_mode(bool have_track_gain, bool have_album_gain);
|
2007-02-24 17:06:36 +00:00
|
|
|
void dsp_set_replaygain(void);
|
2005-11-14 21:56:56 +00:00
|
|
|
void dsp_set_crossfeed(bool enable);
|
2006-04-11 13:49:05 +00:00
|
|
|
void dsp_set_crossfeed_direct_gain(int gain);
|
2007-11-18 17:12:19 +00:00
|
|
|
void dsp_set_crossfeed_cross_params(long lf_gain, long hf_gain,
|
|
|
|
long cutoff);
|
2006-03-28 21:19:30 +00:00
|
|
|
void dsp_set_eq(bool enable);
|
|
|
|
void dsp_set_eq_precut(int precut);
|
|
|
|
void dsp_set_eq_coefs(int band);
|
2006-10-27 20:41:33 +00:00
|
|
|
void dsp_dither_enable(bool enable);
|
2009-06-12 07:20:50 +00:00
|
|
|
void dsp_timestretch_enable(bool enable);
|
2009-06-16 07:10:05 +00:00
|
|
|
bool dsp_timestretch_available(void);
|
2009-07-11 16:46:19 +00:00
|
|
|
void sound_set_pitch(int32_t r);
|
|
|
|
int32_t sound_get_pitch(void);
|
|
|
|
void dsp_set_timestretch(int32_t percent);
|
|
|
|
int32_t dsp_get_timestretch(void);
|
2009-06-16 07:10:05 +00:00
|
|
|
int dsp_callback(int msg, intptr_t param);
|
2009-11-04 18:14:36 +00:00
|
|
|
void dsp_set_compressor(int c_threshold, int c_gain, int c_ratio,
|
2009-09-25 15:46:38 +00:00
|
|
|
int c_knee, int c_release);
|
2006-03-21 23:20:17 +00:00
|
|
|
|
2005-06-26 19:41:29 +00:00
|
|
|
#endif
|