mirror of
https://github.com/zeldaret/ss
synced 2026-05-26 07:38:54 -04:00
snd_SoundStartable OK
This commit is contained in:
+1
-1
@@ -1065,7 +1065,7 @@ config.libs = [
|
||||
Object(Matching, "nw4r/snd/snd_SoundHandle.cpp"),
|
||||
Object(Matching, "nw4r/snd/snd_SoundHeap.cpp"),
|
||||
Object(Matching, "nw4r/snd/snd_SoundPlayer.cpp"),
|
||||
Object(NonMatching, "nw4r/snd/snd_SoundStartable.cpp"),
|
||||
Object(Matching, "nw4r/snd/snd_SoundStartable.cpp"),
|
||||
Object(Matching, "nw4r/snd/snd_SoundSystem.cpp"),
|
||||
Object(Matching, "nw4r/snd/snd_SoundThread.cpp"),
|
||||
Object(Matching, "nw4r/snd/snd_StrmChannel.cpp"),
|
||||
|
||||
@@ -107,6 +107,11 @@ namespace nw4r { namespace snd
|
||||
StartResult detail_StartSound(
|
||||
SoundHandle *pHandle, u32 id, const StartInfo *pStartInfo
|
||||
);
|
||||
StartResult detail_StartSound(
|
||||
SoundHandle *pHandle, const char *label, const StartInfo *pStartInfo
|
||||
);
|
||||
|
||||
// TODO: Remove
|
||||
StartResult detail_StartSound(
|
||||
SoundHandle *pHandle, u32 id, detail::BasicSound::AmbientInfo *pArgInfo,
|
||||
detail::ExternalSoundPlayer *pPlayer, const StartInfo *pStartInfo
|
||||
@@ -115,17 +120,31 @@ namespace nw4r { namespace snd
|
||||
StartResult detail_HoldSound(
|
||||
SoundHandle *pHandle, u32 id, const StartInfo *pStartInfo
|
||||
);
|
||||
StartResult detail_HoldSound(
|
||||
SoundHandle *pHandle, const char *label, const StartInfo *pStartInfo
|
||||
);
|
||||
|
||||
// TODO: Remove
|
||||
StartResult detail_HoldSound(
|
||||
SoundHandle *pHandle, u32 id, detail::BasicSound::AmbientInfo *pArgInfo,
|
||||
detail::ExternalSoundPlayer *pPlayer, const StartInfo *pStartInfo
|
||||
);
|
||||
|
||||
// TODO: Remove
|
||||
StartResult detail_PrepareSound(
|
||||
SoundHandle *pHandle, u32 id, detail::BasicSound::AmbientInfo *pArgInfo,
|
||||
detail::ExternalSoundPlayer *pPlayer, const StartInfo *pStartInfo
|
||||
);
|
||||
|
||||
StartResult detail_PrepareSound(
|
||||
SoundHandle *pHandle, u32 id, const StartInfo *pStartInfo
|
||||
);
|
||||
StartResult detail_PrepareSound(
|
||||
SoundHandle *pHandle, const char *label,
|
||||
const StartInfo *pStartInfo
|
||||
);
|
||||
|
||||
// TODO: Fix after removal of above functions
|
||||
bool StartSound(SoundHandle *pHandle, u32 id) {
|
||||
return detail_StartSound(pHandle, id, NULL, NULL, NULL) == START_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -31,6 +31,16 @@ SoundStartable::StartResult SoundStartable::detail_StartSound(
|
||||
return START_SUCCESS;
|
||||
}
|
||||
|
||||
SoundStartable::StartResult SoundStartable::detail_StartSound(
|
||||
SoundHandle *pHandle, const char *label, const StartInfo *pStartInfo)
|
||||
{
|
||||
u32 soundId = detail_ConvertLabelStringToSoundId(label);
|
||||
if (soundId == -1)
|
||||
return START_ERR_INVALID_LABEL_STRING;
|
||||
|
||||
return detail_StartSound(pHandle, soundId, pStartInfo);
|
||||
}
|
||||
|
||||
SoundStartable::StartResult SoundStartable::detail_HoldSound(
|
||||
SoundHandle *handle, u32 soundId, StartInfo const *startInfo)
|
||||
{
|
||||
@@ -49,4 +59,32 @@ SoundStartable::StartResult SoundStartable::detail_HoldSound(
|
||||
return START_SUCCESS;
|
||||
}
|
||||
|
||||
SoundStartable::StartResult SoundStartable::detail_HoldSound(
|
||||
SoundHandle *pHandle, const char *label, const StartInfo *pStartInfo)
|
||||
{
|
||||
u32 soundId = detail_ConvertLabelStringToSoundId(label);
|
||||
if (soundId == -1)
|
||||
return START_ERR_INVALID_LABEL_STRING;
|
||||
|
||||
return detail_HoldSound(pHandle, soundId, pStartInfo);
|
||||
}
|
||||
|
||||
SoundStartable::StartResult SoundStartable::detail_PrepareSound(
|
||||
SoundHandle *pHandle, u32 id,
|
||||
const StartInfo *pStartInfo)
|
||||
{
|
||||
return detail_SetupSound(pHandle, id, false, pStartInfo);
|
||||
}
|
||||
|
||||
SoundStartable::StartResult SoundStartable::detail_PrepareSound(
|
||||
SoundHandle *pHandle, const char *label,
|
||||
const StartInfo *pStartInfo)
|
||||
{
|
||||
u32 soundId = detail_ConvertLabelStringToSoundId(label);
|
||||
if (soundId == -1)
|
||||
return START_ERR_INVALID_LABEL_STRING;
|
||||
|
||||
return detail_PrepareSound(pHandle, soundId, pStartInfo);
|
||||
}
|
||||
|
||||
}} // namespace nw4r::snd
|
||||
|
||||
Reference in New Issue
Block a user