From 28f0a1b7362846d1de4a57293383c4eab4e37c72 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sun, 5 Sep 2004 06:05:56 +0000 Subject: [PATCH] fix volume calc; meant to change the comment but not the equation make sure setting volume to 0 works --- stepmania/src/arch/Sound/DSoundHelpers.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stepmania/src/arch/Sound/DSoundHelpers.cpp b/stepmania/src/arch/Sound/DSoundHelpers.cpp index 61d44d8448..7044119766 100644 --- a/stepmania/src/arch/Sound/DSoundHelpers.cpp +++ b/stepmania/src/arch/Sound/DSoundHelpers.cpp @@ -176,7 +176,7 @@ DSoundBuf::DSoundBuf( DSound &ds, DSoundBuf::hw hardware, samplerate = samplerate_; samplebits = samplebits_; writeahead = writeahead_ * bytes_per_frame(); - volume = 0; + volume = -1; /* unset */ buffer_locked = false; last_cursor_pos = write_cursor = buffer_bytes_filled = 0; LastPosition = 0; @@ -302,7 +302,7 @@ void DSoundBuf::SetVolume(float vol) float vl2 = log10f(vol) / log10f(2); /* vol log 2 */ /* Volume is a multiplier; SetVolume wants attenuation in hundredths of a decibel. */ - const int new_volume = max( int(100 * vl2), DSBVOLUME_MIN ); + const int new_volume = max( int(1000 * vl2), DSBVOLUME_MIN ); if( volume == new_volume ) return;