[DEV] update to future lutin 2.0 and update to new ejson

This commit is contained in:
Edouard DUPIN 2016-09-07 22:05:42 +02:00
parent 94e2bbabe3
commit 7e104a1f72
5 changed files with 29 additions and 29 deletions

View File

@ -247,31 +247,31 @@ class AndroidOrchestraContext {
return info;
}
info.name = doc.getStringValue("name", "no-name");
if (doc.getStringValue("type", "output") == "output") {
info.name = doc["name"].toString().get("no-name");
if (doc["type"].toString().get("output") == "output") {
info.input = false;
} else {
info.input = true;
}
ememory::SharedPtr<const ejson::Array> list = doc.getArray("sample-rate");
if (list != nullptr) {
for (size_t iii=0; iii<list->size(); ++iii) {
info.sampleRates.push_back(int32_t(list->getNumberValue(iii, 48000)));
ejson::Array list = doc["sample-rate"].toArray();
if (list.exist() == true) {
for (auto it : list) {
info.sampleRates.push_back(int32_t(it.toNumber().get(48000)));
}
}
list = doc.getArray("channels");
if (list != nullptr) {
for (size_t iii=0; iii<list->size(); ++iii) {
info.channels.push_back(audio::getChannelFromString(list->getStringValue(iii, "???")));
list = doc["channels"].toArray();
if (list.exist() == true) {
for (auto it : list) {
info.channels.push_back(audio::getChannelFromString(it.toString().get("???")));
}
}
list = doc.getArray("format");
if (list != nullptr) {
for (size_t iii=0; iii<list->size(); ++iii) {
info.nativeFormats.push_back(audio::getFormatFromString(list->getStringValue(iii, "???")));
list = doc["format"].toArray();
if (list.exist() == true) {
for (auto it : list) {
info.nativeFormats.push_back(audio::getFormatFromString(it.toString().get("???")));
}
}
info.isDefault = doc.getBooleanValue("default", false);
info.isDefault = doc["default"].toBoolean().get(false);
info.isCorrect = true;
return info;
}

View File

@ -58,9 +58,9 @@ def create(target, module_name):
'audio/orchestra/CallbackInfo.h',
'audio/orchestra/StreamParameters.h'
])
my_module.add_module_depend(['audio', 'etk'])
my_module.add_depend(['audio', 'etk'])
# add all the time the dummy interface
my_module.add_export_flag('c++', ['-DORCHESTRA_BUILD_DUMMY'])
my_module.add_flag('c++', ['-DORCHESTRA_BUILD_DUMMY'], export=True)
# TODO : Add a FILE interface:
if target.config_based_on=="Windows":
@ -69,9 +69,9 @@ def create(target, module_name):
'audio/orchestra/api/Ds.cpp',
])
# load optionnal API:
my_module.add_optionnal_module_depend('asio', ["c++", "-DORCHESTRA_BUILD_ASIO"])
my_module.add_optionnal_module_depend('ds', ["c++", "-DORCHESTRA_BUILD_DS"])
my_module.add_optionnal_module_depend('wasapi', ["c++", "-DORCHESTRA_BUILD_WASAPI"])
my_module.add_optionnal_depend('asio', ["c++", "-DORCHESTRA_BUILD_ASIO"])
my_module.add_optionnal_depend('ds', ["c++", "-DORCHESTRA_BUILD_DS"])
my_module.add_optionnal_depend('wasapi', ["c++", "-DORCHESTRA_BUILD_WASAPI"])
elif target.config_based_on=="Linux":
my_module.add_src_file([
'audio/orchestra/api/Alsa.cpp',
@ -79,19 +79,19 @@ def create(target, module_name):
'audio/orchestra/api/Pulse.cpp',
'audio/orchestra/api/PulseDeviceList.cpp'
])
my_module.add_optionnal_module_depend('alsa', ["c++", "-DORCHESTRA_BUILD_ALSA"])
my_module.add_optionnal_module_depend('jack', ["c++", "-DORCHESTRA_BUILD_JACK"])
my_module.add_optionnal_module_depend('pulse', ["c++", "-DORCHESTRA_BUILD_PULSE"])
my_module.add_optionnal_depend('alsa', ["c++", "-DORCHESTRA_BUILD_ALSA"])
my_module.add_optionnal_depend('jack', ["c++", "-DORCHESTRA_BUILD_JACK"])
my_module.add_optionnal_depend('pulse', ["c++", "-DORCHESTRA_BUILD_PULSE"])
elif target.config_based_on=="MacOs":
my_module.add_src_file([
'audio/orchestra/api/Core.cpp'
])
# MacOsX core
my_module.add_optionnal_module_depend('CoreAudio', ["c++", "-DORCHESTRA_BUILD_MACOSX_CORE"])
my_module.add_optionnal_depend('CoreAudio', ["c++", "-DORCHESTRA_BUILD_MACOSX_CORE"])
elif target.config_based_on=="IOs":
my_module.add_src_file('audio/orchestra/api/CoreIos.mm')
# IOsX core
my_module.add_optionnal_module_depend('CoreAudio', ["c++", "-DORCHESTRA_BUILD_IOS_CORE"])
my_module.add_optionnal_depend('CoreAudio', ["c++", "-DORCHESTRA_BUILD_IOS_CORE"])
elif target.config_based_on=="Android":
my_module.add_src_file('android/org/musicdsp/orchestra/OrchestraConstants.java')
my_module.add_src_file('android/org/musicdsp/orchestra/OrchestraManagerCallback.java')
@ -102,7 +102,7 @@ def create(target, module_name):
# create inter language interface
my_module.add_src_file('org.musicdsp.orchestra.OrchestraConstants.javah')
my_module.add_path(tools.get_current_path(__file__) + '/android/', type='java')
my_module.add_module_depend(['SDK', 'jvm-basics', 'ejson'])
my_module.add_depend(['SDK', 'jvm-basics', 'ejson'])
my_module.add_export_flag('c++', ['-DORCHESTRA_BUILD_JAVA'])
my_module.add_src_file('audio/orchestra/api/Android.cpp')

View File

@ -31,7 +31,7 @@ def create(target, module_name):
my_module.add_src_file([
'orchestra-in.cpp'
])
my_module.add_module_depend(['audio-orchestra', 'test-debug'])
my_module.add_depend(['audio-orchestra', 'test-debug'])
return my_module

View File

@ -31,7 +31,7 @@ def create(target, module_name):
my_module.add_src_file([
'orchestra-list.cpp'
])
my_module.add_module_depend(['audio-orchestra', 'test-debug'])
my_module.add_depend(['audio-orchestra', 'test-debug'])
return my_module

View File

@ -31,7 +31,7 @@ def create(target, module_name):
my_module.add_src_file([
'orchestra-out.cpp'
])
my_module.add_module_depend(['audio-orchestra', 'test-debug'])
my_module.add_depend(['audio-orchestra', 'test-debug'])
return my_module