summaryrefslogtreecommitdiff
path: root/libs/revolution/src/homebuttonLib/nw4hbm/snd/snd_SoundPlayer.cpp
blob: 1e9e3555582d1a937ad503c6753ac8dd3fdc0eb8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "SoundPlayer.h"

#include "../db/assert.h"

namespace nw4hbm {
    namespace snd {
        void SoundPlayer::StopAllSound(int frames) {
            for (detail::BasicSoundPlayerPlayList::Iterator it = mSoundList.GetBeginIter();
                 it != mSoundList.GetEndIter();)
            {
                detail::BasicSoundPlayerPlayList::Iterator currIt = it++;
                currIt->Stop(frames);
            }
        }

        void SoundPlayer::SetVolume(f32 volume) {
            NW4HBM_ASSERT(153, volume >= 0.0f);
            mVolume = volume;
        }
    }  // namespace snd
}  // namespace nw4hbm