/** @file * @author Edouard DUPIN * @copyright 2011, Edouard DUPIN, all right reserved * @license APACHE v2.0 (see license file) * @fork from RTAudio */ #include #include #include #include #include #include #undef __class__ #define __class__ "type" static const char* listType[] { "undefined", "alsa", "pulse", "oss", "jack", "coreOSX", "corIOS", "asio", "ds", "java", "dummy", "user1", "user2", "user3", "user4" }; static int32_t listTypeSize = sizeof(listType)/sizeof(char*); std::ostream& airtaudio::operator <<(std::ostream& _os, const enum airtaudio::type& _obj) { _os << listType[_obj]; return _os; } std::ostream& airtaudio::operator <<(std::ostream& _os, const std::vector& _obj) { _os << std::string("{"); for (size_t iii=0; iii<_obj.size(); ++iii) { if (iii!=0) { _os << std::string(";"); } _os << _obj[iii]; } _os << std::string("}"); return _os; } /* template std::string to_string(const enum audio::format& _variable) { return listType[_value]; } */ std::string airtaudio::getTypeString(enum airtaudio::type _value) { return listType[_value]; } enum airtaudio::type airtaudio::getTypeFromString(const std::string& _value) { for (int32_t iii=0; iii(iii); } } if (_value == "auto") { return airtaudio::type_undefined; } return airtaudio::type_undefined; }