- Fixed: snd_musicvolume needs to check GSnd for NULL, since somebody might have set an

atexit for it, which gets executed after the sound system shuts down.
- Fixed: FPlayList::Backup() failed to wrap around below entry 0 because Position is
  unsigned now.

SVN r2188 (trunk)
This commit is contained in:
Randy Heit 2010-03-05 03:11:10 +00:00
parent 61865b30be
commit 758327f4b3
2 changed files with 5 additions and 2 deletions

View file

@ -198,7 +198,7 @@ int FPlayList::Advance ()
int FPlayList::Backup () int FPlayList::Backup ()
{ {
if (--Position < 0) if (Position-- == 0)
{ {
Position = Songs.Size() - 1; Position = Songs.Size() - 1;
} }

View file

@ -112,7 +112,10 @@ CUSTOM_CVAR (Float, snd_musicvolume, 0.5f, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
else else
{ {
// Set general music volume. // Set general music volume.
if (GSnd != NULL)
{
GSnd->SetMusicVolume(clamp<float>(self * relative_volume, 0, 1)); GSnd->SetMusicVolume(clamp<float>(self * relative_volume, 0, 1));
}
// For music not implemented through the digital sound system, // For music not implemented through the digital sound system,
// let them know about the change. // let them know about the change.
if (currSong != NULL) if (currSong != NULL)