support per-sample volume

This commit is contained in:
Glenn Maynard
2004-01-22 06:55:18 +00:00
parent b28c406879
commit 2ff50ed116
6 changed files with 15 additions and 17 deletions
@@ -123,6 +123,8 @@ bool RageSound_DSound::stream::GetData(bool init)
* fill anything in STOPPING; in that case, we just clear the audio buffer. */
if(state != STOPPING)
{
pcm->SetVolume( snd->GetVolume() );
int bytes_read = 0;
int bytes_left = len;
@@ -236,14 +238,6 @@ RageSound_DSound::~RageSound_DSound()
delete stream_pool[i];
}
void RageSound_DSound::VolumeChanged()
{
for(unsigned i = 0; i < stream_pool.size(); ++i)
{
stream_pool[i]->pcm->SetVolume(SOUNDMAN->GetMixVolume());
}
}
void RageSound_DSound::StartMixing( RageSoundBase *snd )
{
LockMutex L(SOUNDMAN->lock);