[DEV] update to the new river API
This commit is contained in:
parent
23467923b4
commit
3c60592630
@ -8,13 +8,14 @@
|
||||
|
||||
|
||||
#include <etk/types.h>
|
||||
#include <etk/thread/tools.h>
|
||||
#include <ewolsa/debug.h>
|
||||
#include <ewolsa/LoadedFile.h>
|
||||
#include <ewolsa/decWav.h>
|
||||
#include <ewolsa/decOgg.h>
|
||||
|
||||
static void threadCallback2(void* _userData) {
|
||||
etk::log::setThreadName("ewolSA decoder");
|
||||
etk::thread::setName("ewolSA decoder");
|
||||
ewolsa::LoadedFile* decodeFile = reinterpret_cast<ewolsa::LoadedFile*>(_userData);
|
||||
decodeFile->decode();
|
||||
}
|
||||
|
@ -36,14 +36,14 @@ class OutputInterface {
|
||||
return;
|
||||
}
|
||||
// set callback mode ...
|
||||
m_interface->setOutputCallback(1024,
|
||||
std::bind(&OutputInterface::onDataNeeded,
|
||||
m_interface->setOutputCallback(std::bind(&OutputInterface::onDataNeeded,
|
||||
this,
|
||||
std::placeholders::_1,
|
||||
std::placeholders::_2,
|
||||
std::placeholders::_3,
|
||||
std::placeholders::_4,
|
||||
std::placeholders::_5));
|
||||
std::placeholders::_5,
|
||||
std::placeholders::_6));
|
||||
m_interface->start();
|
||||
}
|
||||
~OutputInterface() {
|
||||
@ -54,12 +54,13 @@ class OutputInterface {
|
||||
m_interface.reset();
|
||||
m_manager.reset();
|
||||
}
|
||||
void onDataNeeded(const std::chrono::system_clock::time_point& _playTime,
|
||||
void onDataNeeded(void* _data,
|
||||
const std::chrono::system_clock::time_point& _playTime,
|
||||
const size_t& _nbChunk,
|
||||
const std::vector<audio::channel>& _map,
|
||||
void* _data,
|
||||
enum audio::format _type) {
|
||||
if (_type != audio::format_int16) {
|
||||
enum audio::format _format,
|
||||
uint32_t _frequency,
|
||||
const std::vector<audio::channel>& _map) {
|
||||
if (_format != audio::format_int16) {
|
||||
EWOLSA_ERROR("call wrong type ... (need int16_t)");
|
||||
}
|
||||
// call music
|
||||
|
Loading…
x
Reference in New Issue
Block a user