mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +00:00
multivoc.c: use a local variable instead of a file-scope one used locally.
git-svn-id: https://svn.eduke32.com/eduke32@4183 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
a68ef20182
commit
9688dccfff
1 changed files with 11 additions and 10 deletions
|
@ -101,7 +101,6 @@ static volatile VoiceNode VoiceList;
|
||||||
static volatile VoiceNode VoicePool;
|
static volatile VoiceNode VoicePool;
|
||||||
|
|
||||||
static int32_t MV_MixPage = 0;
|
static int32_t MV_MixPage = 0;
|
||||||
static int32_t MV_VoiceHandle = MV_MINVOICEHANDLE;
|
|
||||||
|
|
||||||
void (*MV_Printf)(const char *fmt, ...) = NULL;
|
void (*MV_Printf)(const char *fmt, ...) = NULL;
|
||||||
static void (*MV_CallBackFunc)(uint32_t) = NULL;
|
static void (*MV_CallBackFunc)(uint32_t) = NULL;
|
||||||
|
@ -648,17 +647,19 @@ VoiceNode *MV_AllocVoice(int32_t priority)
|
||||||
LL_Remove(voice, next, prev);
|
LL_Remove(voice, next, prev);
|
||||||
RestoreInterrupts();
|
RestoreInterrupts();
|
||||||
|
|
||||||
MV_VoiceHandle = MV_MINVOICEHANDLE;
|
{
|
||||||
|
int32_t vhan = MV_MINVOICEHANDLE;
|
||||||
|
|
||||||
// Find a free voice handle
|
// Find a free voice handle
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if (++MV_VoiceHandle < MV_MINVOICEHANDLE || MV_VoiceHandle > MV_MaxVoices)
|
if (++vhan < MV_MINVOICEHANDLE || vhan > MV_MaxVoices)
|
||||||
MV_VoiceHandle = MV_MINVOICEHANDLE;
|
vhan = MV_MINVOICEHANDLE;
|
||||||
}
|
}
|
||||||
while (MV_VoicePlaying(MV_VoiceHandle));
|
while (MV_VoicePlaying(vhan));
|
||||||
|
|
||||||
voice->handle = MV_VoiceHandle;
|
voice->handle = vhan;
|
||||||
|
}
|
||||||
|
|
||||||
return voice;
|
return voice;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue