[BUILD] update new lutin 0.5.3

This commit is contained in:
Edouard DUPIN 2015-05-08 22:36:02 +02:00
parent 4ba07ac087
commit f2f57d4081
7 changed files with 32 additions and 58 deletions

View File

@ -9,20 +9,12 @@
#include <audio/river/io/NodePortAudio.h>
#include <audio/river/debug.h>
#include <etk/memory.h>
#include <audio/Time.h>
#include <audio/Duration.h>
#undef __class__
#define __class__ "io::NodePortAudio"
static std::string asString(const audio::Time& tp) {
// convert to system time:
std::time_t t = std11::chrono::system_clock::to_time_t(tp);
// convert in human string
std::string ts = std::ctime(&t);
// remove \n
ts.resize(ts.size()-1);
return ts;
}
static int portAudioStreamCallback(const void *_input,
void *_output,
unsigned long _frameCount,
@ -32,10 +24,10 @@ static int portAudioStreamCallback(const void *_input,
audio::river::io::NodePortAudio* myClass = reinterpret_cast<audio::river::io::NodePortAudio*>(_userData);
int64_t sec = int64_t(_timeInfo->inputBufferAdcTime);
int64_t nsec = (_timeInfo->inputBufferAdcTime-double(sec))*1000000000LL;
audio::Time timeInput = std11::chrono::system_clock::from_time_t(sec) + audio::Duration(nsec);
audio::Time timeInput(sec, nsec);
sec = int64_t(_timeInfo->outputBufferDacTime);
nsec = (_timeInfo->outputBufferDacTime-double(sec))*1000000000LL;
audio::Time timeOutput = std11::chrono::system_clock::from_time_t(sec) + audio::Duration(nsec);
audio::Time timeOutput(sec, nsec);
return myClass->duplexCallback(_input,
timeInput,
_output,

View File

@ -1,7 +1,6 @@
#!/usr/bin/python
import lutinModule as module
import lutinTools as tools
import lutinDebug as debug
import lutin.module as module
import lutin.tools as tools
def get_desc():
return "audio_river : Multi-nodal audio interface"
@ -23,8 +22,8 @@ def create(target):
'audio/river/io/NodeMuxer.cpp',
'audio/river/io/Manager.cpp'
])
myModule.add_optionnal_module_depend('audio_orchestra', "AUDIO_RIVER_BUILD_ORCHESTRA")
myModule.add_optionnal_module_depend('portaudio', "AUDIO_RIVER_BUILD_PORTAUDIO")
myModule.add_optionnal_module_depend('audio_orchestra', ["c++", "-DAUDIO_RIVER_BUILD_ORCHESTRA"])
myModule.add_optionnal_module_depend('portaudio', ["c++", "-DAUDIO_RIVER_BUILD_PORTAUDIO"])
myModule.add_module_depend(['audio', 'audio_drain', 'ejson'])
myModule.add_export_path(tools.get_current_path(__file__))

View File

@ -1,7 +1,6 @@
#!/usr/bin/python
import lutinModule as module
import lutinTools as tools
import lutinDebug as debug
import lutin.module as module
import lutin.tools as tools
def get_desc():
return "river_test : Multi-nodal audio interface test"
@ -9,21 +8,11 @@ def get_desc():
def create(target):
myModule = module.Module(__file__, 'audio_river_test', 'BINARY')
myModule.add_src_file([
'test/main.cpp',
'test/debug.cpp'
])
myModule.add_module_depend(['audio_river', 'gtest', 'etk'])
return myModule

View File

@ -1,7 +1,6 @@
#!/usr/bin/python
import lutinModule as module
import lutinTools as tools
import lutinDebug as debug
import lutin.module as module
import lutin.tools as tools
def get_desc():
return "river_sample_read : Read some data"
@ -9,12 +8,10 @@ def get_desc():
def create(target):
myModule = module.Module(__file__, 'river_sample_read', 'BINARY')
myModule.add_src_file([
'main.cpp',
])
myModule.add_module_depend(['river', 'etk'])
myModule.add_module_depend(['audio_river', 'etk'])
return myModule

View File

@ -4,9 +4,9 @@
* @license APACHE v2.0 (see license file)
*/
#include <river/river.h>
#include <river/Manager.h>
#include <river/Interface.h>
#include <audio/river/river.h>
#include <audio/river/Manager.h>
#include <audio/river/Interface.h>
#include <etk/etk.h>
#include <unistd.h>
@ -27,7 +27,7 @@ static const std::string configurationRiver =
"}\n";
void onDataReceived(const void* _data,
const std11::chrono::system_clock::time_point& _time,
const audio::Time& _time,
size_t _nbChunk,
enum audio::format _format,
uint32_t _frequency,
@ -44,7 +44,7 @@ void onDataReceived(const void* _data,
std::cout << "Get data ... average=" << int32_t(value) << std::endl;
}
int main(int _argc, char **_argv) {
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) {
@ -57,11 +57,11 @@ int main(int _argc, char **_argv) {
}
}
// initialize river interface
river::initString(configurationRiver);
audio::river::initString(configurationRiver);
// Create the River manager for tha application or part of the application.
std11::shared_ptr<river::Manager> manager = river::Manager::create("river_sample_read");
std11::shared_ptr<audio::river::Manager> manager = audio::river::Manager::create("river_sample_read");
// create interface:
std11::shared_ptr<river::Interface> interface;
std11::shared_ptr<audio::river::Interface> interface;
//Get the generic input:
interface = manager->createInput(48000,
std::vector<audio::channel>(),

View File

@ -1,7 +1,6 @@
#!/usr/bin/python
import lutinModule as module
import lutinTools as tools
import lutinDebug as debug
import lutin.module as module
import lutin.tools as tools
def get_desc():
return "river_sample_write : Write some data"
@ -9,12 +8,10 @@ def get_desc():
def create(target):
myModule = module.Module(__file__, 'river_sample_write', 'BINARY')
myModule.add_src_file([
'main.cpp',
])
myModule.add_module_depend(['river', 'etk'])
myModule.add_module_depend(['audio_river', 'etk'])
return myModule

View File

@ -4,9 +4,9 @@
* @license APACHE v2.0 (see license file)
*/
#include <river/river.h>
#include <river/Manager.h>
#include <river/Interface.h>
#include <audio/river/river.h>
#include <audio/river/Manager.h>
#include <audio/river/Interface.h>
#include <etk/etk.h>
#include <unistd.h>
@ -28,7 +28,7 @@ static const std::string configurationRiver =
"}\n";
void onDataNeeded(void* _data,
const std11::chrono::system_clock::time_point& _time,
const audio::Time& _time,
size_t _nbChunk,
enum audio::format _format,
uint32_t _frequency,
@ -50,7 +50,7 @@ void onDataNeeded(void* _data,
}
}
int main(int _argc, char **_argv) {
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) {
@ -63,11 +63,11 @@ int main(int _argc, char **_argv) {
}
}
// initialize river interface
river::initString(configurationRiver);
audio::river::initString(configurationRiver);
// Create the River manager for tha application or part of the application.
std11::shared_ptr<river::Manager> manager = river::Manager::create("river_sample_read");
std11::shared_ptr<audio::river::Manager> manager = audio::river::Manager::create("river_sample_read");
// create interface:
std11::shared_ptr<river::Interface> interface;
std11::shared_ptr<audio::river::Interface> interface;
//Get the generic input:
interface = manager->createOutput(48000,
std::vector<audio::channel>(),