[DEV] continue removing stl
This commit is contained in:
@@ -53,7 +53,7 @@ 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) {
|
||||
std::string data = _argv[iii];
|
||||
etk::String data = _argv[iii];
|
||||
if ( data == "-h"
|
||||
|| data == "--help") {
|
||||
TEST_PRINT("Help : ");
|
||||
|
@@ -16,15 +16,15 @@ namespace river_test_aec {
|
||||
ememory::SharedPtr<audio::river::Interface> m_interfaceIn;
|
||||
audio::drain::CircularBuffer m_buffer;
|
||||
public:
|
||||
Linker(ememory::SharedPtr<audio::river::Manager> _manager, const std::string& _input, const std::string& _output) :
|
||||
Linker(ememory::SharedPtr<audio::river::Manager> _manager, const etk::String& _input, const etk::String& _output) :
|
||||
m_manager(_manager) {
|
||||
//Set stereo output:
|
||||
std::vector<audio::channel> channelMap;
|
||||
etk::Vector<audio::channel> channelMap;
|
||||
if (false) { //"speaker" == _output) {
|
||||
channelMap.push_back(audio::channel_frontCenter);
|
||||
channelMap.pushBack(audio::channel_frontCenter);
|
||||
} else {
|
||||
channelMap.push_back(audio::channel_frontLeft);
|
||||
channelMap.push_back(audio::channel_frontRight);
|
||||
channelMap.pushBack(audio::channel_frontLeft);
|
||||
channelMap.pushBack(audio::channel_frontRight);
|
||||
}
|
||||
m_buffer.setCapacity(std::chrono::milliseconds(2000), sizeof(int16_t)*channelMap.size(), 48000);
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace river_test_aec {
|
||||
size_t _nbChunk,
|
||||
enum audio::format _format,
|
||||
uint32_t _frequency,
|
||||
const std::vector<audio::channel>& _map) {
|
||||
const etk::Vector<audio::channel>& _map) {
|
||||
if (_format != audio::format_int16) {
|
||||
TEST_ERROR("call wrong type ... (need int16_t)");
|
||||
}
|
||||
@@ -85,7 +85,7 @@ namespace river_test_aec {
|
||||
size_t _nbChunk,
|
||||
enum audio::format _format,
|
||||
uint32_t _frequency,
|
||||
const std::vector<audio::channel>& _map) {
|
||||
const etk::Vector<audio::channel>& _map) {
|
||||
if (_format != audio::format_int16) {
|
||||
TEST_ERROR("call wrong type ... (need int16_t)");
|
||||
}
|
||||
@@ -118,7 +118,7 @@ namespace river_test_aec {
|
||||
}
|
||||
};
|
||||
|
||||
static const std::string configurationRiver =
|
||||
static const etk::String configurationRiver =
|
||||
"{\n"
|
||||
" speaker:{\n"
|
||||
" io:'output',\n"
|
||||
|
@@ -22,7 +22,7 @@ namespace river_test_echo_delay {
|
||||
audio::Time m_currentTick;
|
||||
int32_t m_stateFB;
|
||||
int32_t m_stateMic;
|
||||
std::vector<uint64_t> m_delayListMic;
|
||||
etk::Vector<uint64_t> m_delayListMic;
|
||||
bool m_estimateVolumeInput;
|
||||
int16_t m_volumeInputMax;
|
||||
int16_t m_volumeInputMin;
|
||||
@@ -39,7 +39,7 @@ namespace river_test_echo_delay {
|
||||
m_estimateVolumeInput(true),
|
||||
m_gain(-40) {
|
||||
//Set stereo output:
|
||||
std::vector<audio::channel> channelMap;
|
||||
etk::Vector<audio::channel> channelMap;
|
||||
m_interfaceOut = m_manager->createOutput(48000,
|
||||
channelMap,
|
||||
audio::format_int16,
|
||||
@@ -58,7 +58,7 @@ namespace river_test_echo_delay {
|
||||
std::placeholders::_5,
|
||||
std::placeholders::_6));
|
||||
m_interfaceOut->addVolumeGroup("FLOW");
|
||||
m_interfaceOut->setParameter("volume", "FLOW", etk::to_string(m_gain) + "dB");
|
||||
m_interfaceOut->setParameter("volume", "FLOW", etk::toString(m_gain) + "dB");
|
||||
|
||||
m_interfaceIn = m_manager->createInput(48000,
|
||||
channelMap,
|
||||
@@ -103,7 +103,7 @@ namespace river_test_echo_delay {
|
||||
size_t _nbChunk,
|
||||
enum audio::format _format,
|
||||
uint32_t _frequency,
|
||||
const std::vector<audio::channel>& _map) {
|
||||
const etk::Vector<audio::channel>& _map) {
|
||||
int16_t* data = static_cast<int16_t*>(_data);
|
||||
double baseCycle = 2.0*M_PI/(double)48000 * m_freq;
|
||||
if (m_estimateVolumeInput == true) {
|
||||
@@ -186,7 +186,7 @@ namespace river_test_echo_delay {
|
||||
size_t _nbChunk,
|
||||
enum audio::format _format,
|
||||
uint32_t _frequency,
|
||||
const std::vector<audio::channel>& _map) {
|
||||
const etk::Vector<audio::channel>& _map) {
|
||||
if (_format != audio::format_int16) {
|
||||
TEST_ERROR("call wrong type ... (need int16_t)");
|
||||
}
|
||||
@@ -241,7 +241,7 @@ namespace river_test_echo_delay {
|
||||
size_t _nbChunk,
|
||||
enum audio::format _format,
|
||||
uint32_t _frequency,
|
||||
const std::vector<audio::channel>& _map) {
|
||||
const etk::Vector<audio::channel>& _map) {
|
||||
if (_format != audio::format_int16) {
|
||||
TEST_ERROR("call wrong type ... (need int16_t)");
|
||||
}
|
||||
@@ -253,8 +253,8 @@ namespace river_test_echo_delay {
|
||||
if (m_stateMic <= 40) {
|
||||
for (size_t iii=0; iii<_nbChunk*_map.size(); ++iii) {
|
||||
//TEST_INFO("value=" << data[iii]);
|
||||
m_volumeInputMax = std::max(int16_t(data[iii]), m_volumeInputMax);
|
||||
m_volumeInputMin = std::min(int16_t(data[iii]), m_volumeInputMin);
|
||||
m_volumeInputMax = etk::max(int16_t(data[iii]), m_volumeInputMax);
|
||||
m_volumeInputMin = etk::min(int16_t(data[iii]), m_volumeInputMin);
|
||||
}
|
||||
if (m_stateMic == 40) {
|
||||
m_volumeInputMax *= 2;
|
||||
@@ -265,8 +265,8 @@ namespace river_test_echo_delay {
|
||||
int16_t valueMin = 0;
|
||||
for (size_t iii=0; iii<_nbChunk*_map.size(); ++iii) {
|
||||
//TEST_INFO("value=" << data[iii]);
|
||||
valueMax = std::max(int16_t(data[iii]), valueMax);
|
||||
valueMin = std::min(int16_t(data[iii]), valueMin);
|
||||
valueMax = etk::max(int16_t(data[iii]), valueMax);
|
||||
valueMin = etk::min(int16_t(data[iii]), valueMin);
|
||||
}
|
||||
if ( valueMax > m_volumeInputMax
|
||||
&& valueMin < m_volumeInputMin
|
||||
@@ -277,8 +277,8 @@ namespace river_test_echo_delay {
|
||||
)
|
||||
) {
|
||||
m_gain += 3.0f;
|
||||
m_gain = std::min(m_gain, 0.0f);
|
||||
m_interfaceOut->setParameter("volume", "FLOW", etk::to_string(m_gain) + "dB");
|
||||
m_gain = etk::min(m_gain, 0.0f);
|
||||
m_interfaceOut->setParameter("volume", "FLOW", etk::toString(m_gain) + "dB");
|
||||
TEST_INFO("Set detection volume : " << m_gain << " m_stateMic=" << m_stateMic);
|
||||
m_stateMic = 3;
|
||||
m_phase = -1;
|
||||
@@ -291,8 +291,8 @@ namespace river_test_echo_delay {
|
||||
}
|
||||
// just update volume
|
||||
m_gain += 1.0f;
|
||||
m_gain = std::min(m_gain, 0.0f);
|
||||
m_interfaceOut->setParameter("volume", "FLOW", etk::to_string(m_gain) + "dB");
|
||||
m_gain = etk::min(m_gain, 0.0f);
|
||||
m_interfaceOut->setParameter("volume", "FLOW", etk::toString(m_gain) + "dB");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -320,7 +320,7 @@ namespace river_test_echo_delay {
|
||||
audio::Duration delay = time-m_currentTick;
|
||||
int32_t sampleDalay = (delay.count()*_frequency)/1000000000LL;
|
||||
TEST_WARNING("MIC: 1 time detected: " << time << " delay = " << float(delay.count())/1000.0f << "µs samples=" << sampleDalay);
|
||||
m_delayListMic.push_back(delay.count());
|
||||
m_delayListMic.pushBack(delay.count());
|
||||
}
|
||||
} else if (m_stateMic == 2) {
|
||||
// inverse phase
|
||||
@@ -333,7 +333,7 @@ namespace river_test_echo_delay {
|
||||
audio::Duration delay = time-m_currentTick;
|
||||
int32_t sampleDalay = (delay.count()*_frequency)/1000000000LL;
|
||||
TEST_WARNING("MIC: 2 time detected: " << time << " delay = " << float(delay.count())/1000.0f << "µs samples=" << sampleDalay);
|
||||
m_delayListMic.push_back(delay.count());
|
||||
m_delayListMic.pushBack(delay.count());
|
||||
}
|
||||
} else if (m_stateMic == 3) {
|
||||
// TODO : Detect the pic ...
|
||||
@@ -379,7 +379,7 @@ namespace river_test_echo_delay {
|
||||
}
|
||||
};
|
||||
|
||||
static const std::string configurationRiver =
|
||||
static const etk::String configurationRiver =
|
||||
"{\n"
|
||||
" speaker:{\n"
|
||||
" io:'output',\n"
|
||||
|
@@ -6,7 +6,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace river_test_format {
|
||||
static const std::string configurationRiver =
|
||||
static const etk::String configurationRiver =
|
||||
"{\n"
|
||||
" speaker:{\n"
|
||||
" io:'output',\n"
|
||||
@@ -41,17 +41,17 @@ namespace river_test_format {
|
||||
m_nbChannels(_nbChannels),
|
||||
m_generateFreq(550.0f) {
|
||||
//Set stereo output:
|
||||
std::vector<audio::channel> channelMap;
|
||||
etk::Vector<audio::channel> channelMap;
|
||||
if (m_nbChannels == 1) {
|
||||
channelMap.push_back(audio::channel_frontCenter);
|
||||
channelMap.pushBack(audio::channel_frontCenter);
|
||||
} else if (m_nbChannels == 2) {
|
||||
channelMap.push_back(audio::channel_frontLeft);
|
||||
channelMap.push_back(audio::channel_frontRight);
|
||||
channelMap.pushBack(audio::channel_frontLeft);
|
||||
channelMap.pushBack(audio::channel_frontRight);
|
||||
} else if (m_nbChannels == 4) {
|
||||
channelMap.push_back(audio::channel_frontLeft);
|
||||
channelMap.push_back(audio::channel_frontRight);
|
||||
channelMap.push_back(audio::channel_rearLeft);
|
||||
channelMap.push_back(audio::channel_rearRight);
|
||||
channelMap.pushBack(audio::channel_frontLeft);
|
||||
channelMap.pushBack(audio::channel_frontRight);
|
||||
channelMap.pushBack(audio::channel_rearLeft);
|
||||
channelMap.pushBack(audio::channel_rearRight);
|
||||
} else {
|
||||
TEST_ERROR("Can not generate with channel != 1,2,4");
|
||||
return;
|
||||
@@ -80,7 +80,7 @@ namespace river_test_format {
|
||||
size_t _nbChunk,
|
||||
enum audio::format _format,
|
||||
uint32_t _frequency,
|
||||
const std::vector<audio::channel>& _map) {
|
||||
const etk::Vector<audio::channel>& _map) {
|
||||
//TEST_DEBUG("Get data ... " << _format << " map=" << _map << " chunk=" << _nbChunk);
|
||||
double baseCycle = 2.0*M_PI/double(m_freq) * double(m_generateFreq);
|
||||
if (_format == audio::format_int16) {
|
||||
@@ -197,28 +197,28 @@ namespace river_test_format {
|
||||
ememory::SharedPtr<audio::river::Manager> manager;
|
||||
manager = audio::river::Manager::create("testApplication");
|
||||
TEST_INFO("test convert flaot to output (callback mode)");
|
||||
std::vector<float> listFreq;
|
||||
listFreq.push_back(4000);
|
||||
listFreq.push_back(8000);
|
||||
listFreq.push_back(16000);
|
||||
listFreq.push_back(32000);
|
||||
listFreq.push_back(48000);
|
||||
listFreq.push_back(48001);
|
||||
listFreq.push_back(64000);
|
||||
listFreq.push_back(96000);
|
||||
listFreq.push_back(11250);
|
||||
listFreq.push_back(2250);
|
||||
listFreq.push_back(44100);
|
||||
listFreq.push_back(88200);
|
||||
std::vector<int32_t> listChannel;
|
||||
listChannel.push_back(1);
|
||||
listChannel.push_back(2);
|
||||
listChannel.push_back(4);
|
||||
std::vector<audio::format> listFormat;
|
||||
listFormat.push_back(audio::format_int16);
|
||||
listFormat.push_back(audio::format_int16_on_int32);
|
||||
listFormat.push_back(audio::format_int32);
|
||||
listFormat.push_back(audio::format_float);
|
||||
etk::Vector<float> listFreq;
|
||||
listFreq.pushBack(4000);
|
||||
listFreq.pushBack(8000);
|
||||
listFreq.pushBack(16000);
|
||||
listFreq.pushBack(32000);
|
||||
listFreq.pushBack(48000);
|
||||
listFreq.pushBack(48001);
|
||||
listFreq.pushBack(64000);
|
||||
listFreq.pushBack(96000);
|
||||
listFreq.pushBack(11250);
|
||||
listFreq.pushBack(2250);
|
||||
listFreq.pushBack(44100);
|
||||
listFreq.pushBack(88200);
|
||||
etk::Vector<int32_t> listChannel;
|
||||
listChannel.pushBack(1);
|
||||
listChannel.pushBack(2);
|
||||
listChannel.pushBack(4);
|
||||
etk::Vector<audio::format> listFormat;
|
||||
listFormat.pushBack(audio::format_int16);
|
||||
listFormat.pushBack(audio::format_int16_on_int32);
|
||||
listFormat.pushBack(audio::format_int32);
|
||||
listFormat.pushBack(audio::format_float);
|
||||
for (size_t fff=0; fff<listFreq.size(); ++fff) {
|
||||
for (size_t ccc=0; ccc<listChannel.size(); ++ccc) {
|
||||
for (size_t iii=0; iii<listFormat.size(); ++iii) {
|
||||
|
@@ -18,9 +18,9 @@ namespace river_test_muxer {
|
||||
TestClass(ememory::SharedPtr<audio::river::Manager> _manager) :
|
||||
m_manager(_manager),
|
||||
m_phase(0) {
|
||||
std::vector<audio::channel> channelMap;
|
||||
channelMap.push_back(audio::channel_frontLeft);
|
||||
channelMap.push_back(audio::channel_frontRight);
|
||||
etk::Vector<audio::channel> channelMap;
|
||||
channelMap.pushBack(audio::channel_frontLeft);
|
||||
channelMap.pushBack(audio::channel_frontRight);
|
||||
m_interfaceOut = m_manager->createOutput(48000,
|
||||
channelMap,
|
||||
audio::format_int16,
|
||||
@@ -43,7 +43,7 @@ namespace river_test_muxer {
|
||||
|
||||
//Set stereo output:
|
||||
m_interfaceIn = m_manager->createInput(48000,
|
||||
std::vector<audio::channel>(),
|
||||
etk::Vector<audio::channel>(),
|
||||
audio::format_int16,
|
||||
"microphone-muxed");
|
||||
if(m_interfaceIn == nullptr) {
|
||||
@@ -67,7 +67,7 @@ namespace river_test_muxer {
|
||||
size_t _nbChunk,
|
||||
enum audio::format _format,
|
||||
uint32_t _frequency,
|
||||
const std::vector<audio::channel>& _map) {
|
||||
const etk::Vector<audio::channel>& _map) {
|
||||
int16_t* data = static_cast<int16_t*>(_data);
|
||||
double baseCycle = 2.0*M_PI/(double)48000 * 440;
|
||||
for (int32_t iii=0; iii<_nbChunk; iii++) {
|
||||
@@ -85,7 +85,7 @@ namespace river_test_muxer {
|
||||
size_t _nbChunk,
|
||||
enum audio::format _format,
|
||||
uint32_t _frequency,
|
||||
const std::vector<audio::channel>& _map) {
|
||||
const etk::Vector<audio::channel>& _map) {
|
||||
if (_format != audio::format_int16) {
|
||||
TEST_ERROR("call wrong type ... (need int16_t)");
|
||||
}
|
||||
@@ -109,7 +109,7 @@ namespace river_test_muxer {
|
||||
}
|
||||
};
|
||||
|
||||
static const std::string configurationRiver =
|
||||
static const etk::String configurationRiver =
|
||||
"{\n"
|
||||
" speaker:{\n"
|
||||
" io:'output',\n"
|
||||
|
@@ -13,13 +13,13 @@ namespace river_test_playback_callback {
|
||||
ememory::SharedPtr<audio::river::Interface> m_interface;
|
||||
double m_phase;
|
||||
public:
|
||||
testOutCallback(ememory::SharedPtr<audio::river::Manager> _manager, const std::string& _io="speaker") :
|
||||
testOutCallback(ememory::SharedPtr<audio::river::Manager> _manager, const etk::String& _io="speaker") :
|
||||
m_manager(_manager),
|
||||
m_phase(0) {
|
||||
//Set stereo output:
|
||||
std::vector<audio::channel> channelMap;
|
||||
channelMap.push_back(audio::channel_frontLeft);
|
||||
channelMap.push_back(audio::channel_frontRight);
|
||||
etk::Vector<audio::channel> channelMap;
|
||||
channelMap.pushBack(audio::channel_frontLeft);
|
||||
channelMap.pushBack(audio::channel_frontRight);
|
||||
m_interface = m_manager->createOutput(48000,
|
||||
channelMap,
|
||||
audio::format_int16,
|
||||
@@ -43,7 +43,7 @@ namespace river_test_playback_callback {
|
||||
size_t _nbChunk,
|
||||
enum audio::format _format,
|
||||
uint32_t _frequency,
|
||||
const std::vector<audio::channel>& _map) {
|
||||
const etk::Vector<audio::channel>& _map) {
|
||||
if (_format != audio::format_int16) {
|
||||
TEST_ERROR("call wrong type ... (need int16_t)");
|
||||
}
|
||||
@@ -71,7 +71,7 @@ namespace river_test_playback_callback {
|
||||
}
|
||||
};
|
||||
|
||||
static const std::string configurationRiver =
|
||||
static const etk::String configurationRiver =
|
||||
"{\n"
|
||||
" speaker:{\n"
|
||||
" io:'output',\n"
|
||||
|
@@ -6,7 +6,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace river_test_playback_write {
|
||||
static const std::string configurationRiver =
|
||||
static const etk::String configurationRiver =
|
||||
"{\n"
|
||||
" speaker:{\n"
|
||||
" io:'output',\n"
|
||||
@@ -24,15 +24,15 @@ namespace river_test_playback_write {
|
||||
|
||||
class testOutWrite {
|
||||
public:
|
||||
std::vector<audio::channel> m_channelMap;
|
||||
etk::Vector<audio::channel> m_channelMap;
|
||||
ememory::SharedPtr<audio::river::Manager> m_manager;
|
||||
ememory::SharedPtr<audio::river::Interface> m_interface;
|
||||
public:
|
||||
testOutWrite(ememory::SharedPtr<audio::river::Manager> _manager) :
|
||||
m_manager(_manager) {
|
||||
//Set stereo output:
|
||||
m_channelMap.push_back(audio::channel_frontLeft);
|
||||
m_channelMap.push_back(audio::channel_frontRight);
|
||||
m_channelMap.pushBack(audio::channel_frontLeft);
|
||||
m_channelMap.pushBack(audio::channel_frontRight);
|
||||
m_interface = m_manager->createOutput(48000,
|
||||
m_channelMap,
|
||||
audio::format_int16,
|
||||
@@ -49,7 +49,7 @@ namespace river_test_playback_write {
|
||||
return;
|
||||
}
|
||||
double phase=0;
|
||||
std::vector<int16_t> data;
|
||||
etk::Vector<int16_t> data;
|
||||
data.resize(1024*m_channelMap.size());
|
||||
double baseCycle = 2.0*M_PI/48000.0 * 440.0;
|
||||
// start fill buffer
|
||||
@@ -106,10 +106,10 @@ namespace river_test_playback_write {
|
||||
testOutWriteCallback(ememory::SharedPtr<audio::river::Manager> _manager) :
|
||||
m_manager(_manager),
|
||||
m_phase(0) {
|
||||
std::vector<audio::channel> channelMap;
|
||||
etk::Vector<audio::channel> channelMap;
|
||||
//Set stereo output:
|
||||
channelMap.push_back(audio::channel_frontLeft);
|
||||
channelMap.push_back(audio::channel_frontRight);
|
||||
channelMap.pushBack(audio::channel_frontLeft);
|
||||
channelMap.pushBack(audio::channel_frontRight);
|
||||
m_interface = m_manager->createOutput(48000,
|
||||
channelMap,
|
||||
audio::format_int16,
|
||||
@@ -131,11 +131,11 @@ namespace river_test_playback_write {
|
||||
size_t _nbChunk,
|
||||
enum audio::format _format,
|
||||
uint32_t _frequency,
|
||||
const std::vector<audio::channel>& _map) {
|
||||
const etk::Vector<audio::channel>& _map) {
|
||||
if (_format != audio::format_int16) {
|
||||
TEST_ERROR("call wrong type ... (need int16_t)");
|
||||
}
|
||||
std::vector<int16_t> data;
|
||||
etk::Vector<int16_t> data;
|
||||
data.resize(1024*_map.size());
|
||||
double baseCycle = 2.0*M_PI/48000.0 * 440.0;
|
||||
// start fill buffer
|
||||
|
@@ -8,7 +8,7 @@
|
||||
#include <test-debug/debug.hpp>
|
||||
|
||||
namespace river_test_record_callback {
|
||||
static const std::string configurationRiver =
|
||||
static const etk::String configurationRiver =
|
||||
"{\n"
|
||||
" microphone:{\n"
|
||||
" io:'input',\n"
|
||||
@@ -28,10 +28,10 @@ namespace river_test_record_callback {
|
||||
ememory::SharedPtr<audio::river::Manager> m_manager;
|
||||
ememory::SharedPtr<audio::river::Interface> m_interface;
|
||||
public:
|
||||
testInCallback(ememory::SharedPtr<audio::river::Manager> _manager, const std::string& _input="microphone") :
|
||||
testInCallback(ememory::SharedPtr<audio::river::Manager> _manager, const etk::String& _input="microphone") :
|
||||
m_manager(_manager) {
|
||||
//Set stereo output:
|
||||
std::vector<audio::channel> channelMap;
|
||||
etk::Vector<audio::channel> channelMap;
|
||||
m_interface = m_manager->createInput(48000,
|
||||
channelMap,
|
||||
audio::format_int16,
|
||||
@@ -55,7 +55,7 @@ namespace river_test_record_callback {
|
||||
size_t _nbChunk,
|
||||
enum audio::format _format,
|
||||
uint32_t _frequency,
|
||||
const std::vector<audio::channel>& _map) {
|
||||
const etk::Vector<audio::channel>& _map) {
|
||||
if (_format != audio::format_int16) {
|
||||
TEST_ERROR("call wrong type ... (need int16_t)");
|
||||
}
|
||||
|
@@ -6,7 +6,7 @@
|
||||
#pragma once
|
||||
|
||||
namespace river_test_volume {
|
||||
static const std::string configurationRiver =
|
||||
static const etk::String configurationRiver =
|
||||
"{\n"
|
||||
" speaker:{\n"
|
||||
" io:'output',\n"
|
||||
@@ -32,9 +32,9 @@ namespace river_test_volume {
|
||||
m_manager(_manager),
|
||||
m_phase(0) {
|
||||
//Set stereo output:
|
||||
std::vector<audio::channel> channelMap;
|
||||
channelMap.push_back(audio::channel_frontLeft);
|
||||
channelMap.push_back(audio::channel_frontRight);
|
||||
etk::Vector<audio::channel> channelMap;
|
||||
channelMap.pushBack(audio::channel_frontLeft);
|
||||
channelMap.pushBack(audio::channel_frontRight);
|
||||
m_interface = m_manager->createOutput(48000,
|
||||
channelMap,
|
||||
audio::format_int16,
|
||||
@@ -60,7 +60,7 @@ namespace river_test_volume {
|
||||
size_t _nbChunk,
|
||||
enum audio::format _format,
|
||||
uint32_t _frequency,
|
||||
const std::vector<audio::channel>& _map) {
|
||||
const etk::Vector<audio::channel>& _map) {
|
||||
int16_t* data = static_cast<int16_t*>(_data);
|
||||
double baseCycle = 2.0*M_PI/(double)48000 * (double)550;
|
||||
for (int32_t iii=0; iii<_nbChunk; iii++) {
|
||||
|
Reference in New Issue
Block a user