Add a fix to load the music from save

This commit implements code to get/set sample offset in an OpenAL channel and saves the music filename/offset into the file. This only works by using the experimental sound system, so it partially fixes #327
This commit is contained in:
smallmodel 2024-07-22 20:07:32 +02:00
parent 2198bdec21
commit 757b4849f8
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512
9 changed files with 151 additions and 17 deletions

View file

@ -3976,13 +3976,13 @@ void S_ServerLoaded(void)
Com_DPrintf("Loading Previous Sound State.\n");
S_StopAllSounds2(qfalse);
//S_TriggeredMusic_Stop();
//s_bSoundPaused = qtrue;
//S_ReLoad( &svs.soundSystem );
//
//if( svs.tm_filename[ 0 ] ) {
// S_TriggeredMusic_SetupHandle( svs.tm_filename, svs.tm_loopcount, svs.tm_offset, 0 );
//}
S_TriggeredMusic_Stop();
s_bSoundPaused = qtrue;
S_ReLoad( &svs.soundSystem );
if( svs.tm_filename[ 0 ] ) {
S_TriggeredMusic_SetupHandle( svs.tm_filename, svs.tm_loopcount, svs.tm_offset, 0 );
}
}
/*