[STYLE] remove (void) in () to be c++ coherent
This commit is contained in:
parent
7bad0ec956
commit
9569402ace
@ -19,7 +19,7 @@ static void* threadCallback2(void *_ptr) {
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewolsa::LoadedFile::decode(void) {
|
void ewolsa::LoadedFile::decode() {
|
||||||
m_data = ewolsa::ogg::loadAudioFile(m_file, m_nbChanRequested, m_nbSamples);
|
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...
|
// TODO : wait end of thread...
|
||||||
if (m_data != NULL) {
|
if (m_data != NULL) {
|
||||||
delete[] m_data;
|
delete[] m_data;
|
||||||
|
@ -21,17 +21,17 @@ namespace ewolsa {
|
|||||||
pthread_t m_thread2;
|
pthread_t m_thread2;
|
||||||
public:
|
public:
|
||||||
LoadedFile(const std::string& _fileName, int8_t _nbChanRequested=1);
|
LoadedFile(const std::string& _fileName, int8_t _nbChanRequested=1);
|
||||||
~LoadedFile(void);
|
~LoadedFile();
|
||||||
std::string m_file;
|
std::string m_file;
|
||||||
int32_t m_nbSamples;
|
int32_t m_nbSamples;
|
||||||
int32_t m_nbChanRequested;
|
int32_t m_nbChanRequested;
|
||||||
int32_t m_requestedTime;
|
int32_t m_requestedTime;
|
||||||
int16_t* m_data;
|
int16_t* m_data;
|
||||||
public:
|
public:
|
||||||
const std::string& getName(void) {
|
const std::string& getName() {
|
||||||
return m_file;
|
return m_file;
|
||||||
};
|
};
|
||||||
void decode(void);
|
void decode();
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
#include <ewolsa/debug.h>
|
#include <ewolsa/debug.h>
|
||||||
|
|
||||||
int32_t ewolsa::getLogId(void) {
|
int32_t ewolsa::getLogId() {
|
||||||
static int32_t g_val = etk::log::registerInstance("ewol-sa");
|
static int32_t g_val = etk::log::registerInstance("ewol-sa");
|
||||||
return g_val;
|
return g_val;
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#include <etk/log.h>
|
#include <etk/log.h>
|
||||||
|
|
||||||
namespace ewolsa {
|
namespace ewolsa {
|
||||||
int32_t getLogId(void);
|
int32_t getLogId();
|
||||||
};
|
};
|
||||||
// TODO : Review this problem of multiple intanciation of "std::stringbuf sb"
|
// TODO : Review this problem of multiple intanciation of "std::stringbuf sb"
|
||||||
#define EWOLSA_BASE(info,data) \
|
#define EWOLSA_BASE(info,data) \
|
||||||
|
@ -43,7 +43,7 @@ class RequestPlay {
|
|||||||
m_playTime=0;
|
m_playTime=0;
|
||||||
m_freeSlot=false;
|
m_freeSlot=false;
|
||||||
};
|
};
|
||||||
bool isFree(void) {
|
bool isFree() {
|
||||||
return m_freeSlot;
|
return m_freeSlot;
|
||||||
};
|
};
|
||||||
void play(int16_t * _bufferInterlace, int32_t _nbSample, int32_t _nbChannels) {
|
void play(int16_t * _bufferInterlace, int32_t _nbSample, int32_t _nbChannels) {
|
||||||
@ -81,12 +81,12 @@ class RequestPlay {
|
|||||||
std::vector<ewolsa::LoadedFile*> ListEffects;
|
std::vector<ewolsa::LoadedFile*> ListEffects;
|
||||||
std::vector<RequestPlay*> ListEffectsPlaying;
|
std::vector<RequestPlay*> ListEffectsPlaying;
|
||||||
|
|
||||||
void ewolsa::effects::init(void) {
|
void ewolsa::effects::init() {
|
||||||
ewolsa::effects::volumeSet(0);
|
ewolsa::effects::volumeSet(0);
|
||||||
ewolsa::effects::muteSet(false);
|
ewolsa::effects::muteSet(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewolsa::effects::unInit(void) {
|
void ewolsa::effects::unInit() {
|
||||||
ewolsa::effects::volumeSet(-1000);
|
ewolsa::effects::volumeSet(-1000);
|
||||||
ewolsa::effects::muteSet(true);
|
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;
|
return effectsVolume;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void uptateEffectVolume(void) {
|
static void uptateEffectVolume() {
|
||||||
if (effectsMute == true) {
|
if (effectsMute == true) {
|
||||||
effectsVolumeApply = 0;
|
effectsVolumeApply = 0;
|
||||||
} else {
|
} else {
|
||||||
@ -182,7 +182,7 @@ void ewolsa::effects::volumeSet(float _newVolume) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool ewolsa::effects::muteGet(void) {
|
bool ewolsa::effects::muteGet() {
|
||||||
return effectsMute;
|
return effectsMute;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,16 +15,16 @@
|
|||||||
namespace ewolsa {
|
namespace ewolsa {
|
||||||
// note effect is loaded in memory (then don't create long effect) and unload only when requested
|
// note effect is loaded in memory (then don't create long effect) and unload only when requested
|
||||||
namespace effects {
|
namespace effects {
|
||||||
void init(void);
|
void init();
|
||||||
void unInit(void);
|
void unInit();
|
||||||
// note : support file (Mono, 16bit, 48kHz) : .raw or .wav (no encodage) or .ogg (decoded with tremor lib)
|
// note : support file (Mono, 16bit, 48kHz) : .raw or .wav (no encodage) or .ogg (decoded with tremor lib)
|
||||||
int32_t add(const std::string& _file);
|
int32_t add(const std::string& _file);
|
||||||
void rm(int32_t _effectId);
|
void rm(int32_t _effectId);
|
||||||
void play(int32_t _effectId, float _xxx=0, float _yyy=0);
|
void play(int32_t _effectId, float _xxx=0, float _yyy=0);
|
||||||
// in db
|
// in db
|
||||||
float volumeGet(void);
|
float volumeGet();
|
||||||
void volumeSet(float _newVolume);
|
void volumeSet(float _newVolume);
|
||||||
bool muteGet(void);
|
bool muteGet();
|
||||||
void muteSet(bool _newMute);
|
void muteSet(bool _newMute);
|
||||||
void getData(int16_t* _bufferInterlace, int32_t _nbSample, int32_t _nbChannels);
|
void getData(int16_t* _bufferInterlace, int32_t _nbSample, int32_t _nbChannels);
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ static int airtAudioCallBack(void *_outputBuffer,
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void ewolsa::init(void) {
|
void ewolsa::init() {
|
||||||
if (g_dac != NULL) {
|
if (g_dac != NULL) {
|
||||||
EWOLSA_ERROR("multiple init requested ... at the audio system ...");
|
EWOLSA_ERROR("multiple init requested ... at the audio system ...");
|
||||||
return;
|
return;
|
||||||
@ -66,7 +66,7 @@ void ewolsa::init(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ewolsa::unInit(void) {
|
void ewolsa::unInit() {
|
||||||
if (g_dac == NULL) {
|
if (g_dac == NULL) {
|
||||||
EWOLSA_ERROR("multiple un-init requested ... at the audio system ...");
|
EWOLSA_ERROR("multiple un-init requested ... at the audio system ...");
|
||||||
return;
|
return;
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
#include <ewolsa/music.h>
|
#include <ewolsa/music.h>
|
||||||
|
|
||||||
namespace ewolsa {
|
namespace ewolsa {
|
||||||
void init(void);
|
void init();
|
||||||
void unInit(void);
|
void unInit();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -26,7 +26,7 @@ static std::vector<ewolsa::LoadedFile*> musicListRead;
|
|||||||
static int32_t musicCurrentRead = -1;
|
static int32_t musicCurrentRead = -1;
|
||||||
static int32_t musicNextRead = -1;
|
static int32_t musicNextRead = -1;
|
||||||
|
|
||||||
void ewolsa::music::init(void) {
|
void ewolsa::music::init() {
|
||||||
ewolsa::music::volumeSet(0);
|
ewolsa::music::volumeSet(0);
|
||||||
ewolsa::music::muteSet(false);
|
ewolsa::music::muteSet(false);
|
||||||
std::unique_lock<std::mutex> lck(localMutex);
|
std::unique_lock<std::mutex> lck(localMutex);
|
||||||
@ -43,7 +43,7 @@ void ewolsa::music::init(void) {
|
|||||||
musicListRead.clear();
|
musicListRead.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewolsa::music::unInit(void) {
|
void ewolsa::music::unInit() {
|
||||||
ewolsa::music::volumeSet(-1000);
|
ewolsa::music::volumeSet(-1000);
|
||||||
ewolsa::music::muteSet(true);
|
ewolsa::music::muteSet(true);
|
||||||
std::unique_lock<std::mutex> lck(localMutex);
|
std::unique_lock<std::mutex> 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) {
|
if (musicCurrentRead == -1) {
|
||||||
EWOLSA_INFO("No current audio is playing");
|
EWOLSA_INFO("No current audio is playing");
|
||||||
return false;
|
return false;
|
||||||
@ -131,12 +131,12 @@ bool ewolsa::music::stop(void) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
float ewolsa::music::volumeGet(void) {
|
float ewolsa::music::volumeGet() {
|
||||||
return musicVolume;
|
return musicVolume;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void uptateMusicVolume(void) {
|
static void uptateMusicVolume() {
|
||||||
if (musicMute == true) {
|
if (musicMute == true) {
|
||||||
musicVolumeApply = 0;
|
musicVolumeApply = 0;
|
||||||
} else {
|
} else {
|
||||||
@ -156,7 +156,7 @@ void ewolsa::music::volumeSet(float _newVolume) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool ewolsa::music::muteGet(void) {
|
bool ewolsa::music::muteGet() {
|
||||||
return musicMute;
|
return musicMute;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,18 +14,18 @@
|
|||||||
|
|
||||||
namespace ewolsa {
|
namespace ewolsa {
|
||||||
namespace music {
|
namespace music {
|
||||||
void init(void);
|
void init();
|
||||||
void unInit(void);
|
void unInit();
|
||||||
void fading(int32_t _timeMs);
|
void fading(int32_t _timeMs);
|
||||||
|
|
||||||
void preLoad(const std::string& _file);
|
void preLoad(const std::string& _file);
|
||||||
bool play(const std::string& _file);
|
bool play(const std::string& _file);
|
||||||
bool stop(void);
|
bool stop();
|
||||||
|
|
||||||
// in db
|
// in db
|
||||||
float volumeGet(void);
|
float volumeGet();
|
||||||
void volumeSet(float _newVolume);
|
void volumeSet(float _newVolume);
|
||||||
bool muteGet(void);
|
bool muteGet();
|
||||||
void muteSet(bool _newMute);
|
void muteSet(bool _newMute);
|
||||||
void getData(int16_t * _bufferInterlace, int32_t _nbSample, int32_t _nbChannels);
|
void getData(int16_t * _bufferInterlace, int32_t _nbSample, int32_t _nbChannels);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user