manuals tidy tier 1: suffixes, params, switches, equals-default
This commit is contained in:
@@ -260,7 +260,7 @@ inline void JA_Update() {
|
||||
|
||||
inline void JA_Init(const int freq, const SDL_AudioFormat format, const int num_channels) {
|
||||
JA_audioSpec = {.format = format, .channels = num_channels, .freq = freq};
|
||||
if (sdlAudioDevice != 0u) {
|
||||
if (sdlAudioDevice != 0U) {
|
||||
SDL_CloseAudioDevice(sdlAudioDevice);
|
||||
}
|
||||
sdlAudioDevice = SDL_OpenAudioDevice(SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK, &JA_audioSpec);
|
||||
@@ -280,7 +280,7 @@ inline void JA_Quit() {
|
||||
SDL_DestroyAudioStream(outgoing_music.stream);
|
||||
outgoing_music.stream = nullptr;
|
||||
}
|
||||
if (sdlAudioDevice != 0u) {
|
||||
if (sdlAudioDevice != 0U) {
|
||||
SDL_CloseAudioDevice(sdlAudioDevice);
|
||||
}
|
||||
sdlAudioDevice = 0;
|
||||
@@ -586,7 +586,7 @@ inline void JA_EnableMusic(const bool value) {
|
||||
inline auto JA_LoadSound(uint8_t* buffer, uint32_t size) -> JA_Sound_t* {
|
||||
auto sound = std::make_unique<JA_Sound_t>();
|
||||
Uint8* raw = nullptr;
|
||||
if (!SDL_LoadWAV_IO(SDL_IOFromMem(buffer, size), 1, &sound->spec, &raw, &sound->length)) {
|
||||
if (!SDL_LoadWAV_IO(SDL_IOFromMem(buffer, size), true, &sound->spec, &raw, &sound->length)) {
|
||||
std::cout << "Failed to load WAV from memory: " << SDL_GetError() << '\n';
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user