[DEV] update drain pipeline and add process output

This commit is contained in:
2015-02-08 15:11:02 +01:00
parent 8ee3cc7544
commit 8896c0b5de
5 changed files with 102 additions and 46 deletions

View File

@@ -156,7 +156,7 @@ class testOutCallback {
std::shared_ptr<river::Interface> m_interface;
double m_phase;
public:
testOutCallback(std::shared_ptr<river::Manager> _manager) :
testOutCallback(std::shared_ptr<river::Manager> _manager, const std::string& _io="speaker") :
m_manager(_manager),
m_phase(0) {
//Set stereo output:
@@ -166,7 +166,7 @@ class testOutCallback {
m_interface = m_manager->createOutput(48000,
channelMap,
audio::format_int16,
"speaker",
_io,
"WriteModeCallback");
// set callback mode ...
m_interface->setOutputCallback(1024,
@@ -211,7 +211,29 @@ TEST(TestALL, testOutputCallBack) {
manager = river::Manager::create("testApplication");
APPL_INFO("test output (callback mode)");
std::shared_ptr<testOutCallback> process = std::make_shared<testOutCallback>(manager);
std::shared_ptr<testOutCallback> process = std::make_shared<testOutCallback>(manager, "speaker");
process->run();
process.reset();
usleep(500000);
}
TEST(TestALL, testOutputCallBackPulse) {
std::shared_ptr<river::Manager> manager;
manager = river::Manager::create("testApplication");
APPL_INFO("test output (callback mode)");
std::shared_ptr<testOutCallback> process = std::make_shared<testOutCallback>(manager, "speaker-pulse");
process->run();
process.reset();
usleep(500000);
}
TEST(TestALL, testOutputCallBackJack) {
std::shared_ptr<river::Manager> manager;
manager = river::Manager::create("testApplication");
APPL_INFO("test output (callback mode)");
std::shared_ptr<testOutCallback> process = std::make_shared<testOutCallback>(manager, "speaker-jack");
process->run();
process.reset();
usleep(500000);