mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-15 14:26:01 +00:00
cleanup init functions of audio
- use SDL_bool if possible - assume NULL/SDL_FALSE filled impl - skip zfill of current_audio at the beginning of SDL_AudioInit (done before the init() calls)
This commit is contained in:
@@ -997,11 +997,11 @@ ALSA_Deinitialize(void)
|
||||
UnloadALSALibrary();
|
||||
}
|
||||
|
||||
static int
|
||||
static SDL_bool
|
||||
ALSA_Init(SDL_AudioDriverImpl * impl)
|
||||
{
|
||||
if (LoadALSALibrary() < 0) {
|
||||
return 0;
|
||||
return SDL_FALSE;
|
||||
}
|
||||
|
||||
/* Set the function pointers */
|
||||
@@ -1017,12 +1017,12 @@ ALSA_Init(SDL_AudioDriverImpl * impl)
|
||||
|
||||
impl->HasCaptureSupport = SDL_TRUE;
|
||||
|
||||
return 1; /* this audio target is available. */
|
||||
return SDL_TRUE; /* this audio target is available. */
|
||||
}
|
||||
|
||||
|
||||
AudioBootStrap ALSA_bootstrap = {
|
||||
"alsa", "ALSA PCM audio", ALSA_Init, 0
|
||||
"alsa", "ALSA PCM audio", ALSA_Init, SDL_FALSE
|
||||
};
|
||||
|
||||
#endif /* SDL_AUDIO_DRIVER_ALSA */
|
||||
|
Reference in New Issue
Block a user