Minor cleanup
This commit is contained in:
parent
274de9e0f9
commit
d025fecf54
1 changed files with 5 additions and 7 deletions
|
@ -43,7 +43,7 @@ static unsigned long GetTicksMilliseconds(void)
|
||||||
{
|
{
|
||||||
static uint64_t accumulator;
|
static uint64_t accumulator;
|
||||||
|
|
||||||
static unsigned long last_tick;
|
static unsigned long last_tick; // For some dumbass reason, OSTick is signed, so force unsigned here instead
|
||||||
|
|
||||||
unsigned long current_tick = OSGetTick();
|
unsigned long current_tick = OSGetTick();
|
||||||
|
|
||||||
|
@ -94,8 +94,7 @@ bool AudioBackend_Init(void)
|
||||||
{
|
{
|
||||||
if (!AXIsInit())
|
if (!AXIsInit())
|
||||||
{
|
{
|
||||||
static AXInitParams initparams =
|
AXInitParams initparams = {
|
||||||
{
|
|
||||||
.renderer = AX_INIT_RENDERER_48KHZ,
|
.renderer = AX_INIT_RENDERER_48KHZ,
|
||||||
.pipeline = AX_INIT_PIPELINE_SINGLE,
|
.pipeline = AX_INIT_PIPELINE_SINGLE,
|
||||||
};
|
};
|
||||||
|
@ -213,8 +212,9 @@ void AudioBackend_StopSound(AudioBackend_Sound *sound)
|
||||||
{
|
{
|
||||||
if (sound->voice != NULL)
|
if (sound->voice != NULL)
|
||||||
{
|
{
|
||||||
AXFreeVoice(sound->voice);
|
AXVoice *voice = sound->voice;
|
||||||
sound->voice = NULL;
|
sound->voice = NULL;
|
||||||
|
AXFreeVoice(voice);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -241,9 +241,7 @@ void AudioBackend_SetSoundVolume(AudioBackend_Sound *sound, long volume)
|
||||||
|
|
||||||
if (sound->voice != NULL)
|
if (sound->voice != NULL)
|
||||||
{
|
{
|
||||||
AXVoiceVeData vol = {
|
AXVoiceVeData vol = {.volume = sound->volume};
|
||||||
.volume = sound->volume,
|
|
||||||
};
|
|
||||||
|
|
||||||
AXSetVoiceVe(sound->voice, &vol);
|
AXSetVoiceVe(sound->voice, &vol);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue