From ccc8460635215aa89a56642bd18b9112b443ea73 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Tue, 29 Sep 2015 21:12:20 +0200 Subject: [PATCH] [DEV] correct playing of audio music --- audio/ess/LoadedFile.cpp | 6 +++--- audio/ess/music.cpp | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/audio/ess/LoadedFile.cpp b/audio/ess/LoadedFile.cpp index 1d09011..7a2cec0 100644 --- a/audio/ess/LoadedFile.cpp +++ b/audio/ess/LoadedFile.cpp @@ -30,10 +30,10 @@ void audio::ess::LoadedFile::threadCall() { } void audio::ess::LoadedFile::decode() { - EWOLSA_INFO("Start decode OGG : " << m_file); + EWOLSA_ERROR("Start decode OGG : " << m_file); m_data = audio::ess::ogg::loadAudioFile(m_file, m_nbChanRequested); m_nbSamples = m_data.size(); - EWOLSA_INFO("End decode OGG : " << m_file << " size=" << m_nbSamples); + EWOLSA_ERROR("End decode OGG : " << m_file << " size=" << m_nbSamples); } audio::ess::LoadedFile::LoadedFile(const std::string& _fileName, int8_t _nbChanRequested) : @@ -57,7 +57,7 @@ audio::ess::LoadedFile::LoadedFile(const std::string& _fileName, int8_t _nbChanR #else m_thread = std11::make_shared(&audio::ess::LoadedFile::threadCall, this); if (m_thread == nullptr) { - GALE_ERROR("Can not create thread ..."); + EWOLSA_ERROR("Can not create thread ..."); return; } #endif diff --git a/audio/ess/music.cpp b/audio/ess/music.cpp index 20d8daa..7bdc4f8 100644 --- a/audio/ess/music.cpp +++ b/audio/ess/music.cpp @@ -68,7 +68,6 @@ void audio::ess::Music::onDataNeeded(void* _data, if (_format != audio::format_int16) { EWOLSA_ERROR("call wrong type ... (need int16_t)"); } - return; std::unique_lock lock(m_mutex); if (m_current != m_next) { EWOLSA_INFO("change track " << (m_current==nullptr?-1:m_current->getUId()) << " ==> " << (m_next==nullptr?-1:m_next->getUId())); @@ -86,7 +85,7 @@ void audio::ess::Music::onDataNeeded(void* _data, processTimeMax = std::max(0, processTimeMax); int16_t * pointer = static_cast(_data); int16_t * newData = &m_current->m_data[m_position]; - EWOLSA_DEBUG("AUDIO : Play slot... nb sample : " << processTimeMax << " map=" << _map << " _nbChunk=" << _nbChunk); + EWOLSA_VERBOSE("AUDIO : Play slot... nb sample : " << processTimeMax << " map=" << _map << " _nbChunk=" << _nbChunk); for (int32_t iii=0; iii