fabiangreffrath / taradino

SDL2 port of Rise of the Triad
GNU General Public License v2.0
31 stars 8 forks source link

play the full quit sound on Windows #8

Closed fabiangreffrath closed 11 months ago

fabiangreffrath commented 1 year ago

It seems that on Windows the SD_WaitSound() approach in CP_Quit() doesn't work and the sound is interrupted instantly. Do the same as Doom, play the sound, wait for 1.5 s, then quit.

fabiangreffrath commented 1 year ago

This seems to be related to playing VOC files on 64-bit Windows. This is one of the code paths where I had to adjust variable types to get it to compile and run without crashing on 64-bit Windows. Could anyone confirm the quit sounds play in full length on 32-bit Windows?

fabiangreffrath commented 1 year ago

Strange, I have just built a 32-bit Windows executable with mingw32 and it appears to exhibit the exact same behaviour. Might thus be an issue with SDL2_Mixer on Windows or the interaction between audiolib and the former on Windows. Also, replacing all the long type variables in rott/audiolib with int32_t did not make a difference, so this is (probably) not just a sizeof(long) issue.

fabiangreffrath commented 11 months ago

This is still persistent with #43. I guess it is either related to chunk size, or we need to play some quiet dummy music in the background?