#ifndef mix_func_h
#define mix_func_h

#include "au_mixer.h"
#include "mpxplay.h"

extern void mixer_crossfade_configure(struct mpxplay_audioout_info_s *,struct frame *,struct frame *);
extern void calculate_crossvolumes(struct mpxplay_audioout_info_s *,long *,long *);

//cv_bits.c
extern void cv_bits_n_to_m(PCM_CV_TYPE_S *pcm,unsigned int samplenum,unsigned int in_bytespersample,unsigned int out_bytespersample);
extern void cv_n_bits_to_float(PCM_CV_TYPE_S *pcm,unsigned int samplenum,unsigned int in_bytespersample,unsigned int out_scalebits);
extern void cv_float_to_n_bits(PCM_CV_TYPE_S *pcm,unsigned int samplenum,unsigned int in_scalebits,unsigned int out_bytespersample,unsigned int fpuround_chop);
extern void cv_float16_to_int16(PCM_CV_TYPE_S *pcm,unsigned int samplenum,unsigned int fpuround_chop);
extern void cv_scale_float(PCM_CV_TYPE_S *pcm,unsigned int samplenum,unsigned int in_scalebits,unsigned int out_scalebits,unsigned int rangecheck);

//cv_freq.c
//extern unsigned int mixer_speed_hq(PCM_CV_TYPE_F *pcm,unsigned int samplenum_in);
//extern unsigned int mixer_speed_lq(PCM_CV_TYPE_S *pcm,unsigned int samplenum_in);

//cv_chan.c
extern unsigned int cv_channels_1_to_n(PCM_CV_TYPE_S *pcm_sample,unsigned int samplenum,unsigned int newchannels,unsigned int bytespersample);
extern unsigned int cv_channels_n_to_1(PCM_CV_TYPE_S *pcm_sample,unsigned int samplenum,unsigned int oldchannels,unsigned int bytespersample);
extern unsigned int cv_channels_n_to_2(PCM_CV_TYPE_S *pcm_sample,unsigned int samplenum,unsigned int oldchannels,unsigned int bytespersample);

//analiser.c
extern void mixer_get_volumelevel(PCM_CV_TYPE_S *pcm,unsigned int samplenum);
extern void mixer_pcm_spectrum_analiser(PCM_CV_TYPE_S *pcm,unsigned int samplenum);

//mx_avol.c
extern void mixer_autovolume_set(PCM_CV_TYPE_S *pcm,unsigned int samplenum);

extern void mixer_soundlimit_check(struct mpxplay_audioout_info_s *);

#endif
