JACoders / OpenJK

Community effort to maintain and improve Jedi Academy (SP & MP) + Jedi Outcast (SP only) released by Raven Software
GNU General Public License v2.0
2.01k stars 612 forks source link

The music is interrupted at the time of the save game. #1014

Closed Ivan19830111 closed 5 years ago

Ivan19830111 commented 5 years ago

Operating system and version: Windows 7 64-bit SP1 / openjk-2019-05-13 (openjk_sp.x86 v.1.0.1.1)

Is this for single player or multiplayer? Single Player

Description of the bug (and if possible, steps to reproduce the bug): At the time of saving the game music is interrupted for a moment. Then after saving it is restored. It looks like a lag and the music that was playing is skipped for about 0.5-1 seconds.

What did you expect to happen instead? In the original game and early builds before openjk-2015-02-02-8f553ca5 inclusive there is no such thing. Music is not interrupted during the save

ensiform commented 5 years ago

Saving is a disk hit so that is kind of expected?

xycaleth commented 5 years ago

Not if it didn’t happen before though

Ivan19830111 commented 5 years ago

There was no such lag in the early builds

Maybe someone saved the source of these versions? openjk-2015-02-02-8f553ca5 openjk-2015-02-09-366933d5

Because the lag starts with openjk-2015-02-09-366933d5 and is in all subsequent

ensiform commented 5 years ago

@Ivan19830111 is that when we switched to SDL?

Ivan19830111 commented 5 years ago

ensiform I also thought at first that the problem was in SDL, but it turned out that it was not. There are no SDL libraries in the above build.

Ivan19830111 commented 5 years ago

All figured out. This is caused by the call to the S_ClearSoundBuffer () function.

ensiform commented 5 years ago

That function is by design. But it does not do anything with music.

Ivan19830111 commented 5 years ago

Yes, you are right. I have a bug with a delay to reach the hard disk. But for myself, I removed in a couple of places (commented out) this function and the problem was solved. In fact, I left it only where it was in the original game.