diff --git a/ewolsa/LoadedFile.cpp b/ewolsa/LoadedFile.cpp index 78658b4..14af0d0 100644 --- a/ewolsa/LoadedFile.cpp +++ b/ewolsa/LoadedFile.cpp @@ -19,7 +19,7 @@ static void* threadCallback2(void *_ptr) { return NULL; } -void ewolsa::LoadedFile::decode(void) { +void ewolsa::LoadedFile::decode() { m_data = ewolsa::ogg::loadAudioFile(m_file, m_nbChanRequested, m_nbSamples); } @@ -53,7 +53,7 @@ ewolsa::LoadedFile::LoadedFile(const std::string& _fileName, int8_t _nbChanReque } -ewolsa::LoadedFile::~LoadedFile(void) { +ewolsa::LoadedFile::~LoadedFile() { // TODO : wait end of thread... if (m_data != NULL) { delete[] m_data; diff --git a/ewolsa/LoadedFile.h b/ewolsa/LoadedFile.h index a5f1190..4aad05b 100644 --- a/ewolsa/LoadedFile.h +++ b/ewolsa/LoadedFile.h @@ -21,17 +21,17 @@ namespace ewolsa { pthread_t m_thread2; public: LoadedFile(const std::string& _fileName, int8_t _nbChanRequested=1); - ~LoadedFile(void); + ~LoadedFile(); std::string m_file; int32_t m_nbSamples; int32_t m_nbChanRequested; int32_t m_requestedTime; int16_t* m_data; public: - const std::string& getName(void) { + const std::string& getName() { return m_file; }; - void decode(void); + void decode(); }; }; diff --git a/ewolsa/debug.cpp b/ewolsa/debug.cpp index ff041ff..d099ab9 100644 --- a/ewolsa/debug.cpp +++ b/ewolsa/debug.cpp @@ -8,7 +8,7 @@ #include -int32_t ewolsa::getLogId(void) { +int32_t ewolsa::getLogId() { static int32_t g_val = etk::log::registerInstance("ewol-sa"); return g_val; } diff --git a/ewolsa/debug.h b/ewolsa/debug.h index 893d367..4ab0a1c 100644 --- a/ewolsa/debug.h +++ b/ewolsa/debug.h @@ -12,7 +12,7 @@ #include namespace ewolsa { - int32_t getLogId(void); + int32_t getLogId(); }; // TODO : Review this problem of multiple intanciation of "std::stringbuf sb" #define EWOLSA_BASE(info,data) \ diff --git a/ewolsa/effects.cpp b/ewolsa/effects.cpp index 13456ce..b712e56 100644 --- a/ewolsa/effects.cpp +++ b/ewolsa/effects.cpp @@ -43,7 +43,7 @@ class RequestPlay { m_playTime=0; m_freeSlot=false; }; - bool isFree(void) { + bool isFree() { return m_freeSlot; }; void play(int16_t * _bufferInterlace, int32_t _nbSample, int32_t _nbChannels) { @@ -81,12 +81,12 @@ class RequestPlay { std::vector ListEffects; std::vector ListEffectsPlaying; -void ewolsa::effects::init(void) { +void ewolsa::effects::init() { ewolsa::effects::volumeSet(0); ewolsa::effects::muteSet(false); } -void ewolsa::effects::unInit(void) { +void ewolsa::effects::unInit() { ewolsa::effects::volumeSet(-1000); ewolsa::effects::muteSet(true); } @@ -158,12 +158,12 @@ void ewolsa::effects::play(int32_t _effectId, float _xxx, float _yyy) { } -float ewolsa::effects::volumeGet(void) { +float ewolsa::effects::volumeGet() { return effectsVolume; } -static void uptateEffectVolume(void) { +static void uptateEffectVolume() { if (effectsMute == true) { effectsVolumeApply = 0; } else { @@ -182,7 +182,7 @@ void ewolsa::effects::volumeSet(float _newVolume) { } -bool ewolsa::effects::muteGet(void) { +bool ewolsa::effects::muteGet() { return effectsMute; } diff --git a/ewolsa/effects.h b/ewolsa/effects.h index faf6c7c..c664504 100644 --- a/ewolsa/effects.h +++ b/ewolsa/effects.h @@ -15,16 +15,16 @@ namespace ewolsa { // note effect is loaded in memory (then don't create long effect) and unload only when requested namespace effects { - void init(void); - void unInit(void); + void init(); + void unInit(); // note : support file (Mono, 16bit, 48kHz) : .raw or .wav (no encodage) or .ogg (decoded with tremor lib) int32_t add(const std::string& _file); void rm(int32_t _effectId); void play(int32_t _effectId, float _xxx=0, float _yyy=0); // in db - float volumeGet(void); + float volumeGet(); void volumeSet(float _newVolume); - bool muteGet(void); + bool muteGet(); void muteSet(bool _newMute); void getData(int16_t* _bufferInterlace, int32_t _nbSample, int32_t _nbChannels); diff --git a/ewolsa/ewolsa.cpp b/ewolsa/ewolsa.cpp index eca0f1d..c70d886 100644 --- a/ewolsa/ewolsa.cpp +++ b/ewolsa/ewolsa.cpp @@ -38,7 +38,7 @@ static int airtAudioCallBack(void *_outputBuffer, -void ewolsa::init(void) { +void ewolsa::init() { if (g_dac != NULL) { EWOLSA_ERROR("multiple init requested ... at the audio system ..."); return; @@ -66,7 +66,7 @@ void ewolsa::init(void) { } -void ewolsa::unInit(void) { +void ewolsa::unInit() { if (g_dac == NULL) { EWOLSA_ERROR("multiple un-init requested ... at the audio system ..."); return; diff --git a/ewolsa/ewolsa.h b/ewolsa/ewolsa.h index 3fa0c85..2e9420f 100644 --- a/ewolsa/ewolsa.h +++ b/ewolsa/ewolsa.h @@ -15,8 +15,8 @@ #include namespace ewolsa { - void init(void); - void unInit(void); + void init(); + void unInit(); }; #endif diff --git a/ewolsa/music.cpp b/ewolsa/music.cpp index 485e4e3..c5304fe 100644 --- a/ewolsa/music.cpp +++ b/ewolsa/music.cpp @@ -26,7 +26,7 @@ static std::vector musicListRead; static int32_t musicCurrentRead = -1; static int32_t musicNextRead = -1; -void ewolsa::music::init(void) { +void ewolsa::music::init() { ewolsa::music::volumeSet(0); ewolsa::music::muteSet(false); std::unique_lock lck(localMutex); @@ -43,7 +43,7 @@ void ewolsa::music::init(void) { musicListRead.clear(); } -void ewolsa::music::unInit(void) { +void ewolsa::music::unInit() { ewolsa::music::volumeSet(-1000); ewolsa::music::muteSet(true); std::unique_lock lck(localMutex); @@ -119,7 +119,7 @@ bool ewolsa::music::play(const std::string& _file) { } -bool ewolsa::music::stop(void) { +bool ewolsa::music::stop() { if (musicCurrentRead == -1) { EWOLSA_INFO("No current audio is playing"); return false; @@ -131,12 +131,12 @@ bool ewolsa::music::stop(void) { -float ewolsa::music::volumeGet(void) { +float ewolsa::music::volumeGet() { return musicVolume; } -static void uptateMusicVolume(void) { +static void uptateMusicVolume() { if (musicMute == true) { musicVolumeApply = 0; } else { @@ -156,7 +156,7 @@ void ewolsa::music::volumeSet(float _newVolume) { } -bool ewolsa::music::muteGet(void) { +bool ewolsa::music::muteGet() { return musicMute; } diff --git a/ewolsa/music.h b/ewolsa/music.h index 094fd3a..ee43ab2 100644 --- a/ewolsa/music.h +++ b/ewolsa/music.h @@ -14,18 +14,18 @@ namespace ewolsa { namespace music { - void init(void); - void unInit(void); + void init(); + void unInit(); void fading(int32_t _timeMs); void preLoad(const std::string& _file); bool play(const std::string& _file); - bool stop(void); + bool stop(); // in db - float volumeGet(void); + float volumeGet(); void volumeSet(float _newVolume); - bool muteGet(void); + bool muteGet(); void muteSet(bool _newMute); void getData(int16_t * _bufferInterlace, int32_t _nbSample, int32_t _nbChannels);