sound options cleanup

fix invalid sample music start and length values (Bag and more)
This commit is contained in:
Chris Danford
2003-02-19 23:49:57 +00:00
parent 71134fd2cf
commit 6518f024e2
5 changed files with 31 additions and 23 deletions
+3 -1
View File
@@ -126,7 +126,9 @@ void DSoundBuf::SetVolume(float vol)
{
ASSERT(vol >= 0);
ASSERT(vol <= 1);
if( vol == 0 )
vol = 0.001f; // fix log10f(0) == -INF
float vl2 = log10f(vol) / log10f(2); /* vol log 2 */
/* Volume is a multiplier; SetVolume wants attenuation in thousands of a