Skip to content

Commit

Permalink
Removed broken music fading code from snd_dma.
Browse files Browse the repository at this point in the history
 Fixes Bugzilla #3757.
  • Loading branch information
icculus committed Sep 15, 2009
1 parent 5079343 commit d47be89
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions code/client/snd_dma.c
Expand Up @@ -1353,17 +1353,13 @@ void S_UpdateBackgroundTrack( void ) {
byte raw[30000]; // just enough to fit in a mac stack frame
int fileBytes;
int r;
static float musicVolume = 0.5f;

if(!s_backgroundStream) {
return;
}

// graeme see if this is OK
musicVolume = (musicVolume + (s_musicVolume->value * 2))/4.0f;

// don't bother playing anything if musicvolume is 0
if ( musicVolume <= 0 ) {
if ( s_musicVolume->value <= 0 ) {
return;
}

Expand Down Expand Up @@ -1397,7 +1393,7 @@ void S_UpdateBackgroundTrack( void ) {
{
// add to raw buffer
S_Base_RawSamples( 0, fileSamples, s_backgroundStream->info.rate,
s_backgroundStream->info.width, s_backgroundStream->info.channels, raw, musicVolume );
s_backgroundStream->info.width, s_backgroundStream->info.channels, raw, s_musicVolume->value );
}
else
{
Expand Down

0 comments on commit d47be89

Please sign in to comment.