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

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

namespace nw4hbm {
    namespace snd {
        SoundStartable::StartResult SoundStartable::detail_StartSound(
            SoundHandle* soundHandle, u32 id, detail::BasicSound::AmbientArgInfo* ambientArgInfo,
            detail::ExternalSoundPlayer* extPlayer, const StartInfo* pStartInfo) {
            StartResult result =
                detail_SetupSound(soundHandle, id, ambientArgInfo, extPlayer, false, pStartInfo);

            if (result != START_SUCCESS) {
                return result;
            }

            soundHandle->StartPrepared();
            return START_SUCCESS;
        }
    }  // namespace snd
}  // namespace nw4hbm