audio-orchestra/tools/orchestra-list.cpp

40 lines
1.0 KiB
C++
Raw Normal View History

/** @file
* @author Edouard DUPIN
* @copyright 2015, Edouard DUPIN, all right reserved
* @license APACHE v2.0 (see license file)
*/
2016-10-02 22:06:09 +02:00
#include <etk/etk.hpp>
#include <test-debug/debug.hpp>
2016-10-13 21:29:18 +02:00
2016-10-02 22:06:09 +02:00
#include <audio/orchestra/Interface.hpp>
int main(int _argc, const char **_argv) {
// the only one init for etk:
etk::init(_argc, _argv);
for (int32_t iii=0; iii<_argc ; ++iii) {
2017-08-28 00:08:41 +02:00
etk::String data = _argv[iii];
if ( data == "-h"
|| data == "--help") {
2017-09-26 15:57:44 +02:00
TEST_PRINT("Help : ");
TEST_PRINT(" ./xxx ---");
exit(0);
}
}
audio::orchestra::Interface interface;
2017-08-28 00:08:41 +02:00
etk::Vector<etk::String> apis = interface.getListApi();
TEST_PRINT("Find : " << apis.size() << " apis.");
for (auto &it : apis) {
interface.instanciate(it);
TEST_PRINT("Device list for : '" << it << "'");
for (int32_t iii=0; iii<interface.getDeviceCount(); ++iii) {
audio::orchestra::DeviceInfo info = interface.getDeviceInfo(iii);
TEST_PRINT(" " << iii << " name :" << info.name);
info.display(2);
}
interface.clear();
}
return 0;
}