Refactor : rename audio subsystem initialization and shutdown functions

This commit is contained in:
Aaron Culliney 2015-06-14 15:05:44 -07:00
parent 59e95a19b1
commit 8dd82642d3
4 changed files with 14 additions and 7 deletions

View File

@ -239,7 +239,7 @@ static void _destroy_enumerated_sound_devices(void) {
}
}
bool DSInit(void)
bool audio_init(void)
{
if(audio_isAvailable)
{
@ -289,7 +289,7 @@ bool DSInit(void)
//-----------------------------------------------------------------------------
void DSUninit(void)
void audio_shutdown(void)
{
_destroy_enumerated_sound_devices();

View File

@ -99,8 +99,15 @@ void SoundCore_SetErrorInc(const int nErrorInc);
int SoundCore_GetErrorMax(void);
void SoundCore_SetErrorMax(const int nErrorMax);
bool DSInit(void);
void DSUninit(void);
/*
* Prepare the audio subsystem, including the backend renderer.
*/
bool audio_init(void);
/*
* Shutdown the audio subsystem and backend renderer.
*/
void audio_shutdown(void);
extern bool audio_isAvailable;

View File

@ -136,7 +136,7 @@ void test_common_init(bool do_cputhread) {
}
} else {
#ifdef AUDIO_ENABLED
DSInit();
audio_init();
speaker_init();
MB_Initialize();
#endif

View File

@ -189,7 +189,7 @@ void *cpu_thread(void *dummyptr) {
assert(pthread_self() == cpu_thread_id);
#ifdef AUDIO_ENABLED
DSInit();
audio_init();
speaker_init();
MB_Initialize();
#endif
@ -410,7 +410,7 @@ void *cpu_thread(void *dummyptr) {
#ifdef AUDIO_ENABLED
speaker_destroy();
MB_Destroy();
DSUninit();
audio_shutdown();
#endif
return NULL;