[DEV] remove ROS dependency
This commit is contained in:
parent
cec6914685
commit
ad6cbd0870
@ -9,124 +9,63 @@
|
||||
#include <vector>
|
||||
#include <etk/types.hpp>
|
||||
|
||||
#ifdef ETK_EXTERN_FRAMEWORK_ROS
|
||||
#include <ros/ros.h>
|
||||
#include "audio_msg/AudioBuffer.h"
|
||||
namespace audio {
|
||||
enum channel {
|
||||
channel_unknow = audio_msg::AudioBuffer::CHANNEL_UNKNOW,
|
||||
channel_frontLeft = audio_msg::AudioBuffer::CHANNEL_FRONT_LEFT,
|
||||
channel_frontCenter = audio_msg::AudioBuffer::CHANNEL_FRONT_CENTER,
|
||||
channel_frontRight = audio_msg::AudioBuffer::CHANNEL_FRONT_RIGHT,
|
||||
channel_rearLeft = audio_msg::AudioBuffer::CHANNEL_REAR_LEFT,
|
||||
channel_rearCenter = audio_msg::AudioBuffer::CHANNEL_REAR_CENTER,
|
||||
channel_rearRight = audio_msg::AudioBuffer::CHANNEL_REAR_RIGHT,
|
||||
channel_centerLeft = audio_msg::AudioBuffer::CHANNEL_CENTER_LEFT,
|
||||
channel_centerRight = audio_msg::AudioBuffer::CHANNEL_CENTER_RIGHT,
|
||||
channel_topFrontLeft = audio_msg::AudioBuffer::CHANNEL_TOP_FRONT_LEFT,
|
||||
channel_topFrontCenter = audio_msg::AudioBuffer::CHANNEL_TOP_FRONT_CENTER,
|
||||
channel_topFrontRight = audio_msg::AudioBuffer::CHANNEL_TOP_FRONT_RIGHT,
|
||||
channel_topRearLeft = audio_msg::AudioBuffer::CHANNEL_TOP_REAR_LEFT,
|
||||
channel_topRearCenter = audio_msg::AudioBuffer::CHANNEL_TOP_REAR_CENTER,
|
||||
channel_topRearRight = audio_msg::AudioBuffer::CHANNEL_TOP_REAR_RIGHT,
|
||||
channel_topCenterLeft = audio_msg::AudioBuffer::CHANNEL_TOP_CENTER_LEFT,
|
||||
channel_topCenterRight = audio_msg::AudioBuffer::CHANNEL_TOP_CENTER_RIGHT,
|
||||
channel_lfe = audio_msg::AudioBuffer::CHANNEL_LFE,
|
||||
channel_aux0 = audio_msg::AudioBuffer::CHANNEL_AUX0,
|
||||
channel_aux1 = audio_msg::AudioBuffer::CHANNEL_AUX1,
|
||||
channel_aux2 = audio_msg::AudioBuffer::CHANNEL_AUX2,
|
||||
channel_aux3 = audio_msg::AudioBuffer::CHANNEL_AUX3,
|
||||
channel_aux4 = audio_msg::AudioBuffer::CHANNEL_AUX4,
|
||||
channel_aux5 = audio_msg::AudioBuffer::CHANNEL_AUX5,
|
||||
channel_aux6 = audio_msg::AudioBuffer::CHANNEL_AUX6,
|
||||
channel_aux7 = audio_msg::AudioBuffer::CHANNEL_AUX7,
|
||||
channel_aux8 = audio_msg::AudioBuffer::CHANNEL_AUX8,
|
||||
channel_aux9 = audio_msg::AudioBuffer::CHANNEL_AUX9,
|
||||
channel_aux10 = audio_msg::AudioBuffer::CHANNEL_AUX10,
|
||||
channel_aux11 = audio_msg::AudioBuffer::CHANNEL_AUX11,
|
||||
channel_aux12 = audio_msg::AudioBuffer::CHANNEL_AUX12,
|
||||
channel_aux13 = audio_msg::AudioBuffer::CHANNEL_AUX13,
|
||||
channel_aux14 = audio_msg::AudioBuffer::CHANNEL_AUX14,
|
||||
channel_aux15 = audio_msg::AudioBuffer::CHANNEL_AUX15,
|
||||
channel_aux16 = audio_msg::AudioBuffer::CHANNEL_AUX16,
|
||||
channel_aux17 = audio_msg::AudioBuffer::CHANNEL_AUX17,
|
||||
channel_aux18 = audio_msg::AudioBuffer::CHANNEL_AUX18,
|
||||
channel_aux19 = audio_msg::AudioBuffer::CHANNEL_AUX19,
|
||||
channel_aux20 = audio_msg::AudioBuffer::CHANNEL_AUX20,
|
||||
channel_aux21 = audio_msg::AudioBuffer::CHANNEL_AUX21,
|
||||
channel_aux22 = audio_msg::AudioBuffer::CHANNEL_AUX22,
|
||||
channel_aux23 = audio_msg::AudioBuffer::CHANNEL_AUX23,
|
||||
channel_aux24 = audio_msg::AudioBuffer::CHANNEL_AUX24,
|
||||
channel_aux25 = audio_msg::AudioBuffer::CHANNEL_AUX25,
|
||||
channel_aux26 = audio_msg::AudioBuffer::CHANNEL_AUX26,
|
||||
channel_aux27 = audio_msg::AudioBuffer::CHANNEL_AUX27,
|
||||
channel_aux28 = audio_msg::AudioBuffer::CHANNEL_AUX28,
|
||||
channel_aux29 = audio_msg::AudioBuffer::CHANNEL_AUX29,
|
||||
channel_aux30 = audio_msg::AudioBuffer::CHANNEL_AUX30,
|
||||
channel_aux31 = audio_msg::AudioBuffer::CHANNEL_AUX31,
|
||||
};
|
||||
};
|
||||
#else
|
||||
namespace audio {
|
||||
enum channel {
|
||||
channel_unknow, //!< Error channel ...
|
||||
// normal level
|
||||
channel_frontLeft, //!< channel Front Left
|
||||
channel_frontCenter, //!< channel Front Center
|
||||
channel_frontRight, //!< channel Front Right
|
||||
channel_rearLeft, //!< channel rear Left
|
||||
channel_rearCenter, //!< channel rear Center
|
||||
channel_rearRight, //!< channel rear Right
|
||||
channel_centerLeft, //!< channel center Left
|
||||
channel_centerRight, //!< channel center Right
|
||||
// top level
|
||||
channel_topFrontLeft, //!< channel top front left
|
||||
channel_topFrontCenter, //!< channel top front center
|
||||
channel_topFrontRight, //!< channel top front right
|
||||
channel_topRearLeft, //!< channel top rear left
|
||||
channel_topRearCenter, //!< channel top rear center
|
||||
channel_topRearRight, //!< channel top rear Right
|
||||
channel_topCenterLeft, //!< channel top center left
|
||||
channel_topCenterRight, //!< channel top center right
|
||||
// global elements
|
||||
channel_lfe, //!< channel Low frequency
|
||||
// Some user auxyliary channel (audio mixing table)
|
||||
channel_aux0,
|
||||
channel_aux1,
|
||||
channel_aux2,
|
||||
channel_aux3,
|
||||
channel_aux4,
|
||||
channel_aux5,
|
||||
channel_aux6,
|
||||
channel_aux7,
|
||||
channel_aux8,
|
||||
channel_aux9,
|
||||
channel_aux10,
|
||||
channel_aux11,
|
||||
channel_aux12,
|
||||
channel_aux13,
|
||||
channel_aux14,
|
||||
channel_aux15,
|
||||
channel_aux16,
|
||||
channel_aux17,
|
||||
channel_aux18,
|
||||
channel_aux19,
|
||||
channel_aux20,
|
||||
channel_aux21,
|
||||
channel_aux22,
|
||||
channel_aux23,
|
||||
channel_aux24,
|
||||
channel_aux25,
|
||||
channel_aux26,
|
||||
channel_aux27,
|
||||
channel_aux28,
|
||||
channel_aux29,
|
||||
channel_aux30,
|
||||
channel_aux31,
|
||||
};
|
||||
};
|
||||
#endif
|
||||
namespace audio {
|
||||
enum channel {
|
||||
channel_unknow, //!< Error channel ...
|
||||
// normal level
|
||||
channel_frontLeft, //!< channel Front Left
|
||||
channel_frontCenter, //!< channel Front Center
|
||||
channel_frontRight, //!< channel Front Right
|
||||
channel_rearLeft, //!< channel rear Left
|
||||
channel_rearCenter, //!< channel rear Center
|
||||
channel_rearRight, //!< channel rear Right
|
||||
channel_centerLeft, //!< channel center Left
|
||||
channel_centerRight, //!< channel center Right
|
||||
// top level
|
||||
channel_topFrontLeft, //!< channel top front left
|
||||
channel_topFrontCenter, //!< channel top front center
|
||||
channel_topFrontRight, //!< channel top front right
|
||||
channel_topRearLeft, //!< channel top rear left
|
||||
channel_topRearCenter, //!< channel top rear center
|
||||
channel_topRearRight, //!< channel top rear Right
|
||||
channel_topCenterLeft, //!< channel top center left
|
||||
channel_topCenterRight, //!< channel top center right
|
||||
// global elements
|
||||
channel_lfe, //!< channel Low frequency
|
||||
// Some user auxyliary channel (audio mixing table)
|
||||
channel_aux0,
|
||||
channel_aux1,
|
||||
channel_aux2,
|
||||
channel_aux3,
|
||||
channel_aux4,
|
||||
channel_aux5,
|
||||
channel_aux6,
|
||||
channel_aux7,
|
||||
channel_aux8,
|
||||
channel_aux9,
|
||||
channel_aux10,
|
||||
channel_aux11,
|
||||
channel_aux12,
|
||||
channel_aux13,
|
||||
channel_aux14,
|
||||
channel_aux15,
|
||||
channel_aux16,
|
||||
channel_aux17,
|
||||
channel_aux18,
|
||||
channel_aux19,
|
||||
channel_aux20,
|
||||
channel_aux21,
|
||||
channel_aux22,
|
||||
channel_aux23,
|
||||
channel_aux24,
|
||||
channel_aux25,
|
||||
channel_aux26,
|
||||
channel_aux27,
|
||||
channel_aux28,
|
||||
channel_aux29,
|
||||
channel_aux30,
|
||||
channel_aux31,
|
||||
};
|
||||
std::string getChannelString(enum audio::channel _obj);
|
||||
std::string getChannelString(const std::vector<enum audio::channel>& _obj);
|
||||
enum audio::channel getChannelFromString(const std::string& _value);
|
||||
@ -137,5 +76,5 @@ namespace audio {
|
||||
// For ROS Interface:
|
||||
std::vector<uint8_t> convertChannel(const std::vector<enum audio::channel>& _obj);
|
||||
std::vector<enum audio::channel> convertChannel(const std::vector<uint8_t>& _obj);
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -7,45 +7,21 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#ifdef ETK_EXTERN_FRAMEWORK_ROS
|
||||
#include <ros/ros.h>
|
||||
#include "audio_msg/AudioBuffer.h"
|
||||
namespace audio {
|
||||
enum format {
|
||||
format_unknow = audio_msg::AudioBuffer::FORMAT_UNKNOW,
|
||||
format_int8 = audio_msg::AudioBuffer::FORMAT_INT8,
|
||||
format_int8_on_int16 = audio_msg::AudioBuffer::FORMAT_INT8_ON_INT16,
|
||||
format_int16 = audio_msg::AudioBuffer::FORMAT_INT16,
|
||||
format_int16_on_int32 = audio_msg::AudioBuffer::FORMAT_INT16_ON_INT32,
|
||||
format_int24 = audio_msg::AudioBuffer::FORMAT_INT24,
|
||||
format_int24_on_int32 = audio_msg::AudioBuffer::FORMAT_INT24_ON_INT32,
|
||||
format_int32 = audio_msg::AudioBuffer::FORMAT_INT32,
|
||||
format_int32_on_int64 = audio_msg::AudioBuffer::FORMAT_INT32_ON_INT64,
|
||||
format_int64 = audio_msg::AudioBuffer::FORMAT_INT64,
|
||||
format_float = audio_msg::AudioBuffer::FORMAT_FLOAT,
|
||||
format_double = audio_msg::AudioBuffer::FORMAT_DOUBLE
|
||||
};
|
||||
};
|
||||
#else
|
||||
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 24 bits (lower)
|
||||
format_int24_on_int32, //!< 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)
|
||||
};
|
||||
};
|
||||
#endif
|
||||
|
||||
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 24 bits (lower)
|
||||
format_int24_on_int32, //!< 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);
|
||||
@ -57,5 +33,5 @@ namespace audio {
|
||||
std::vector<enum audio::format> convertFormat(const std::vector<uint8_t>& _obj);
|
||||
uint8_t convertFormat(enum audio::format _obj);
|
||||
enum audio::format convertFormat(uint8_t _obj);
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user