37 lines
1.3 KiB
C++
37 lines
1.3 KiB
C++
/** @file
|
|
* @author Edouard DUPIN
|
|
* @copyright 2011, Edouard DUPIN, all right reserved
|
|
* @license APACHE v2.0 (see license file)
|
|
*/
|
|
|
|
#ifndef __AUDIO_FORMAT_H__
|
|
#define __AUDIO_FORMAT_H__
|
|
|
|
#include <string>
|
|
|
|
namespace audio {
|
|
enum format {
|
|
format_unknow,
|
|
format_int8, //!< Signed 8 bits
|
|
format_int8_on_int16, //!< Signed 8 bits on 16 bits data (8 bit fixpoint value)
|
|
format_int16, //!< Signed 16 bits
|
|
format_int16_on_int32, //!< Signed 16 bits on 32 bits data (16 bit fixpoint value)
|
|
format_int24, //!< Signed 24 bits on 32 bits (lower)
|
|
format_int32, //!< Signed 32 bits
|
|
format_int32_on_int64, //!< Signed 32 bits on 64 bits data (32 bit fixpoint value)
|
|
format_int64, //!< Signed 64 bits
|
|
format_float, //!< Floating point 32 bits (single precision)
|
|
format_double //!< Floating point 64 bits (double precision)
|
|
};
|
|
std::string getFormatString(enum audio::format _format);
|
|
enum audio::format getFormatFromString(const std::string& _value);
|
|
std::vector<enum audio::format> getListFormatFromString(const std::string& _value);
|
|
std::ostream& operator <<(std::ostream& _os, enum audio::format _obj);
|
|
std::ostream& operator <<(std::ostream& _os, const std::vector<enum audio::format>& _obj);
|
|
uint32_t getFormatBytes(enum audio::format _format);
|
|
};
|
|
|
|
|
|
#endif
|
|
|