[DEV] update to future lutin 2.0 and update to new ejson
This commit is contained in:
parent
94e2bbabe3
commit
7e104a1f72
@ -247,31 +247,31 @@ class AndroidOrchestraContext {
|
|||||||
|
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
info.name = doc.getStringValue("name", "no-name");
|
info.name = doc["name"].toString().get("no-name");
|
||||||
if (doc.getStringValue("type", "output") == "output") {
|
if (doc["type"].toString().get("output") == "output") {
|
||||||
info.input = false;
|
info.input = false;
|
||||||
} else {
|
} else {
|
||||||
info.input = true;
|
info.input = true;
|
||||||
}
|
}
|
||||||
ememory::SharedPtr<const ejson::Array> list = doc.getArray("sample-rate");
|
ejson::Array list = doc["sample-rate"].toArray();
|
||||||
if (list != nullptr) {
|
if (list.exist() == true) {
|
||||||
for (size_t iii=0; iii<list->size(); ++iii) {
|
for (auto it : list) {
|
||||||
info.sampleRates.push_back(int32_t(list->getNumberValue(iii, 48000)));
|
info.sampleRates.push_back(int32_t(it.toNumber().get(48000)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
list = doc.getArray("channels");
|
list = doc["channels"].toArray();
|
||||||
if (list != nullptr) {
|
if (list.exist() == true) {
|
||||||
for (size_t iii=0; iii<list->size(); ++iii) {
|
for (auto it : list) {
|
||||||
info.channels.push_back(audio::getChannelFromString(list->getStringValue(iii, "???")));
|
info.channels.push_back(audio::getChannelFromString(it.toString().get("???")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
list = doc.getArray("format");
|
list = doc["format"].toArray();
|
||||||
if (list != nullptr) {
|
if (list.exist() == true) {
|
||||||
for (size_t iii=0; iii<list->size(); ++iii) {
|
for (auto it : list) {
|
||||||
info.nativeFormats.push_back(audio::getFormatFromString(list->getStringValue(iii, "???")));
|
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;
|
info.isCorrect = true;
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
@ -58,9 +58,9 @@ def create(target, module_name):
|
|||||||
'audio/orchestra/CallbackInfo.h',
|
'audio/orchestra/CallbackInfo.h',
|
||||||
'audio/orchestra/StreamParameters.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
|
# 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:
|
# TODO : Add a FILE interface:
|
||||||
|
|
||||||
if target.config_based_on=="Windows":
|
if target.config_based_on=="Windows":
|
||||||
@ -69,9 +69,9 @@ def create(target, module_name):
|
|||||||
'audio/orchestra/api/Ds.cpp',
|
'audio/orchestra/api/Ds.cpp',
|
||||||
])
|
])
|
||||||
# load optionnal API:
|
# load optionnal API:
|
||||||
my_module.add_optionnal_module_depend('asio', ["c++", "-DORCHESTRA_BUILD_ASIO"])
|
my_module.add_optionnal_depend('asio', ["c++", "-DORCHESTRA_BUILD_ASIO"])
|
||||||
my_module.add_optionnal_module_depend('ds', ["c++", "-DORCHESTRA_BUILD_DS"])
|
my_module.add_optionnal_depend('ds', ["c++", "-DORCHESTRA_BUILD_DS"])
|
||||||
my_module.add_optionnal_module_depend('wasapi', ["c++", "-DORCHESTRA_BUILD_WASAPI"])
|
my_module.add_optionnal_depend('wasapi', ["c++", "-DORCHESTRA_BUILD_WASAPI"])
|
||||||
elif target.config_based_on=="Linux":
|
elif target.config_based_on=="Linux":
|
||||||
my_module.add_src_file([
|
my_module.add_src_file([
|
||||||
'audio/orchestra/api/Alsa.cpp',
|
'audio/orchestra/api/Alsa.cpp',
|
||||||
@ -79,19 +79,19 @@ def create(target, module_name):
|
|||||||
'audio/orchestra/api/Pulse.cpp',
|
'audio/orchestra/api/Pulse.cpp',
|
||||||
'audio/orchestra/api/PulseDeviceList.cpp'
|
'audio/orchestra/api/PulseDeviceList.cpp'
|
||||||
])
|
])
|
||||||
my_module.add_optionnal_module_depend('alsa', ["c++", "-DORCHESTRA_BUILD_ALSA"])
|
my_module.add_optionnal_depend('alsa', ["c++", "-DORCHESTRA_BUILD_ALSA"])
|
||||||
my_module.add_optionnal_module_depend('jack', ["c++", "-DORCHESTRA_BUILD_JACK"])
|
my_module.add_optionnal_depend('jack', ["c++", "-DORCHESTRA_BUILD_JACK"])
|
||||||
my_module.add_optionnal_module_depend('pulse', ["c++", "-DORCHESTRA_BUILD_PULSE"])
|
my_module.add_optionnal_depend('pulse', ["c++", "-DORCHESTRA_BUILD_PULSE"])
|
||||||
elif target.config_based_on=="MacOs":
|
elif target.config_based_on=="MacOs":
|
||||||
my_module.add_src_file([
|
my_module.add_src_file([
|
||||||
'audio/orchestra/api/Core.cpp'
|
'audio/orchestra/api/Core.cpp'
|
||||||
])
|
])
|
||||||
# MacOsX core
|
# 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":
|
elif target.config_based_on=="IOs":
|
||||||
my_module.add_src_file('audio/orchestra/api/CoreIos.mm')
|
my_module.add_src_file('audio/orchestra/api/CoreIos.mm')
|
||||||
# IOsX core
|
# 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":
|
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/OrchestraConstants.java')
|
||||||
my_module.add_src_file('android/org/musicdsp/orchestra/OrchestraManagerCallback.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
|
# create inter language interface
|
||||||
my_module.add_src_file('org.musicdsp.orchestra.OrchestraConstants.javah')
|
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_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_export_flag('c++', ['-DORCHESTRA_BUILD_JAVA'])
|
||||||
|
|
||||||
my_module.add_src_file('audio/orchestra/api/Android.cpp')
|
my_module.add_src_file('audio/orchestra/api/Android.cpp')
|
||||||
|
@ -31,7 +31,7 @@ def create(target, module_name):
|
|||||||
my_module.add_src_file([
|
my_module.add_src_file([
|
||||||
'orchestra-in.cpp'
|
'orchestra-in.cpp'
|
||||||
])
|
])
|
||||||
my_module.add_module_depend(['audio-orchestra', 'test-debug'])
|
my_module.add_depend(['audio-orchestra', 'test-debug'])
|
||||||
return my_module
|
return my_module
|
||||||
|
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ def create(target, module_name):
|
|||||||
my_module.add_src_file([
|
my_module.add_src_file([
|
||||||
'orchestra-list.cpp'
|
'orchestra-list.cpp'
|
||||||
])
|
])
|
||||||
my_module.add_module_depend(['audio-orchestra', 'test-debug'])
|
my_module.add_depend(['audio-orchestra', 'test-debug'])
|
||||||
return my_module
|
return my_module
|
||||||
|
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ def create(target, module_name):
|
|||||||
my_module.add_src_file([
|
my_module.add_src_file([
|
||||||
'orchestra-out.cpp'
|
'orchestra-out.cpp'
|
||||||
])
|
])
|
||||||
my_module.add_module_depend(['audio-orchestra', 'test-debug'])
|
my_module.add_depend(['audio-orchestra', 'test-debug'])
|
||||||
return my_module
|
return my_module
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user