haiku/headers/private/media/SampleConverter.h
ejakowatz 52a3801208 It is accomplished ...
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-09 12:24:59 +00:00

54 lines
2.2 KiB
C++

#ifndef _SAMPLE_CONVERTER_
#define _SAMPLE_CONVERTER_
/***********************************************************************
* AUTHOR: Marcus Overhagen
* FILE: SampleConverter.h
* DESCR: Converts between different sample formats:
* media_raw_audio_format::B_AUDIO_FLOAT
* media_raw_audio_format::B_AUDIO_INT
* media_raw_audio_format::B_AUDIO_SHORT
* media_raw_audio_format::B_AUDIO_CHAR
* media_raw_audio_format::B_AUDIO_UCHAR
***********************************************************************/
namespace MediaKitPrivate {
class SampleConverter
{
public:
static status_t
convert(void *dest, uint32 dest_format,
const void *source, uint32 source_format,
int samplecount);
static void convert(uint8 *dest, const float *source, int samplecount);
static void convert(uint8 *dest, const int32 *source, int samplecount);
static void convert(uint8 *dest, const int16 *source, int samplecount);
static void convert(uint8 *dest, const int8 *source, int samplecount);
static void convert(int8 *dest, const float *source, int samplecount);
static void convert(int8 *dest, const int32 *source, int samplecount);
static void convert(int8 *dest, const int16 *source, int samplecount);
static void convert(int8 *dest, const uint8 *source, int samplecount);
static void convert(int16 *dest, const float *source, int samplecount);
static void convert(int16 *dest, const int32 *source, int samplecount);
static void convert(int16 *dest, const int8 *source, int samplecount);
static void convert(int16 *dest, const uint8 *source, int samplecount);
static void convert(int32 *dest, const float *source, int samplecount);
static void convert(int32 *dest, const int16 *source, int samplecount);
static void convert(int32 *dest, const int8 *source, int samplecount);
static void convert(int32 *dest, const uint8 *source, int samplecount);
static void convert(float *dest, const int32 *source, int samplecount);
static void convert(float *dest, const int16 *source, int samplecount);
static void convert(float *dest, const int8 *source, int samplecount);
static void convert(float *dest, const uint8 *source, int samplecount);
};
} //namespace MediaKitPrivate
#endif