ITASampleTypeConversion.h 2.23 KB
Newer Older
Jonas Stienen's avatar
Jonas Stienen committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
/*
* ----------------------------------------------------------------
*
*		ITA core libs
*		(c) Copyright Institute of Technical Acoustics (ITA)
*		RWTH Aachen University, Germany, 2015-2016
*
* ----------------------------------------------------------------
*				    ____  __________  _______
*				   //  / //__   ___/ //  _   |
*				  //  /    //  /    //  /_|  |
*				 //  /    //  /    //  ___   |
*				//__/    //__/    //__/   |__|
*
* ----------------------------------------------------------------
*
*/
// $Id: ITASampleTypeConversion.h 3828 2014-11-27 10:43:43Z fwefers $

#ifndef INCLUDE_WATCHER_ITA_SAMPLE_TYPE_CONVERSION
#define INCLUDE_WATCHER_ITA_SAMPLE_TYPE_CONVERSION

// ITABase
#include <ITABaseDefinitions.h>

//! Converts signed integer 16-Bit -> single precision floating point (32-Bit)
void ITA_BASE_API stc_sint16_to_float(float* dest, const short* src, size_t count, int input_stride = 1, int output_stride = 1);

//! Converts signed integer 24-Bit -> single precision floating point (32-Bit)
void ITA_BASE_API stc_sint24_to_float(float* dest, const void* src, size_t count, int input_stride = 1, int output_stride = 1);

//! Converts signed integer 32-Bit -> single precision floating point (32-Bit)
void ITA_BASE_API stc_sint32_to_float(float* dest, const int* src, size_t count, int input_stride = 1, int output_stride = 1);

//! Converts double precision floating point (64-Bit) -> single precision floating point (32-Bit)
void ITA_BASE_API stc_double_to_float(float* dest, const double* src, size_t count, int input_stride = 1, int output_stride = 1);

//! Converts single precision floating point (32-Bit) -> signed integer 16-Bit
void ITA_BASE_API stc_float_to_sint16(short* dest, const float* src, size_t count, int input_stride = 1, int output_stride = 1);

//! Converts single precision floating point (32-Bit) -> signed integer 32-Bit
void ITA_BASE_API stc_float_to_sint32(int* dest, const float* src, size_t count, int input_stride = 1, int output_stride = 1);

//! Converts single precision floating point (32-Bit) -> double precision floating point (64-Bit)
void ITA_BASE_API stc_float_to_double(double* dest, const float* src, size_t count, int input_stride = 1, int output_stride = 1);

#endif // INCLUDE_WATCHER_ITA_SAMPLE_TYPE_CONVERSION