#ifndef __GDAM_SAMPLE_CONVERTER_H_
#define __GDAM_SAMPLE_CONVERTER_H_

/*
 * in general, the gdamsampleconverter.c is generated
 * by make-gdamsampleconverter.pl.
 *
 *
 * The general pattern is: you call us to get a function pointer
 * which may be invoked to do the conversion...
 *
 * [gdam_sample_converter_convert_channels is not with the convention, yet]
 *
 * All these functions are written so that dst and src may overlap
 * (or be the same).
 */
 

#include <glib.h>

typedef void       (*GdamSampleConverter)     (void*       dst,
					       const void* src,
                                               int         num_samples);

GdamSampleConverter  gdam_sample_converter_get(int      in_bits_per_samp,
					       gboolean in_signed,
					       gboolean in_big_endian,

                                               int      out_bits_per_samp,
					       gboolean out_signed,
					       gboolean out_big_endian);

GdamSampleConverter  gdam_sample_converter_get_to_float
                                              (int      in_bits_per_samp,
					       gboolean in_signed,
					       gboolean in_big_endian);

GdamSampleConverter  gdam_sample_converter_get_from_float
					      (gboolean stereo_in,
                                               int      out_bits_per_samp,
					       gboolean out_signed,
					       gboolean out_big_endian);

/* hmmm... probably this should be a GdamSampleConverter returning function */
GdamSampleConverter  gdam_sample_converter_get_channel_changer
                                              (int      num_channels_in,
					       int      num_channels_out);


#endif
