mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +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 int32_t MV_MixPage = 0;
|
||||
static int32_t MV_VoiceHandle = MV_MINVOICEHANDLE;
|
||||
|
||||
void (*MV_Printf)(const char *fmt, ...) = NULL;
|
||||
static void (*MV_CallBackFunc)(uint32_t) = NULL;
|
||||
|
@ -648,17 +647,19 @@ VoiceNode *MV_AllocVoice(int32_t priority)
|
|||
LL_Remove(voice, next, prev);
|
||||
RestoreInterrupts();
|
||||
|
||||
MV_VoiceHandle = MV_MINVOICEHANDLE;
|
||||
|
||||
// Find a free voice handle
|
||||
do
|
||||
{
|
||||
if (++MV_VoiceHandle < MV_MINVOICEHANDLE || MV_VoiceHandle > MV_MaxVoices)
|
||||
MV_VoiceHandle = MV_MINVOICEHANDLE;
|
||||
}
|
||||
while (MV_VoicePlaying(MV_VoiceHandle));
|
||||
int32_t vhan = MV_MINVOICEHANDLE;
|
||||
|
||||
voice->handle = MV_VoiceHandle;
|
||||
// Find a free voice handle
|
||||
do
|
||||
{
|
||||
if (++vhan < MV_MINVOICEHANDLE || vhan > MV_MaxVoices)
|
||||
vhan = MV_MINVOICEHANDLE;
|
||||
}
|
||||
while (MV_VoicePlaying(vhan));
|
||||
|
||||
voice->handle = vhan;
|
||||
}
|
||||
|
||||
return voice;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue