1
0
Fork 0

changes for improved timing event system

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1968
This commit is contained in:
Sjoerd van der Berg 2004-09-10 22:15:20 +00:00
parent 5c26302fc2
commit dfbb195418
13 changed files with 103 additions and 116 deletions

View file

@ -250,12 +250,8 @@ void MixerChannel::FillUp(void) {
SDL_UnlockAudio();
return;
}
Bitu filled=(done-mixer.done)*1000/(mixer.needed-mixer.done);
Bitu index=PIC_Index();
if (filled<index) {
Bitu temp=mixer.done+((index*(mixer.needed-mixer.done))/1000);
Mix(temp);
}
float index=PIC_TickIndex();
Mix((Bitu)(index*mixer.needed));
SDL_UnlockAudio();
}