mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-02-04 12:50:57 +00:00
fixes
git-svn-id: https://svn.eduke32.com/eduke32@675 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
e586fa650a
commit
ad97b339cc
2 changed files with 8 additions and 1 deletions
|
@ -3697,6 +3697,7 @@ static int parsecommand(void)
|
||||||
|
|
||||||
j=CountCaseStatements();
|
j=CountCaseStatements();
|
||||||
// initprintf("Done Counting Case Statements for switch %d: found %d.\n", checking_switch,j);
|
// initprintf("Done Counting Case Statements for switch %d: found %d.\n", checking_switch,j);
|
||||||
|
scriptptr+=j*2;skipcomments();scriptptr-=j*2; // allocate buffer for the table
|
||||||
tempscrptr = (intptr_t *)(script+tempoffset);
|
tempscrptr = (intptr_t *)(script+tempoffset);
|
||||||
|
|
||||||
//AddLog(g_szBuf);
|
//AddLog(g_szBuf);
|
||||||
|
@ -3724,6 +3725,7 @@ static int parsecommand(void)
|
||||||
// leave room for statements
|
// leave room for statements
|
||||||
*scriptptr++=0; // value check
|
*scriptptr++=0; // value check
|
||||||
*scriptptr++=0; // code offset
|
*scriptptr++=0; // code offset
|
||||||
|
skipcomments();
|
||||||
}
|
}
|
||||||
|
|
||||||
//Bsprintf(g_szBuf,"SWITCH1: '%.22s'",textptr);
|
//Bsprintf(g_szBuf,"SWITCH1: '%.22s'",textptr);
|
||||||
|
|
|
@ -30,6 +30,7 @@ typedef struct SD
|
||||||
char type;
|
char type;
|
||||||
int rate;
|
int rate;
|
||||||
sounddef def;
|
sounddef def;
|
||||||
|
int ready;
|
||||||
}sounddef1;
|
}sounddef1;
|
||||||
|
|
||||||
sounddef1 music;
|
sounddef1 music;
|
||||||
|
@ -350,7 +351,7 @@ void open1(char *ptr,int sizef,char loop);
|
||||||
|
|
||||||
void AL_Pause() {if (music.def.size)balSourcePause(music.source);}
|
void AL_Pause() {if (music.def.size)balSourcePause(music.source);}
|
||||||
void AL_Continue() {if (music.def.size)balSourcePlay(music.source);}
|
void AL_Continue() {if (music.def.size)balSourcePlay(music.source);}
|
||||||
void AL_Update() {if (music.def.size&&!update(0))AL_Stop();}
|
void AL_Update() {if (music.def.size&&music.ready&&!update(0))AL_Stop();}
|
||||||
int AL_isntALmusic() {return !music.def.size;}
|
int AL_isntALmusic() {return !music.def.size;}
|
||||||
|
|
||||||
void AL_SetMusicVolume(int volume)
|
void AL_SetMusicVolume(int volume)
|
||||||
|
@ -381,11 +382,13 @@ int update()
|
||||||
case 1:
|
case 1:
|
||||||
while (processed--)
|
while (processed--)
|
||||||
{
|
{
|
||||||
|
ALdoing="update1";
|
||||||
balSourceUnqueueBuffers(music.source,1,&buffer);
|
balSourceUnqueueBuffers(music.source,1,&buffer);
|
||||||
check(1);
|
check(1);
|
||||||
active=stream(buffer);
|
active=stream(buffer);
|
||||||
if (active)
|
if (active)
|
||||||
{
|
{
|
||||||
|
ALdoing="update2";
|
||||||
balSourceQueueBuffers(music.source,1,&buffer);
|
balSourceQueueBuffers(music.source,1,&buffer);
|
||||||
check(1);
|
check(1);
|
||||||
}
|
}
|
||||||
|
@ -402,6 +405,7 @@ void AL_Stop()
|
||||||
if (!music.def.size)
|
if (!music.def.size)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
music.ready=0;
|
||||||
balSourceStop(music.source);
|
balSourceStop(music.source);
|
||||||
balGetSourcei(music.source,AL_BUFFERS_QUEUED,&queued);
|
balGetSourcei(music.source,AL_BUFFERS_QUEUED,&queued);
|
||||||
|
|
||||||
|
@ -498,4 +502,5 @@ void AL_PlaySong(char *ptr,int loop)
|
||||||
|
|
||||||
AL_SetMusicVolume(AL_MusicVolume);
|
AL_SetMusicVolume(AL_MusicVolume);
|
||||||
AL_Continue();
|
AL_Continue();
|
||||||
|
music.ready=1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue