Refactor : add annotations to a few more functions

This commit is contained in:
Aaron Culliney
2015-06-14 14:56:53 -07:00
parent 33a13abbc2
commit 59e95a19b1
3 changed files with 17 additions and 14 deletions

View File

@@ -239,7 +239,7 @@ static void _destroy_enumerated_sound_devices(void) {
} }
} }
bool DSInit() bool DSInit(void)
{ {
if(audio_isAvailable) if(audio_isAvailable)
{ {
@@ -289,7 +289,7 @@ bool DSInit()
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void DSUninit() void DSUninit(void)
{ {
_destroy_enumerated_sound_devices(); _destroy_enumerated_sound_devices();
@@ -319,7 +319,7 @@ void DSUninit()
static int g_nErrorInc = 20; // Old: 1 static int g_nErrorInc = 20; // Old: 1
static int g_nErrorMax = 200; // Old: 50 static int g_nErrorMax = 200; // Old: 50
int SoundCore_GetErrorInc() int SoundCore_GetErrorInc(void)
{ {
return g_nErrorInc; return g_nErrorInc;
} }
@@ -330,7 +330,7 @@ void SoundCore_SetErrorInc(const int nErrorInc)
LOG("Speaker/MB Error Inc = %d\n", g_nErrorInc); LOG("Speaker/MB Error Inc = %d\n", g_nErrorInc);
} }
int SoundCore_GetErrorMax() int SoundCore_GetErrorMax(void)
{ {
return g_nErrorMax; return g_nErrorMax;
} }

View File

@@ -94,24 +94,25 @@ bool DSZeroVoiceWritableBuffer(PVOICE Voice, char* pszDevName, unsigned long dwB
typedef enum eFADE {FADE_NONE, FADE_IN, FADE_OUT} eFADE; typedef enum eFADE {FADE_NONE, FADE_IN, FADE_OUT} eFADE;
void SoundCore_SetFade(eFADE FadeType); void SoundCore_SetFade(eFADE FadeType);
int SoundCore_GetErrorInc(); int SoundCore_GetErrorInc(void);
void SoundCore_SetErrorInc(const int nErrorInc); void SoundCore_SetErrorInc(const int nErrorInc);
int SoundCore_GetErrorMax(); int SoundCore_GetErrorMax(void);
void SoundCore_SetErrorMax(const int nErrorMax); void SoundCore_SetErrorMax(const int nErrorMax);
bool DSInit(); bool DSInit(void);
void DSUninit(); void DSUninit(void);
extern bool audio_isAvailable; extern bool audio_isAvailable;
typedef struct audio_backend_s { typedef struct audio_backend_s {
// mandatory audio backend functions // basic backend functionality controlled by soundcore
long (*init)(const char *sound_device, SoundSystemStruct **sound_struct); PRIVATE long (*init)(const char *sound_device, SoundSystemStruct **sound_struct);
long (*shutdown)(SoundSystemStruct **sound_struct); PRIVATE long (*shutdown)(SoundSystemStruct **sound_struct);
long (*pause)(void); PRIVATE long (*enumerateDevices)(char ***sound_devices, const int maxcount);
long (*resume)(void);
long (*enumerateDevices)(char ***sound_devices, const int maxcount); PUBLIC long (*pause)(void);
PUBLIC long (*resume)(void);
} audio_backend_s; } audio_backend_s;

View File

@@ -64,6 +64,8 @@
#define INPARM #define INPARM
#define OUTPARM #define OUTPARM
#define INOUT #define INOUT
#define PRIVATE
#define PUBLIC
#define CTOR_PRIORITY_FIRST 101 #define CTOR_PRIORITY_FIRST 101
#define CTOR_PRIORITY_EARLY 111 #define CTOR_PRIORITY_EARLY 111