27 if ((psrc =
calloc (1,
sizeof (*psrc))) ==
NULL)
68 ((
SRC_PRIVATE*) src_state)->user_callback_data = cb_data ;
115 if (
data->input_frames < 0)
116 data->input_frames = 0 ;
117 if (
data->output_frames < 0)
118 data->output_frames = 0 ;
136 data->input_frames_used = 0 ;
137 data->output_frames_gen = 0 ;
157 long output_frames_gen ;
178 memset (&src_data, 0,
sizeof (src_data)) ;
194 output_frames_gen = 0 ;
195 while (output_frames_gen < frames)
243 return output_frames_gen ;
341{
return PACKAGE "-" VERSION " (c) 2002-2008 Erik de Castro Lopo" ;
371 return "Malloc failed." ;
373 return "SRC_STATE pointer is NULL." ;
375 return "SRC_DATA pointer is NULL." ;
377 return "SRC_DATA->data_out or SRC_DATA->data_in is NULL." ;
379 return "Internal error. No private data." ;
385 return "src_process() called without reset after end_of_input." ;
387 return "Internal error. No process pointer." ;
389 return "Internal error. SHIFT_BITS too large." ;
391 return "Internal error. Filter length too large." ;
393 return "Bad converter number." ;
395 return "Channel count must be >= 1." ;
397 return "Internal error. Bad buffer length. Please report this." ;
399 return "Internal error. Input data / internal buffer size difference. Please report this." ;
401 return "Internal error. Private pointer is NULL. Please report this." ;
403 return "Input and output data arrays overlap." ;
405 return "Supplied callback function pointer is NULL." ;
407 return "Calling mode differs from initialisation mode (ie process v callback)." ;
409 return "Callback function pointer is NULL in src_callback_read ()." ;
411 return "This converter only allows constant conversion ratios." ;
413 return "Internal error : Bad length in prepare_data ()." ;
415 return "Error : Someone is trampling on my internal state." ;
418 return "Placeholder. No error defined for this error number." ;
461{
double scaled_value ;
466 scaled_value =
in [
len] * (8.0 * 0x10000000) ;
494{
double scaled_value ;
499 scaled_value =
in [
len] * (8.0 * 0x10000000) ;
501 {
out [
len] = 0x7fffffff ;
505 {
out [
len] = -1 - 0x7fffffff ;
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
_Check_return_ _CRT_JIT_INTRINSIC double __cdecl fabs(_In_ double x)
_Check_return_ __CRT_INLINE long lrint(_In_ double x)
static const WCHAR desc[]
static float(__cdecl *square_half_float)(float x
int src_error(SRC_STATE *state)
SRC_STATE * src_callback_new(src_callback_t func, int converter_type, int channels, int *error, void *cb_data)
int src_set_ratio(SRC_STATE *state, double new_ratio)
void src_int_to_float_array(const int *in, float *out, int len)
int src_is_valid_ratio(double ratio)
const char * src_get_version(void)
void src_float_to_short_array(const float *in, short *out, int len)
static int psrc_set_converter(SRC_PRIVATE *psrc, int converter_type)
void src_short_to_float_array(const short *in, float *out, int len)
int src_simple(SRC_DATA *src_data, int converter, int channels)
int src_reset(SRC_STATE *state)
const char * src_get_name(int converter_type)
long src_callback_read(SRC_STATE *state, double src_ratio, long frames, float *data)
void src_float_to_int_array(const float *in, int *out, int len)
int src_process(SRC_STATE *state, SRC_DATA *data)
SRC_STATE * src_delete(SRC_STATE *state)
const char * src_strerror(int error)
SRC_STATE * src_new(int converter_type, int channels, int *error)
const char * src_get_description(int converter_type)
int src_get_channels(SRC_STATE *state)
struct SRC_STATE_tag SRC_STATE
long(* src_callback_t)(void *cb_data, float **data)
#define SRC_MAX_RATIO_STR
static int is_bad_src_ratio(double ratio)
const char * sinc_get_description(int src_enum)
const char * zoh_get_description(int src_enum)
int sinc_set_converter(SRC_PRIVATE *psrc, int src_enum)
const char * zoh_get_name(int src_enum)
int linear_set_converter(SRC_PRIVATE *psrc, int src_enum)
@ SRC_ERR_SIZE_INCOMPATIBILITY
@ SRC_ERR_NO_VARIABLE_RATIO
@ SRC_ERR_BAD_INTERNAL_STATE
@ SRC_ERR_BAD_CHANNEL_COUNT
@ SRC_ERR_SINC_PREPARE_DATA_BAD_LEN
@ SRC_ERR_SINC_BAD_BUFFER_LEN
const char * sinc_get_name(int src_enum)
const char * linear_get_name(int src_enum)
int zoh_set_converter(SRC_PRIVATE *psrc, int src_enum)
const char * linear_get_description(int src_enum)
#define CPU_CLIPS_NEGATIVE
#define CPU_CLIPS_POSITIVE
int(* const_process)(struct SRC_PRIVATE_tag *psrc, SRC_DATA *data)
int(* vari_process)(struct SRC_PRIVATE_tag *psrc, SRC_DATA *data)
src_callback_t callback_func
void * user_callback_data
void(* reset)(struct SRC_PRIVATE_tag *psrc)