add RageSoundManager::AttenuateBuf

This commit is contained in:
Glenn Maynard
2003-10-22 03:39:52 +00:00
parent b5656d7ec9
commit 51d60e1db1
2 changed files with 11 additions and 0 deletions
+10
View File
@@ -262,6 +262,16 @@ void RageSoundManager::SetPrefs(float MixVol)
driver->VolumeChanged();
}
void RageSoundManager::AttenuateBuf( Sint16 *buf, int samples, float vol )
{
while( samples-- )
{
*buf = Sint16( (*buf) * vol );
++buf;
}
}
SoundMixBuffer::SoundMixBuffer()
{
bufsize = used = 0;