Skip to content

Commit 354edd5

Browse files
committed
- fixed xmp playback as xmp explicitly requires a length of the module now. Fixes issue #96
- suppress the warning about non-22khz music, as mods are playing at the mixer's rate always, and this warning regards a much earlier (1999) unstable sound mixer.
1 parent fc35244 commit 354edd5

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

code/client/snd_codec_xmp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ snd_stream_t *S_XMP_CodecOpenStream(const char *filename)
149149
xmpsong = xmp_create_context();
150150
int itsloaded = 0;
151151

152-
itsloaded = xmp_load_module_from_memory(xmpsong, buffer, 0);
152+
itsloaded = xmp_load_module_from_memory(xmpsong, buffer, thelength);
153153

154154
// Free our memory and close the file.
155155
Hunk_FreeTempMemory(buffer);

code/client/snd_dma.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1432,9 +1432,11 @@ static void S_OpenBackgroundStream( const char *filename ) {
14321432
return;
14331433
}
14341434

1435-
if(s_backgroundStream->info.channels != 2 || s_backgroundStream->info.rate != 22050) {
1436-
Com_Printf(S_COLOR_YELLOW "WARNING: music file %s is not 22k stereo\n", filename );
1437-
}
1435+
// leilei - commented out, as we have music beyond this rate, and this warning is meant for an older
1436+
// iteration of q3's sound engine that couldn't handle other rates.
1437+
// if(s_backgroundStream->info.channels != 2 || s_backgroundStream->info.rate != 22050) {
1438+
// Com_Printf(S_COLOR_YELLOW "WARNING: music file %s is not 22k stereo\n", filename );
1439+
// }
14381440
}
14391441

14401442

0 commit comments

Comments
 (0)