2015-06-11 21:39:56 +02:00
|
|
|
/** @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>
|
2015-06-11 21:39:56 +02:00
|
|
|
|
|
|
|
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];
|
2015-06-11 21:39:56 +02:00
|
|
|
if ( data == "-h"
|
|
|
|
|| data == "--help") {
|
2017-09-26 15:57:44 +02:00
|
|
|
TEST_PRINT("Help : ");
|
|
|
|
TEST_PRINT(" ./xxx ---");
|
2015-06-11 21:39:56 +02:00
|
|
|
exit(0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
audio::orchestra::Interface interface;
|
2017-08-28 00:08:41 +02:00
|
|
|
etk::Vector<etk::String> apis = interface.getListApi();
|
2015-06-11 21:39:56 +02:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|