1 #ifndef foopulsespeexwraphfoo
2 #define foopulsespeexwraphfoo
7 This file is part of PulseAudio.
9 Copyright 2004-2006 Lennart Poettering
10 Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB
12 PulseAudio is free software; you can redistribute it and/or modify
13 it under the terms of the GNU Lesser General Public License as published
14 by the Free Software Foundation; either version 2 of the License,
15 or (at your option) any later version.
17 PulseAudio is distributed in the hope that it will be useful, but
18 WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 General Public License for more details.
22 You should have received a copy of the GNU Lesser General Public License
23 along with PulseAudio; if not, write to the Free Software
24 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
28 /* We define a minimal version of speex_resampler.h however define one
29 * version for fixed and another one for float. Yes, somewhat ugly */
31 #define spx_int16_t short
32 #define spx_int32_t int
33 #define spx_uint16_t unsigned short
34 #define spx_uint32_t unsigned int
36 typedef struct SpeexResamplerState_ SpeexResamplerState
;
38 SpeexResamplerState
*paspfx_resampler_init(spx_uint32_t nb_channels
, spx_uint32_t in_rate
, spx_uint32_t out_rate
, int quality
, int *err
);
39 void paspfx_resampler_destroy(SpeexResamplerState
*st
);
40 int paspfx_resampler_process_interleaved_int(SpeexResamplerState
*st
, const spx_int16_t
*in
, spx_uint32_t
*in_len
, spx_int16_t
*out
, spx_uint32_t
*out_len
);
41 int paspfx_resampler_set_rate(SpeexResamplerState
*st
, spx_uint32_t in_rate
, spx_uint32_t out_rate
);
42 int paspfx_resampler_reset_mem(SpeexResamplerState
*st
);
44 SpeexResamplerState
*paspfl_resampler_init(spx_uint32_t nb_channels
, spx_uint32_t in_rate
, spx_uint32_t out_rate
, int quality
, int *err
);
45 void paspfl_resampler_destroy(SpeexResamplerState
*st
);
46 int paspfl_resampler_process_interleaved_float(SpeexResamplerState
*st
, const float *in
, spx_uint32_t
*in_len
, float *out
, spx_uint32_t
*out_len
);
47 int paspfl_resampler_set_rate(SpeexResamplerState
*st
, spx_uint32_t in_rate
, spx_uint32_t out_rate
);
48 int paspfl_resampler_reset_mem(SpeexResamplerState
*st
);