mirror of
https://github.com/zeldaret/ss
synced 2026-07-29 15:42:51 -04:00
snd_StrmSound OK
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
#include "nw4r/snd/snd_StrmSoundHandle.h"
|
||||
#include "nw4r/snd/snd_MoveValue.h"
|
||||
|
||||
#include "nw4r/ut/ut_Lock.h"
|
||||
#include "nw4r/ut/ut_RuntimeTypeInfo.h"
|
||||
|
||||
#include "nw4r/NW4RAssert.hpp"
|
||||
@@ -116,6 +117,22 @@ void StrmSound::UpdateParam()
|
||||
}
|
||||
}
|
||||
|
||||
void StrmSound::SetTrackVolume(u32 trackFlags, f32 volume, int fadeFrames)
|
||||
{
|
||||
ut::AutoInterruptLock lock;
|
||||
for (int trackNo = 0; trackNo < (int)ARRAY_LENGTH(mTrackVolume) && trackFlags != 0; trackNo++, trackFlags >>= 1)
|
||||
{
|
||||
StrmPlayer::StrmTrack *track = mStrmPlayer.GetPlayerTrack(trackNo);
|
||||
if (track != NULL && ((trackFlags & 1) != 0))
|
||||
{
|
||||
if (volume < 0.0f)
|
||||
volume = 0.0f;
|
||||
|
||||
mTrackVolume[trackNo].SetTarget(volume, fadeFrames);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void StrmSound::Shutdown()
|
||||
{
|
||||
BasicSound::Shutdown();
|
||||
|
||||
Reference in New Issue
Block a user