Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
shadow1013

Quake 3 linux music

Recommended Posts

So I was fooling around the quake 3 source code, and as man people have noticed, vanilla quake 3 on linux, in order to not get freezes with the alsa oss emulation you had to turn of music completely, yet on a similar engine on the same machine (RTCW) music played perfectly fine. I found out the reason why vanilla quake3 would freeze on my box and many others, and it is a lack of two lines of code...

The music code loads chunks of the music at the same time, and does this by checking a formula which depends on samplerate. Apparently if this formula returns 0, the loop which added the music to the mixbuffer would loop forever, causing the freeze, and the solution would be simply to check if this formula returns zero, and if so break out of the loop.

The function is in snd_dma.c and named "S_UpdateBackgroundTrack"

TL;DR version:
found bug in quake3 source, fixed it, got excited, posted on doomworld for some reason.

Share this post


Link to post

Nope. It's weird. This crash only affects the vanilla code, and seems to be completely dependent on the samplerate used, as I'm guessing it had to have worked on other systems.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×