[DEV] add basic tools and change some API
This commit is contained in:
19
tools/lutin_orchestra-in.py
Normal file
19
tools/lutin_orchestra-in.py
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/python
|
||||
import lutin.module as module
|
||||
import lutin.tools as tools
|
||||
import lutin.debug as debug
|
||||
|
||||
def get_desc():
|
||||
return "'in' tool for orchestra"
|
||||
|
||||
|
||||
def create(target):
|
||||
myModule = module.Module(__file__, 'orchestra-in', 'BINARY')
|
||||
|
||||
myModule.add_src_file([
|
||||
'orchestra-in.cpp'
|
||||
])
|
||||
myModule.add_module_depend(['audio_orchestra', 'test-debug'])
|
||||
return myModule
|
||||
|
||||
|
19
tools/lutin_orchestra-list.py
Normal file
19
tools/lutin_orchestra-list.py
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/python
|
||||
import lutin.module as module
|
||||
import lutin.tools as tools
|
||||
import lutin.debug as debug
|
||||
|
||||
def get_desc():
|
||||
return "'list' i/o tool for orchestra"
|
||||
|
||||
|
||||
def create(target):
|
||||
myModule = module.Module(__file__, 'orchestra-list', 'BINARY')
|
||||
|
||||
myModule.add_src_file([
|
||||
'orchestra-list.cpp'
|
||||
])
|
||||
myModule.add_module_depend(['audio_orchestra', 'test-debug'])
|
||||
return myModule
|
||||
|
||||
|
19
tools/lutin_orchestra-out.py
Normal file
19
tools/lutin_orchestra-out.py
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/python
|
||||
import lutin.module as module
|
||||
import lutin.tools as tools
|
||||
import lutin.debug as debug
|
||||
|
||||
def get_desc():
|
||||
return "'out' tool for orchestra"
|
||||
|
||||
|
||||
def create(target):
|
||||
myModule = module.Module(__file__, 'orchestra-out', 'BINARY')
|
||||
|
||||
myModule.add_src_file([
|
||||
'orchestra-out.cpp'
|
||||
])
|
||||
myModule.add_module_depend(['audio_orchestra', 'test-debug'])
|
||||
return myModule
|
||||
|
||||
|
0
tools/orchestra-in.cpp
Normal file
0
tools/orchestra-in.cpp
Normal file
39
tools/orchestra-list.cpp
Normal file
39
tools/orchestra-list.cpp
Normal file
@@ -0,0 +1,39 @@
|
||||
/** @file
|
||||
* @author Edouard DUPIN
|
||||
* @copyright 2015, Edouard DUPIN, all right reserved
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#include <etk/etk.h>
|
||||
#include <test-debug/debug.h>
|
||||
#include <unistd.h>
|
||||
#include <audio/orchestra/Interface.h>
|
||||
|
||||
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) {
|
||||
std::string data = _argv[iii];
|
||||
if ( data == "-h"
|
||||
|| data == "--help") {
|
||||
std::cout << "Help : " << std::endl;
|
||||
std::cout << " ./xxx ---" << std::endl;
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
audio::orchestra::Interface interface;
|
||||
std::vector<std::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;
|
||||
}
|
||||
|
0
tools/orchestra-out.cpp
Normal file
0
tools/orchestra-out.cpp
Normal file
Reference in New Issue
Block a user