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