mirror of
https://github.com/zeldaret/ss
synced 2026-09-01 17:39:55 -04:00
make it build
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
#ifndef MSL_CPP_CSTDARG_H
|
||||
#define MSL_CPP_CSTDARG_H
|
||||
#include <__va_arg.h>
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace std {
|
||||
using ::va_list;
|
||||
} // namespace std
|
||||
|
||||
#endif
|
||||
#endif
|
||||
@@ -234,7 +234,7 @@ void dCursorHitCheckLyt_c::countBoundings(nw4r::lyt::Pane *pane) {
|
||||
mNumBoundings++;
|
||||
}
|
||||
|
||||
for (nw4r::lyt::Pane::ChildList::RevIterator it = pane->GetChildList()->GetEndReverseIter();
|
||||
for (nw4r::lyt::Pane::ChildList::ReverseIterator it = pane->GetChildList()->GetEndReverseIter();
|
||||
it != pane->GetChildList()->GetBeginIter(); ++it) {
|
||||
countBoundings(&*it);
|
||||
}
|
||||
@@ -247,7 +247,7 @@ void dCursorHitCheckLyt_c::gatherBoundings(dCsCheckLyt_BoundingData **pEnd, nw4r
|
||||
(*pEnd)->mpPane = pane;
|
||||
}
|
||||
|
||||
for (nw4r::lyt::Pane::ChildList::RevIterator it = pane->GetChildList()->GetEndReverseIter();
|
||||
for (nw4r::lyt::Pane::ChildList::ReverseIterator it = pane->GetChildList()->GetEndReverseIter();
|
||||
it != pane->GetChildList()->GetBeginIter(); ++it) {
|
||||
gatherBoundings(pEnd, &*it);
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ s32 DvdFile::writeData(const void *buffer, s32 length, s32 offset) {
|
||||
s32 DvdFile::sync() {
|
||||
OSMessage msg;
|
||||
OSLockMutex(&mMutex);
|
||||
OSReceiveMessage(&mMsgQueue, &msg, OS_MSG_PERSISTENT);
|
||||
OSReceiveMessage(&mMsgQueue, &msg, OS_MESSAGE_FLAG_PERSISTENT);
|
||||
mThread = nullptr;
|
||||
OSUnlockMutex(&mMutex);
|
||||
return (s32)(msg);
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/* Only implemented to the extent necessary to match data sections. */
|
||||
|
||||
#include <types.h> // nullptr
|
||||
#include "common.h" // nullptr
|
||||
#include <decomp.h>
|
||||
|
||||
#include "nw4r/snd/Util.h"
|
||||
#include "nw4r/snd/snd_Util.h"
|
||||
|
||||
DECOMP_FORCE(nw4r::snd::detail::Util::GetDataRefAddress0(
|
||||
*static_cast<nw4r::snd::detail::Util::DataRef<char> const *>(nullptr),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/AxManager.h"
|
||||
#include "nw4r/snd/snd_AxManager.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -11,28 +11,23 @@
|
||||
|
||||
#include <cstring> // std::memset
|
||||
|
||||
#include <macros.h>
|
||||
#include <types.h>
|
||||
#include "common.h"
|
||||
|
||||
#include "nw4r/snd/BiquadFilterPreset.h"
|
||||
#include "nw4r/snd/FxBase.h"
|
||||
#include "nw4r/snd/global.h"
|
||||
#include "nw4r/snd/MoveValue.h"
|
||||
#include "nw4r/snd/Voice.h"
|
||||
#include "nw4r/snd/VoiceManager.h"
|
||||
#include "nw4r/snd/snd_BiquadFilterPreset.h"
|
||||
#include "nw4r/snd/snd_FxBase.h"
|
||||
#include "nw4r/snd/snd_global.h"
|
||||
#include "nw4r/snd/snd_MoveValue.h"
|
||||
#include "nw4r/snd/snd_Voice.h"
|
||||
#include "nw4r/snd/snd_VoiceManager.h"
|
||||
|
||||
#include "nw4r/ut/inlines.h" // ut::Clamp
|
||||
#include "nw4r/ut/Lock.h" // ut::AutoInterruptLock
|
||||
#include "nw4r/ut/ut_algorithm.h" // ut::Clamp
|
||||
#include "nw4r/ut/ut_Lock.h" // ut::AutoInterruptLock
|
||||
|
||||
#if 0
|
||||
#include <revolution/OS/OSCache.h> // DCFlushRange
|
||||
#include <revolution/AI/ai.h> // AICheckInit
|
||||
#include <revolution/AX/AXAux.h>
|
||||
#include <revolution/AX/AXCL.h>
|
||||
#include <revolution/AX/AXOut.h>
|
||||
#else
|
||||
#include <context_rvl.h>
|
||||
#endif
|
||||
#include <rvl/OS/OSCache.h> // DCFlushRange
|
||||
#include <rvl/AI/ai.h> // AICheckInit
|
||||
#include <rvl/AX/AXAux.h>
|
||||
#include <rvl/AX/AXCL.h>
|
||||
#include <rvl/AX/AXOut.h>
|
||||
|
||||
#include "nw4r/NW4RAssert.hpp"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/AxVoice.h"
|
||||
#include "nw4r/snd/snd_AxVoice.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -12,26 +12,22 @@
|
||||
#include <cstdarg>
|
||||
#include <cstring>
|
||||
|
||||
#include <macros.h> // BOOLIFY_TERNARY
|
||||
#include <types.h>
|
||||
#include "common.h"
|
||||
|
||||
#include "nw4r/snd/adpcm.h" // DecodeDspAdpcm
|
||||
#include "nw4r/snd/AxManager.h"
|
||||
#include "nw4r/snd/AxVoiceManager.h"
|
||||
#include "nw4r/snd/BiquadFilterCallback.h"
|
||||
#include "nw4r/snd/global.h"
|
||||
#include "nw4r/snd/Util.h" // Util::GetRemoteFilterCoefs
|
||||
#include "nw4r/snd/snd_adpcm.h" // DecodeDspAdpcm
|
||||
#include "nw4r/snd/snd_AxManager.h"
|
||||
#include "nw4r/snd/snd_AxVoiceManager.h"
|
||||
#include "nw4r/snd/snd_BiquadFilterCallback.h"
|
||||
#include "nw4r/snd/snd_global.h"
|
||||
#include "nw4r/snd/snd_Util.h" // Util::GetRemoteFilterCoefs
|
||||
|
||||
#include "nw4r/ut/inlines.h"
|
||||
#include "nw4r/ut/Lock.h" // ut::AutoInterruptLock
|
||||
#include "nw4r/ut/ut_algorithm.h"
|
||||
#include "nw4r/ut/ut_Lock.h" // ut::AutoInterruptLock
|
||||
|
||||
#if 0
|
||||
#include <revolution/AX/AX.h>
|
||||
#include <revolution/AX/AXVPB.h>
|
||||
#include <revolution/OS/OSAddress.h>
|
||||
#else
|
||||
#include <context_rvl.h>
|
||||
#endif
|
||||
#include <rvl/AX/AX.h>
|
||||
#include <rvl/AX/AXCL.h>
|
||||
#include <rvl/AX/AXVPB.h>
|
||||
#include <rvl/OS/OSAddress.h>
|
||||
|
||||
#include "nw4r/NW4RAssert.hpp"
|
||||
|
||||
@@ -871,14 +867,14 @@ void AxVoice::CalcOffsetAdpcmParam(u16 *outPredScale, u16 *outYn1, u16 *outYn2,
|
||||
if (currentPos % AX_ADPCM_NIBBLES_PER_FRAME == 0)
|
||||
{
|
||||
byte_t byte = *static_cast<byte_t *>(OSPhysicalToCached(
|
||||
reinterpret_cast<void *>(currentPos / sizeof(u16))));
|
||||
currentPos / sizeof(u16)));
|
||||
|
||||
adpcm.pred_scale = byte;
|
||||
currentPos += sizeof(u16);
|
||||
}
|
||||
|
||||
byte_t byte = *static_cast<byte_t *>(OSPhysicalToCached(
|
||||
reinterpret_cast<void *>(currentPos / sizeof(u16))));
|
||||
currentPos / sizeof(u16)));
|
||||
|
||||
u8 nibble;
|
||||
if (currentPos % sizeof(u16) != 0)
|
||||
@@ -1016,7 +1012,7 @@ void AxVoiceParamBlock::SetVoiceMix(AXPBMIX const &mix, bool immediatelySync)
|
||||
u16 *src = const_cast<u16 *>(reinterpret_cast<u16 const *>(&mix));
|
||||
u16 *dst = reinterpret_cast<u16 *>(&mVpb->pb.mix);
|
||||
|
||||
byte4_t mixerCtrl = 0;
|
||||
u32 mixerCtrl = 0;
|
||||
|
||||
if ((*dst++ = *src++)) // vL
|
||||
mixerCtrl |= AX_MIXER_CTRL_L;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/AxVoiceManager.h"
|
||||
#include "nw4r/snd/snd_AxVoiceManager.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -11,18 +11,14 @@
|
||||
|
||||
#include <new>
|
||||
|
||||
#include <types.h>
|
||||
#include "common.h"
|
||||
|
||||
#include "nw4r/snd/AxVoice.h"
|
||||
#include "nw4r/snd/snd_AxVoice.h"
|
||||
|
||||
#include "nw4r/ut/Lock.h" // ut::AutoInterruptLock
|
||||
#include "nw4r/ut/ut_Lock.h" // ut::AutoInterruptLock
|
||||
|
||||
#if 0
|
||||
#include <revolution/AX/AXAlloc.h>
|
||||
#include <revolution/AX/AXVPB.h>
|
||||
#else
|
||||
#include <context_rvl.h>
|
||||
#endif
|
||||
#include <rvl/AX/AXAlloc.h>
|
||||
#include <rvl/AX/AXVPB.h>
|
||||
|
||||
#include "nw4r/NW4RAssert.hpp"
|
||||
|
||||
@@ -179,7 +175,7 @@ AxVoice *AxVoiceManager::AcquireAxVoice(u32 priority,
|
||||
return nullptr;
|
||||
|
||||
AXVPB *vpb = AXAcquireVoice(priority, &AxVoice::VoiceCallback,
|
||||
reinterpret_cast<register_t>(voice));
|
||||
reinterpret_cast<u32>(voice));
|
||||
if (!vpb)
|
||||
{
|
||||
Free(voice);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/Bank.h"
|
||||
#include "nw4r/snd/snd_Bank.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -9,14 +9,14 @@
|
||||
* headers
|
||||
*/
|
||||
|
||||
#include <types.h>
|
||||
#include "common.h"
|
||||
|
||||
#include "nw4r/snd/BankFile.h" // InstInfo
|
||||
#include "nw4r/snd/Channel.h"
|
||||
#include "nw4r/snd/NoteOnCallback.h" // NoteOnInfo
|
||||
#include "nw4r/snd/WaveFile.h" // WaveInfo
|
||||
#include "nw4r/snd/snd_BankFile.h" // InstInfo
|
||||
#include "nw4r/snd/snd_Channel.h"
|
||||
#include "nw4r/snd/snd_NoteOnCallback.h" // NoteOnInfo
|
||||
#include "nw4r/snd/snd_WaveFile.h" // WaveInfo
|
||||
|
||||
#include "nw4r/ut/inlines.h" // ut::Min
|
||||
#include "nw4r/ut/ut_algorithm.h" // ut::Min
|
||||
|
||||
/*******************************************************************************
|
||||
* functions
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/BankFile.h"
|
||||
#include "nw4r/snd/snd_BankFile.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -9,15 +9,14 @@
|
||||
* headers
|
||||
*/
|
||||
|
||||
#include <macros.h> // NW4R_FILE_VERSION
|
||||
#include <types.h>
|
||||
#include "common.h"
|
||||
|
||||
#include "nw4r/snd/Util.h"
|
||||
#include "nw4r/snd/WaveArchive.h" // WaveArchiveReader
|
||||
#include "nw4r/snd/WaveFile.h"
|
||||
#include "nw4r/snd/snd_Util.h"
|
||||
#include "nw4r/snd/snd_WaveArchive.h" // WaveArchiveReader
|
||||
#include "nw4r/snd/snd_WaveFile.h"
|
||||
|
||||
#include "nw4r/ut/binaryFileFormat.h" // ut::BinaryFileHeader
|
||||
#include "nw4r/ut/inlines.h"
|
||||
#include "nw4r/ut/ut_binaryFileFormat.h" // ut::BinaryFileHeader
|
||||
#include "nw4r/ut/ut_algorithm.h"
|
||||
|
||||
#include "nw4r/NW4RAssert.hpp"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/BasicPlayer.h"
|
||||
#include "nw4r/snd/snd_BasicPlayer.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -9,11 +9,10 @@
|
||||
* headers
|
||||
*/
|
||||
|
||||
#include <macros.h> // ARRAY_LENGTH
|
||||
#include <types.h> // f32
|
||||
#include "common.h" // f32
|
||||
|
||||
#include "nw4r/snd/BasicSound.h"
|
||||
#include "nw4r/snd/global.h"
|
||||
#include "nw4r/snd/snd_BasicSound.h"
|
||||
#include "nw4r/snd/snd_global.h"
|
||||
|
||||
#include "nw4r/NW4RAssert.hpp"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/BasicSound.h"
|
||||
#include "nw4r/snd/snd_BasicSound.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -12,19 +12,18 @@
|
||||
#include <climits> // ULONG_MAX
|
||||
#include <cstring>
|
||||
|
||||
#include <macros.h>
|
||||
#include <types.h>
|
||||
#include "common.h"
|
||||
|
||||
#include "nw4r/snd/BasicPlayer.h"
|
||||
#include "nw4r/snd/ExternalSoundPlayer.h"
|
||||
#include "nw4r/snd/global.h"
|
||||
#include "nw4r/snd/MoveValue.h"
|
||||
#include "nw4r/snd/SoundActor.h"
|
||||
#include "nw4r/snd/SoundHandle.h"
|
||||
#include "nw4r/snd/SoundPlayer.h"
|
||||
#include "nw4r/snd/snd_BasicPlayer.h"
|
||||
#include "nw4r/snd/snd_ExternalSoundPlayer.h"
|
||||
#include "nw4r/snd/snd_global.h"
|
||||
#include "nw4r/snd/snd_MoveValue.h"
|
||||
#include "nw4r/snd/snd_SoundActor.h"
|
||||
#include "nw4r/snd/snd_SoundHandle.h"
|
||||
#include "nw4r/snd/snd_SoundPlayer.h"
|
||||
|
||||
#include "nw4r/ut/inlines.h" // ut::Clamp
|
||||
#include "nw4r/ut/RuntimeTypeInfo.h"
|
||||
#include "nw4r/ut/ut_algorithm.h" // ut::Clamp
|
||||
#include "nw4r/ut/ut_RuntimeTypeInfo.h"
|
||||
|
||||
#include "nw4r/NW4RAssert.hpp"
|
||||
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
#include "nw4r/snd/BiquadFilterPreset.h"
|
||||
#include "nw4r/snd/snd_BiquadFilterPreset.h"
|
||||
|
||||
/*******************************************************************************
|
||||
* headers
|
||||
*/
|
||||
|
||||
#include <macros.h> // ATTR_UNUSED
|
||||
#include <types.h> // f32
|
||||
#include "common.h" // f32
|
||||
|
||||
#include "nw4r/snd/BiquadFilterCallback.h"
|
||||
#include "nw4r/snd/snd_BiquadFilterCallback.h"
|
||||
|
||||
#include "nw4r/ut/inlines.h" // ut::Clamp
|
||||
#include "nw4r/ut/ut_algorithm.h" // ut::Clamp
|
||||
|
||||
/*******************************************************************************
|
||||
* variables
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/Channel.h"
|
||||
#include "nw4r/snd/snd_Channel.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -9,20 +9,19 @@
|
||||
* headers
|
||||
*/
|
||||
|
||||
#include <macros.h>
|
||||
#include <types.h>
|
||||
#include "common.h"
|
||||
|
||||
#include "nw4r/snd/EnvGenerator.h"
|
||||
#include "nw4r/snd/global.h"
|
||||
#include "nw4r/snd/InstancePool.h"
|
||||
#include "nw4r/snd/Lfo.h"
|
||||
#include "nw4r/snd/MoveValue.h"
|
||||
#include "nw4r/snd/Util.h"
|
||||
#include "nw4r/snd/Voice.h"
|
||||
#include "nw4r/snd/VoiceManager.h"
|
||||
#include "nw4r/snd/WaveFile.h"
|
||||
#include "nw4r/snd/snd_EnvGenerator.h"
|
||||
#include "nw4r/snd/snd_global.h"
|
||||
#include "nw4r/snd/snd_InstancePool.h"
|
||||
#include "nw4r/snd/snd_Lfo.h"
|
||||
#include "nw4r/snd/snd_MoveValue.h"
|
||||
#include "nw4r/snd/snd_Util.h"
|
||||
#include "nw4r/snd/snd_Voice.h"
|
||||
#include "nw4r/snd/snd_VoiceManager.h"
|
||||
#include "nw4r/snd/snd_WaveFile.h"
|
||||
|
||||
#include "nw4r/ut/Lock.h"
|
||||
#include "nw4r/ut/ut_Lock.h"
|
||||
|
||||
#include "nw4r/NW4RAssert.hpp"
|
||||
|
||||
@@ -117,7 +116,7 @@ Channel::Channel() :
|
||||
|
||||
Channel::~Channel() {}
|
||||
|
||||
void Channel::InitParam(Callback *callback, register_t callbackData)
|
||||
void Channel::InitParam(Callback *callback, u32 callbackData)
|
||||
{
|
||||
mNextLink = nullptr;
|
||||
mCallback = callback;
|
||||
@@ -433,7 +432,7 @@ void Channel::VoiceCallbackFunc(Voice *voice, Voice::VoiceCallbackStatus status,
|
||||
|
||||
Channel *Channel::AllocChannel(int voiceChannelCount, int voiceOutCount,
|
||||
int priority, Callback *callback,
|
||||
register_t callbackData)
|
||||
u32 callbackData)
|
||||
{
|
||||
NW4RAssertHeaderClampedLRValue_Line(606, priority, 0, 255);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/DisposeCallbackManager.h"
|
||||
#include "nw4r/snd/snd_DisposeCallbackManager.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -9,12 +9,11 @@
|
||||
* headers
|
||||
*/
|
||||
|
||||
#include <macros.h>
|
||||
#include <types.h>
|
||||
#include "common.h"
|
||||
|
||||
#include "nw4r/snd/SoundThread.h"
|
||||
#include "nw4r/snd/snd_SoundThread.h"
|
||||
|
||||
#include "nw4r/ut/Lock.h" // ut::AutoInterruptLock
|
||||
#include "nw4r/ut/ut_Lock.h" // ut::AutoInterruptLock
|
||||
|
||||
/*******************************************************************************
|
||||
* functions
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Only implemented to the extent necessary to match data sections. */
|
||||
|
||||
#include "nw4r/snd/DvdSoundArchive.h"
|
||||
#include "nw4r/snd/snd_DvdSoundArchive.h"
|
||||
|
||||
nw4r::snd::DvdSoundArchive::DvdSoundArchive() {}
|
||||
nw4r::snd::DvdSoundArchive::DvdFileStream::DvdFileStream() {}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/EnvGenerator.h"
|
||||
#include "nw4r/snd/snd_EnvGenerator.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -9,7 +9,7 @@
|
||||
* headers
|
||||
*/
|
||||
|
||||
#include <types.h>
|
||||
#include "common.h"
|
||||
|
||||
#include <nw4r/NW4RAssert.hpp>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/ExternalSoundPlayer.h"
|
||||
#include "nw4r/snd/snd_ExternalSoundPlayer.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -10,11 +10,10 @@
|
||||
*/
|
||||
|
||||
#include <decomp.h>
|
||||
#include <macros.h> // NW4R_RANGE_FOR
|
||||
#include <types.h> // nullptr
|
||||
#include "common.h" // nullptr
|
||||
|
||||
#include "nw4r/snd/BasicSound.h"
|
||||
#include "nw4r/snd/SoundThread.h"
|
||||
#include "nw4r/snd/snd_BasicSound.h"
|
||||
#include "nw4r/snd/snd_SoundThread.h"
|
||||
|
||||
#include "nw4r/NW4RAssert.hpp"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/InstancePool.h"
|
||||
#include "nw4r/snd/snd_InstancePool.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -9,10 +9,10 @@
|
||||
* headers
|
||||
*/
|
||||
|
||||
#include <types.h>
|
||||
#include "common.h"
|
||||
|
||||
#include "nw4r/ut/Lock.h" // ut::AutoInterruptLock
|
||||
#include "nw4r/ut/inlines.h" // ut::RoundUp
|
||||
#include "nw4r/ut/ut_Lock.h" // ut::AutoInterruptLock
|
||||
#include "nw4r/ut/ut_algorithm.h" // ut::RoundUp
|
||||
|
||||
#include "nw4r/NW4RAssert.hpp"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/Lfo.h"
|
||||
#include "nw4r/snd/snd_Lfo.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -9,7 +9,7 @@
|
||||
* headers
|
||||
*/
|
||||
|
||||
#include <types.h>
|
||||
#include "common.h"
|
||||
|
||||
#include "nw4r/NW4RAssert.hpp"
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* inline functions and data sections.
|
||||
*/
|
||||
|
||||
#include "nw4r/snd/McsSoundArchive.h"
|
||||
#include "nw4r/snd/snd_McsSoundArchive.h"
|
||||
|
||||
nw4r::snd::McsSoundArchive::McsSoundArchive() {}
|
||||
nw4r::snd::McsSoundArchive::McsFileStream::McsFileStream() {}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/MemorySoundArchive.h"
|
||||
#include "nw4r/snd/snd_MemorySoundArchive.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -12,14 +12,14 @@
|
||||
#include <cstring> // std::memcpy
|
||||
#include <new>
|
||||
|
||||
#include <types.h>
|
||||
#include "common.h"
|
||||
|
||||
#include "nw4r/snd/SoundArchive.h"
|
||||
#include "nw4r/snd/SoundArchiveFile.h" // SoundArchiveFileReader
|
||||
#include "nw4r/snd/snd_SoundArchive.h"
|
||||
#include "nw4r/snd/snd_SoundArchiveFile.h" // SoundArchiveFileReader
|
||||
|
||||
#include "nw4r/ut/FileStream.h"
|
||||
#include "nw4r/ut/inlines.h"
|
||||
#include "nw4r/ut/RuntimeTypeInfo.h" // IWYU pragma: keep (need the complete type)
|
||||
#include "nw4r/ut/ut_FileStream.h"
|
||||
#include "nw4r/ut/ut_algorithm.h"
|
||||
#include "nw4r/ut/ut_RuntimeTypeInfo.h" // IWYU pragma: keep (need the complete type)
|
||||
|
||||
#include "nw4r/NW4RAssert.hpp"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Only implemented to the extent necessary to match early instantiations of
|
||||
* inline functions and data sections. */
|
||||
|
||||
#include "nw4r/snd/MidiSeqPlayer.h"
|
||||
#include "nw4r/snd/snd_MidiSeqPlayer.h"
|
||||
|
||||
nw4r::snd::detail::MidiSeqPlayer::MidiSeqPlayer() {}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Only implemented to the extent necessary to match early instantiations of
|
||||
* inline functions and data sections. */
|
||||
|
||||
#include "nw4r/snd/MidiSeqTrack.h"
|
||||
#include "nw4r/snd/snd_MidiSeqTrack.h"
|
||||
|
||||
nw4r::snd::detail::MidiSeqTrack::MidiSeqTrack() {}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Only implemented to the extent necessary to match early instantiations of
|
||||
* inline functions and data sections. */
|
||||
|
||||
#include "nw4r/snd/MidiSeqTrackAllocator.h"
|
||||
#include "nw4r/snd/snd_MidiSeqTrackAllocator.h"
|
||||
|
||||
nw4r::snd::detail::MidiSeqTrackAllocator::MidiSeqTrackAllocator() {}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/MmlParser.h"
|
||||
#include "nw4r/snd/snd_MmlParser.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -9,24 +9,19 @@
|
||||
* headers
|
||||
*/
|
||||
|
||||
#include <macros.h>
|
||||
#include <types.h>
|
||||
#include "common.h"
|
||||
|
||||
#include "nw4r/snd/global.h"
|
||||
#include "nw4r/snd/Lfo.h" // LfoParam
|
||||
#include "nw4r/snd/MmlSeqTrack.h"
|
||||
#include "nw4r/snd/MoveValue.h"
|
||||
#include "nw4r/snd/SeqPlayer.h"
|
||||
#include "nw4r/snd/SeqTrack.h"
|
||||
#include "nw4r/snd/Util.h" // Util::CalcRandom
|
||||
#include "nw4r/snd/snd_global.h"
|
||||
#include "nw4r/snd/snd_Lfo.h" // LfoParam
|
||||
#include "nw4r/snd/snd_MmlSeqTrack.h"
|
||||
#include "nw4r/snd/snd_MoveValue.h"
|
||||
#include "nw4r/snd/snd_SeqPlayer.h"
|
||||
#include "nw4r/snd/snd_SeqTrack.h"
|
||||
#include "nw4r/snd/snd_Util.h" // Util::CalcRandom
|
||||
|
||||
#include "nw4r/ut/inlines.h"
|
||||
#include "nw4r/ut/ut_algorithm.h"
|
||||
|
||||
#if 0
|
||||
#include <revolution/OS/OSReport.h>
|
||||
#else
|
||||
#include <context_rvl.h>
|
||||
#endif
|
||||
#include <rvl/OS/OSError.h>
|
||||
|
||||
#include "nw4r/NW4RAssert.hpp"
|
||||
|
||||
@@ -846,9 +841,9 @@ Channel *MmlParser::NoteOnCommandProc(MmlSeqTrack *track, int key, int velocity,
|
||||
return track->NoteOn(key, velocity, length, tieFlag);
|
||||
}
|
||||
|
||||
byte2_t MmlParser::Read16(byte_t const **ptr) const
|
||||
u16 MmlParser::Read16(byte_t const **ptr) const
|
||||
{
|
||||
byte2_t ret = ReadByte(ptr);
|
||||
u16 ret = ReadByte(ptr);
|
||||
|
||||
ret <<= 8;
|
||||
ret |= ReadByte(ptr);
|
||||
@@ -856,9 +851,9 @@ byte2_t MmlParser::Read16(byte_t const **ptr) const
|
||||
return ret;
|
||||
}
|
||||
|
||||
byte4_t MmlParser::Read24(byte_t const **ptr) const
|
||||
u32 MmlParser::Read24(byte_t const **ptr) const
|
||||
{
|
||||
byte4_t ret = ReadByte(ptr);
|
||||
u32 ret = ReadByte(ptr);
|
||||
|
||||
ret <<= 8;
|
||||
ret |= ReadByte(ptr);
|
||||
@@ -955,7 +950,7 @@ s16 volatile *MmlParser::GetVariablePtr(SeqPlayer *player, SeqTrack *track,
|
||||
}
|
||||
|
||||
u32 MmlParser::ParseAllocTrack(void const *baseAddress, u32 seqOffset,
|
||||
byte4_t *allocTrack)
|
||||
u32 *allocTrack)
|
||||
{
|
||||
NW4RAssertPointerNonnull_Line(1051, baseAddress);
|
||||
NW4RAssertPointerNonnull_Line(1052, allocTrack);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/MmlSeqTrack.h"
|
||||
#include "nw4r/snd/snd_MmlSeqTrack.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -9,7 +9,7 @@
|
||||
* headers
|
||||
*/
|
||||
|
||||
#include "nw4r/snd/MmlParser.h"
|
||||
#include "nw4r/snd/snd_MmlParser.h"
|
||||
|
||||
/*******************************************************************************
|
||||
* functions
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/MmlSeqTrackAllocator.h"
|
||||
#include "nw4r/snd/snd_MmlSeqTrackAllocator.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -9,11 +9,11 @@
|
||||
* headers
|
||||
*/
|
||||
|
||||
#include <types.h>
|
||||
#include "common.h"
|
||||
|
||||
#include "nw4r/snd/InstancePool.h"
|
||||
#include "nw4r/snd/MmlSeqTrack.h"
|
||||
#include "nw4r/snd/SeqTrack.h"
|
||||
#include "nw4r/snd/snd_InstancePool.h"
|
||||
#include "nw4r/snd/snd_MmlSeqTrack.h"
|
||||
#include "nw4r/snd/snd_SeqTrack.h"
|
||||
|
||||
#include <nw4r/NW4RAssert.hpp>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/PlayerHeap.h"
|
||||
#include "nw4r/snd/snd_PlayerHeap.h"
|
||||
|
||||
/*******************************************************************************
|
||||
* headers
|
||||
@@ -6,12 +6,12 @@
|
||||
|
||||
#include <cstddef> // NULL
|
||||
|
||||
#include <types.h>
|
||||
#include "common.h"
|
||||
|
||||
#include "nw4r/snd/DisposeCallbackManager.h"
|
||||
#include "nw4r/snd/SoundThread.h" // SoundThread::AutoLock
|
||||
#include "nw4r/snd/snd_DisposeCallbackManager.h"
|
||||
#include "nw4r/snd/snd_SoundThread.h" // SoundThread::AutoLock
|
||||
|
||||
#include "nw4r/ut/inlines.h"
|
||||
#include "nw4r/ut/ut_algorithm.h"
|
||||
|
||||
#include "nw4r/NW4RAssert.hpp"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/SeqFile.h"
|
||||
#include "nw4r/snd/snd_SeqFile.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -11,13 +11,12 @@
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <macros.h> // NW4R_FILE_VERSION
|
||||
#include <types.h>
|
||||
#include "common.h"
|
||||
|
||||
#include "nw4r/snd/Util.h"
|
||||
#include "nw4r/snd/snd_Util.h"
|
||||
|
||||
#include "nw4r/ut/binaryFileFormat.h"
|
||||
#include "nw4r/ut/inlines.h" // ut::AddOffsetToPtr
|
||||
#include "nw4r/ut/ut_binaryFileFormat.h"
|
||||
#include "nw4r/ut/ut_algorithm.h" // ut::AddOffsetToPtr
|
||||
|
||||
#include "nw4r/NW4RAssert.hpp"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/SeqPlayer.h"
|
||||
#include "nw4r/snd/snd_SeqPlayer.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -10,16 +10,16 @@
|
||||
*/
|
||||
|
||||
#include <decomp.h>
|
||||
#include <types.h>
|
||||
#include "common.h"
|
||||
|
||||
#include "nw4r/snd/BasicPlayer.h"
|
||||
#include "nw4r/snd/DisposeCallbackManager.h"
|
||||
#include "nw4r/snd/NoteOnCallback.h"
|
||||
#include "nw4r/snd/SeqTrack.h"
|
||||
#include "nw4r/snd/SeqTrackAllocator.h"
|
||||
#include "nw4r/snd/SoundThread.h"
|
||||
#include "nw4r/snd/snd_BasicPlayer.h"
|
||||
#include "nw4r/snd/snd_DisposeCallbackManager.h"
|
||||
#include "nw4r/snd/snd_NoteOnCallback.h"
|
||||
#include "nw4r/snd/snd_SeqTrack.h"
|
||||
#include "nw4r/snd/snd_SeqTrackAllocator.h"
|
||||
#include "nw4r/snd/snd_SoundThread.h"
|
||||
|
||||
#include "nw4r/ut/Lock.h" // ut::AutoInterruptLock
|
||||
#include "nw4r/ut/ut_Lock.h" // ut::AutoInterruptLock
|
||||
|
||||
#include "nw4r/NW4RAssert.hpp"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/SeqSound.h"
|
||||
#include "nw4r/snd/snd_SeqSound.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -10,24 +10,20 @@
|
||||
*/
|
||||
|
||||
#include <decomp.h>
|
||||
#include <types.h>
|
||||
#include "common.h"
|
||||
|
||||
#include "nw4r/snd/BasicSound.h"
|
||||
#include "nw4r/snd/PlayerHeap.h"
|
||||
#include "nw4r/snd/SeqFile.h"
|
||||
#include "nw4r/snd/SeqPlayer.h"
|
||||
#include "nw4r/snd/SeqSoundHandle.h"
|
||||
#include "nw4r/snd/SoundInstanceManager.h"
|
||||
#include "nw4r/snd/TaskManager.h"
|
||||
#include "nw4r/snd/snd_BasicSound.h"
|
||||
#include "nw4r/snd/snd_PlayerHeap.h"
|
||||
#include "nw4r/snd/snd_SeqFile.h"
|
||||
#include "nw4r/snd/snd_SeqPlayer.h"
|
||||
#include "nw4r/snd/snd_SeqSoundHandle.h"
|
||||
#include "nw4r/snd/snd_SoundInstanceManager.h"
|
||||
#include "nw4r/snd/snd_TaskManager.h"
|
||||
|
||||
#include "nw4r/ut/FileStream.h"
|
||||
#include "nw4r/ut/RuntimeTypeInfo.h"
|
||||
#include "nw4r/ut/ut_FileStream.h"
|
||||
#include "nw4r/ut/ut_RuntimeTypeInfo.h"
|
||||
|
||||
#if 0
|
||||
#include <revolution/DVD/dvd.h> // DVD_ECANCELED
|
||||
#else
|
||||
#include <context_rvl.h>
|
||||
#endif
|
||||
#include <rvl/DVD/dvd.h> // DVD_ECANCELED
|
||||
|
||||
#include "nw4r/NW4RAssert.hpp"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/SeqSoundHandle.h"
|
||||
#include "nw4r/snd/snd_SeqSoundHandle.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -9,9 +9,9 @@
|
||||
* headers
|
||||
*/
|
||||
|
||||
#include <types.h> // nullptr
|
||||
#include "common.h" // nullptr
|
||||
|
||||
#include "nw4r/snd/SeqSound.h"
|
||||
#include "nw4r/snd/snd_SeqSound.h"
|
||||
|
||||
/*******************************************************************************
|
||||
* functions
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/SeqTrack.h"
|
||||
#include "nw4r/snd/snd_SeqTrack.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -10,17 +10,17 @@
|
||||
*/
|
||||
|
||||
#include <decomp.h>
|
||||
#include <types.h>
|
||||
#include "common.h"
|
||||
|
||||
#include "nw4r/snd/Channel.h"
|
||||
#include "nw4r/snd/global.h"
|
||||
#include "nw4r/snd/Lfo.h"
|
||||
#include "nw4r/snd/MoveValue.h"
|
||||
#include "nw4r/snd/NoteOnCallback.h"
|
||||
#include "nw4r/snd/SeqPlayer.h"
|
||||
#include "nw4r/snd/SoundThread.h"
|
||||
#include "nw4r/snd/snd_Channel.h"
|
||||
#include "nw4r/snd/snd_global.h"
|
||||
#include "nw4r/snd/snd_Lfo.h"
|
||||
#include "nw4r/snd/snd_MoveValue.h"
|
||||
#include "nw4r/snd/snd_NoteOnCallback.h"
|
||||
#include "nw4r/snd/snd_SeqPlayer.h"
|
||||
#include "nw4r/snd/snd_SoundThread.h"
|
||||
|
||||
#include "nw4r/ut/inlines.h"
|
||||
#include "nw4r/ut/ut_algorithm.h"
|
||||
|
||||
#include "nw4r/NW4RAssert.hpp"
|
||||
|
||||
@@ -370,7 +370,7 @@ void SeqTrack::FreeAllChannel()
|
||||
|
||||
void SeqTrack::ChannelCallbackFunc(Channel *dropChannel,
|
||||
Channel::ChannelCallbackStatus status,
|
||||
register_t userData)
|
||||
u32 userData)
|
||||
{
|
||||
SoundThread::AutoLock lock;
|
||||
|
||||
@@ -571,7 +571,7 @@ Channel *SeqTrack::NoteOn(int key, int velocity, s32 length, bool tieFlag)
|
||||
playerParam.priority + GetParserTrackParam().priority,
|
||||
mSeqPlayer->GetVoiceOutCount(),
|
||||
&ChannelCallbackFunc,
|
||||
reinterpret_cast<register_t>(this)
|
||||
reinterpret_cast<u32>(this)
|
||||
};
|
||||
|
||||
channel = mSeqPlayer->NoteOn(mParserTrackParam.bankNo, info);
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
* inline functions and data sections.
|
||||
*/
|
||||
|
||||
#include "nw4r/snd/SoundActor.h"
|
||||
#include "nw4r/snd/snd_SoundActor.h"
|
||||
|
||||
#include <types.h>
|
||||
#include "common.h"
|
||||
|
||||
#include "nw4r/snd/SoundArchivePlayer.h"
|
||||
#include "nw4r/snd/snd_SoundArchivePlayer.h"
|
||||
|
||||
nw4r::snd::SoundActor::SoundActor() :
|
||||
mSoundArchivePlayer (*new SoundArchivePlayer)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/SoundArchive.h"
|
||||
#include "nw4r/snd/snd_SoundArchive.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -11,9 +11,9 @@
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include <types.h>
|
||||
#include "common.h"
|
||||
|
||||
#include "nw4r/snd/SoundArchiveFile.h" // detail::SoundArchiveFileReader
|
||||
#include "nw4r/snd/snd_SoundArchiveFile.h" // detail::SoundArchiveFileReader
|
||||
|
||||
#include "nw4r/NW4RAssert.hpp"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/SoundArchiveFile.h"
|
||||
#include "nw4r/snd/snd_SoundArchiveFile.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -12,15 +12,14 @@
|
||||
#include <cstring>
|
||||
|
||||
#include <decomp.h>
|
||||
#include <macros.h>
|
||||
#include <types.h>
|
||||
#include "common.h"
|
||||
|
||||
#include "nw4r/snd/global.h"
|
||||
#include "nw4r/snd/SoundArchive.h"
|
||||
#include "nw4r/snd/Util.h"
|
||||
#include "nw4r/snd/snd_global.h"
|
||||
#include "nw4r/snd/snd_SoundArchive.h"
|
||||
#include "nw4r/snd/snd_Util.h"
|
||||
|
||||
#include "nw4r/ut/binaryFileFormat.h" // ut::BinaryFileHeader
|
||||
#include "nw4r/ut/inlines.h" // ut::AddOffsetToPtr
|
||||
#include "nw4r/ut/ut_binaryFileFormat.h" // ut::BinaryFileHeader
|
||||
#include "nw4r/ut/ut_algorithm.h" // ut::AddOffsetToPtr
|
||||
|
||||
#include <nw4r/NW4RAssert.hpp>
|
||||
|
||||
@@ -247,7 +246,7 @@ bool SoundArchiveFileReader::ReadStrmSoundInfo(
|
||||
info->allocChannelCount = 0;
|
||||
|
||||
// is this meant to be src->allocTrackFlag?
|
||||
for (byte2_t bitflag = src->allocChannelCount; bitflag; bitflag >>= 1)
|
||||
for (u16 bitflag = src->allocChannelCount; bitflag; bitflag >>= 1)
|
||||
{
|
||||
if (bitflag & 1)
|
||||
info->allocChannelCount++;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/SoundArchivePlayer.h"
|
||||
#include "nw4r/snd/snd_SoundArchivePlayer.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -12,39 +12,38 @@
|
||||
#include <new>
|
||||
|
||||
#include <decomp.h>
|
||||
#include <macros.h>
|
||||
#include <types.h>
|
||||
#include "common.h"
|
||||
|
||||
#include "nw4r/snd/Bank.h"
|
||||
#include "nw4r/snd/BasicSound.h"
|
||||
#include "nw4r/snd/debug.h"
|
||||
#include "nw4r/snd/DisposeCallbackManager.h"
|
||||
#include "nw4r/snd/ExternalSoundPlayer.h"
|
||||
#include "nw4r/snd/MmlParser.h"
|
||||
#include "nw4r/snd/MmlSeqTrack.h"
|
||||
#include "nw4r/snd/MmlSeqTrackAllocator.h"
|
||||
#include "nw4r/snd/PlayerHeap.h"
|
||||
#include "nw4r/snd/SeqFile.h"
|
||||
#include "nw4r/snd/SeqPlayer.h"
|
||||
#include "nw4r/snd/SeqSound.h"
|
||||
#include "nw4r/snd/SoundActor.h"
|
||||
#include "nw4r/snd/SoundArchive.h"
|
||||
#include "nw4r/snd/SoundHandle.h"
|
||||
#include "nw4r/snd/SoundInstanceManager.h"
|
||||
#include "nw4r/snd/SoundPlayer.h"
|
||||
#include "nw4r/snd/SoundStartable.h"
|
||||
#include "nw4r/snd/SoundSystem.h"
|
||||
#include "nw4r/snd/SoundThread.h"
|
||||
#include "nw4r/snd/StrmChannel.h"
|
||||
#include "nw4r/snd/StrmPlayer.h"
|
||||
#include "nw4r/snd/StrmSound.h"
|
||||
#include "nw4r/snd/WaveFile.h"
|
||||
#include "nw4r/snd/WaveSound.h"
|
||||
#include "nw4r/snd/WsdFile.h"
|
||||
#include "nw4r/snd/WsdPlayer.h"
|
||||
#include "nw4r/snd/snd_Bank.h"
|
||||
#include "nw4r/snd/snd_BasicSound.h"
|
||||
#include "nw4r/snd/snd_debug.h"
|
||||
#include "nw4r/snd/snd_DisposeCallbackManager.h"
|
||||
#include "nw4r/snd/snd_ExternalSoundPlayer.h"
|
||||
#include "nw4r/snd/snd_MmlParser.h"
|
||||
#include "nw4r/snd/snd_MmlSeqTrack.h"
|
||||
#include "nw4r/snd/snd_MmlSeqTrackAllocator.h"
|
||||
#include "nw4r/snd/snd_PlayerHeap.h"
|
||||
#include "nw4r/snd/snd_SeqFile.h"
|
||||
#include "nw4r/snd/snd_SeqPlayer.h"
|
||||
#include "nw4r/snd/snd_SeqSound.h"
|
||||
#include "nw4r/snd/snd_SoundActor.h"
|
||||
#include "nw4r/snd/snd_SoundArchive.h"
|
||||
#include "nw4r/snd/snd_SoundHandle.h"
|
||||
#include "nw4r/snd/snd_SoundInstanceManager.h"
|
||||
#include "nw4r/snd/snd_SoundPlayer.h"
|
||||
#include "nw4r/snd/snd_SoundStartable.h"
|
||||
#include "nw4r/snd/snd_SoundSystem.h"
|
||||
#include "nw4r/snd/snd_SoundThread.h"
|
||||
#include "nw4r/snd/snd_StrmChannel.h"
|
||||
#include "nw4r/snd/snd_StrmPlayer.h"
|
||||
#include "nw4r/snd/snd_StrmSound.h"
|
||||
#include "nw4r/snd/snd_WaveFile.h"
|
||||
#include "nw4r/snd/snd_WaveSound.h"
|
||||
#include "nw4r/snd/snd_WsdFile.h"
|
||||
#include "nw4r/snd/snd_WsdPlayer.h"
|
||||
|
||||
#include "nw4r/ut/FileStream.h"
|
||||
#include "nw4r/ut/inlines.h"
|
||||
#include "nw4r/ut/ut_FileStream.h"
|
||||
#include "nw4r/ut/ut_algorithm.h"
|
||||
|
||||
#include "nw4r/NW4RAssert.hpp"
|
||||
|
||||
@@ -1417,7 +1416,7 @@ detail::Channel *SoundArchivePlayer::SeqNoteOnCallback::NoteOn(
|
||||
bool SoundArchivePlayer::WsdCallback::GetWaveSoundData(
|
||||
detail::WaveSoundInfo *info, detail::WaveSoundNoteInfo *noteInfo,
|
||||
detail::WaveInfo *waveData, void const *waveSoundData, int index,
|
||||
int noteIndex, register_t userData) const
|
||||
int noteIndex, u32 userData) const
|
||||
{
|
||||
u32 fileID = userData;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/SoundHandle.h"
|
||||
#include "nw4r/snd/snd_SoundHandle.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -9,9 +9,9 @@
|
||||
* headers
|
||||
*/
|
||||
|
||||
#include <types.h> // nullptr
|
||||
#include "common.h" // nullptr
|
||||
|
||||
#include "nw4r/snd/BasicSound.h"
|
||||
#include "nw4r/snd/snd_BasicSound.h"
|
||||
|
||||
#include "nw4r/NW4RAssert.hpp"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/SoundPlayer.h"
|
||||
#include "nw4r/snd/snd_SoundPlayer.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -12,15 +12,14 @@
|
||||
#include <climits> // INT_MAX
|
||||
|
||||
#include <decomp.h>
|
||||
#include <macros.h>
|
||||
#include <types.h> // nullptr
|
||||
#include "common.h" // nullptr
|
||||
|
||||
#include "nw4r/snd/BasicSound.h"
|
||||
#include "nw4r/snd/global.h" // AUX_BUS_NUM
|
||||
#include "nw4r/snd/PlayerHeap.h"
|
||||
#include "nw4r/snd/SoundThread.h"
|
||||
#include "nw4r/snd/snd_BasicSound.h"
|
||||
#include "nw4r/snd/snd_global.h" // AUX_BUS_NUM
|
||||
#include "nw4r/snd/snd_PlayerHeap.h"
|
||||
#include "nw4r/snd/snd_SoundThread.h"
|
||||
|
||||
#include "nw4r/ut/inlines.h" // ut::Clamp
|
||||
#include "nw4r/ut/ut_algorithm.h" // ut::Clamp
|
||||
|
||||
#include <nw4r/NW4RAssert.hpp>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/SoundStartable.h"
|
||||
#include "nw4r/snd/snd_SoundStartable.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -9,10 +9,10 @@
|
||||
* headers
|
||||
*/
|
||||
|
||||
#include <types.h> // u32
|
||||
#include "common.h" // u32
|
||||
|
||||
#include "nw4r/snd/BasicSound.h"
|
||||
#include "nw4r/snd/SoundHandle.h"
|
||||
#include "nw4r/snd/snd_BasicSound.h"
|
||||
#include "nw4r/snd/snd_SoundHandle.h"
|
||||
|
||||
/*******************************************************************************
|
||||
* functions
|
||||
@@ -21,7 +21,7 @@
|
||||
namespace nw4r { namespace snd {
|
||||
|
||||
SoundStartable::StartResult SoundStartable::detail_StartSound(
|
||||
SoundHandle *handle, u32 soundId, StartInfo const *startInfo)
|
||||
SoundHandle *handle, u32 soundId, const StartInfo *startInfo)
|
||||
{
|
||||
StartResult result = detail_SetupSound(handle, soundId, false, startInfo);
|
||||
if (result != START_SUCCESS)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/SoundSystem.h"
|
||||
#include "nw4r/snd/snd_SoundSystem.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -10,27 +10,22 @@
|
||||
*/
|
||||
|
||||
#include <decomp.h>
|
||||
#include <macros.h> // STR
|
||||
#include <types.h>
|
||||
#include "common.h"
|
||||
|
||||
#include "nw4r/snd/AxVoiceManager.h"
|
||||
#include "nw4r/snd/AxManager.h"
|
||||
#include "nw4r/snd/Channel.h" // ChannelManager
|
||||
#include "nw4r/snd/global.h"
|
||||
#include "nw4r/snd/SeqPlayer.h"
|
||||
#include "nw4r/snd/SoundThread.h"
|
||||
#include "nw4r/snd/TaskManager.h"
|
||||
#include "nw4r/snd/TaskThread.h"
|
||||
#include "nw4r/snd/VoiceManager.h"
|
||||
#include "nw4r/snd/snd_AxVoiceManager.h"
|
||||
#include "nw4r/snd/snd_AxManager.h"
|
||||
#include "nw4r/snd/snd_Channel.h" // ChannelManager
|
||||
#include "nw4r/snd/snd_global.h"
|
||||
#include "nw4r/snd/snd_SeqPlayer.h"
|
||||
#include "nw4r/snd/snd_SoundThread.h"
|
||||
#include "nw4r/snd/snd_TaskManager.h"
|
||||
#include "nw4r/snd/snd_TaskThread.h"
|
||||
#include "nw4r/snd/snd_VoiceManager.h"
|
||||
|
||||
#if 0
|
||||
#include <revolution/OS/OS.h> // OSRegisterVersion
|
||||
#include <revolution/AX/AXVPB.h> // AXGetMaxVoices
|
||||
#include <revolution/SC/scsystem.h>
|
||||
#include <revolution/SC/scapi.h>
|
||||
#else
|
||||
#include <context_rvl.h>
|
||||
#endif
|
||||
#include <rvl/OS/OS.h> // OSRegisterVersion
|
||||
#include <rvl/AX/AXVPB.h> // AXGetMaxVoices
|
||||
#include <rvl/SC/scsystem.h>
|
||||
#include <rvl/SC/scapi.h>
|
||||
|
||||
#include "nw4r/NW4RAssert.hpp"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/SoundThread.h"
|
||||
#include "nw4r/snd/snd_SoundThread.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -10,25 +10,20 @@
|
||||
*/
|
||||
|
||||
#include <decomp.h>
|
||||
#include <macros.h>
|
||||
#include <types.h>
|
||||
#include "common.h"
|
||||
|
||||
#include "nw4r/snd/AxManager.h"
|
||||
#include "nw4r/snd/AxVoiceManager.h"
|
||||
#include "nw4r/snd/Channel.h" // ChannelManager
|
||||
#include "nw4r/snd/Util.h" // Util::CalcRandom
|
||||
#include "nw4r/snd/VoiceManager.h"
|
||||
#include "nw4r/snd/snd_AxManager.h"
|
||||
#include "nw4r/snd/snd_AxVoiceManager.h"
|
||||
#include "nw4r/snd/snd_Channel.h" // ChannelManager
|
||||
#include "nw4r/snd/snd_Util.h" // Util::CalcRandom
|
||||
#include "nw4r/snd/snd_VoiceManager.h"
|
||||
|
||||
#include "nw4r/ut/Lock.h" // ut::detail::AutoLock
|
||||
#include "nw4r/ut/ut_Lock.h" // ut::detail::AutoLock
|
||||
|
||||
#if 0
|
||||
#include <revolution/OS/OSMessage.h>
|
||||
#include <revolution/OS/OSMutex.h>
|
||||
#include <revolution/OS/OSThread.h>
|
||||
#include <revolution/OS/OSTime.h>
|
||||
#else
|
||||
#include <context_rvl.h>
|
||||
#endif
|
||||
#include <rvl/OS/OSMessage.h>
|
||||
#include <rvl/OS/OSMutex.h>
|
||||
#include <rvl/OS/OSThread.h>
|
||||
#include <rvl/OS/OSTime.h>
|
||||
|
||||
#include "nw4r/NW4RAssert.hpp"
|
||||
|
||||
@@ -65,7 +60,7 @@ bool SoundThread::Create(s32 priority, void *stack, u32 stackSize)
|
||||
return true;
|
||||
|
||||
mCreateFlag = true;
|
||||
mStackEnd = static_cast<byte4_t *>(stack);
|
||||
mStackEnd = static_cast<u32 *>(stack);
|
||||
|
||||
BOOL result = OSCreateThread(&mThread, &SoundThreadFunc, &GetInstance(),
|
||||
static_cast<byte_t *>(stack) + stackSize,
|
||||
@@ -162,7 +157,7 @@ void SoundThread::SoundThreadProc()
|
||||
{
|
||||
OSReceiveMessage(&mMsgQueue, &message, OS_MESSAGE_FLAG_PERSISTENT);
|
||||
|
||||
if (reinterpret_cast<register_t>(message) == MESSAGE_AX_CALLBACK)
|
||||
if (reinterpret_cast<u32>(message) == MESSAGE_AX_CALLBACK)
|
||||
{
|
||||
ut::detail::AutoLock<OSMutex> lock(mMutex);
|
||||
|
||||
@@ -201,7 +196,7 @@ void SoundThread::SoundThreadProc()
|
||||
curItr->at_0x10();
|
||||
}
|
||||
}
|
||||
else if (reinterpret_cast<register_t>(message) == MESSAGE_SHUTDOWN)
|
||||
else if (reinterpret_cast<u32>(message) == MESSAGE_SHUTDOWN)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/StrmChannel.h"
|
||||
#include "nw4r/snd/snd_StrmChannel.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -11,10 +11,10 @@
|
||||
|
||||
#include <cstring> // std::memset
|
||||
|
||||
#include <types.h>
|
||||
#include "common.h"
|
||||
|
||||
#include "nw4r/ut/inlines.h"
|
||||
#include "nw4r/ut/Lock.h" // ut::AutoInterruptLock
|
||||
#include "nw4r/ut/ut_algorithm.h"
|
||||
#include "nw4r/ut/ut_Lock.h" // ut::AutoInterruptLock
|
||||
|
||||
#include "nw4r/NW4RAssert.hpp"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/StrmFile.h"
|
||||
#include "nw4r/snd/snd_StrmFile.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -9,17 +9,16 @@
|
||||
* headers
|
||||
*/
|
||||
|
||||
#include <macros.h>
|
||||
#include <types.h>
|
||||
#include "common.h"
|
||||
|
||||
#include "nw4r/snd/adpcm.h"
|
||||
#include "nw4r/snd/global.h"
|
||||
#include "nw4r/snd/Util.h"
|
||||
#include "nw4r/snd/WaveFile.h"
|
||||
#include "nw4r/snd/snd_adpcm.h"
|
||||
#include "nw4r/snd/snd_global.h"
|
||||
#include "nw4r/snd/snd_Util.h"
|
||||
#include "nw4r/snd/snd_WaveFile.h"
|
||||
|
||||
#include "nw4r/ut/binaryFileFormat.h"
|
||||
#include "nw4r/ut/FileStream.h"
|
||||
#include "nw4r/ut/inlines.h"
|
||||
#include "nw4r/ut/ut_binaryFileFormat.h"
|
||||
#include "nw4r/ut/ut_FileStream.h"
|
||||
#include "nw4r/ut/ut_algorithm.h"
|
||||
|
||||
#include "nw4r/NW4RAssert.hpp"
|
||||
|
||||
@@ -342,7 +341,7 @@ bool StrmFileLoader::ReadAdpcBlockData(u16 *yn1, u16 *yn2, int blockIndex,
|
||||
u32 readDataSize = channelCount * (sizeof(u16) * 2);
|
||||
NW4RAssert_Line(499, readDataSize <= 32);
|
||||
|
||||
alignas(32) u16 buffer[2 * 8];
|
||||
ALIGN_DECL(32) u16 buffer[2 * 8];
|
||||
|
||||
int readSize = mStream.Read(buffer, sizeof buffer);
|
||||
if (readSize != 32u)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/StrmPlayer.h"
|
||||
#include "nw4r/snd/snd_StrmPlayer.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -13,36 +13,31 @@
|
||||
#include <cstring> // std::memcpy
|
||||
|
||||
#include <decomp.h>
|
||||
#include <macros.h> // ATTR_UNUSED
|
||||
#include <types.h>
|
||||
#include "common.h"
|
||||
|
||||
#include "nw4r/snd/StrmSound.h"
|
||||
#include "nw4r/snd/adpcm.h"
|
||||
#include "nw4r/snd/AxVoice.h"
|
||||
#include "nw4r/snd/BasicPlayer.h"
|
||||
#include "nw4r/snd/Channel.h"
|
||||
#include "nw4r/snd/global.h"
|
||||
#include "nw4r/snd/InstancePool.h"
|
||||
#include "nw4r/snd/SoundThread.h"
|
||||
#include "nw4r/snd/StrmChannel.h"
|
||||
#include "nw4r/snd/StrmFile.h"
|
||||
#include "nw4r/snd/TaskManager.h"
|
||||
#include "nw4r/snd/Voice.h"
|
||||
#include "nw4r/snd/VoiceManager.h"
|
||||
#include "nw4r/snd/WaveFile.h"
|
||||
#include "nw4r/snd/snd_StrmSound.h"
|
||||
#include "nw4r/snd/snd_adpcm.h"
|
||||
#include "nw4r/snd/snd_AxVoice.h"
|
||||
#include "nw4r/snd/snd_BasicPlayer.h"
|
||||
#include "nw4r/snd/snd_Channel.h"
|
||||
#include "nw4r/snd/snd_global.h"
|
||||
#include "nw4r/snd/snd_InstancePool.h"
|
||||
#include "nw4r/snd/snd_SoundThread.h"
|
||||
#include "nw4r/snd/snd_StrmChannel.h"
|
||||
#include "nw4r/snd/snd_StrmFile.h"
|
||||
#include "nw4r/snd/snd_TaskManager.h"
|
||||
#include "nw4r/snd/snd_Voice.h"
|
||||
#include "nw4r/snd/snd_VoiceManager.h"
|
||||
#include "nw4r/snd/snd_WaveFile.h"
|
||||
|
||||
#include "nw4r/ut/DvdFileStream.h"
|
||||
#include "nw4r/ut/FileStream.h"
|
||||
#include "nw4r/ut/inlines.h"
|
||||
#include "nw4r/ut/Lock.h"
|
||||
#include "nw4r/ut/RuntimeTypeInfo.h"
|
||||
#include "nw4r/ut/ut_DvdFileStream.h"
|
||||
#include "nw4r/ut/ut_FileStream.h"
|
||||
#include "nw4r/ut/ut_algorithm.h"
|
||||
#include "nw4r/ut/ut_Lock.h"
|
||||
#include "nw4r/ut/ut_RuntimeTypeInfo.h"
|
||||
|
||||
#if 0
|
||||
#include <revolution/OS/OSCache.h>
|
||||
#include <revolution/DVD/dvd.h>
|
||||
#else
|
||||
#include <context_rvl.h>
|
||||
#endif
|
||||
#include <rvl/OS/OSCache.h>
|
||||
#include <rvl/DVD/dvd.h>
|
||||
|
||||
#include "nw4r/NW4RAssert.hpp"
|
||||
|
||||
@@ -90,7 +85,7 @@ StrmPlayer::~StrmPlayer()
|
||||
|
||||
StrmPlayer::SetupResult StrmPlayer::Setup(StrmBufferPool *bufferPool,
|
||||
int allocChannelCount,
|
||||
byte2_t allocTrackFlag,
|
||||
u16 allocTrackFlag,
|
||||
int voiceOutCount)
|
||||
{
|
||||
SoundThread::AutoLock lock;
|
||||
@@ -103,7 +98,7 @@ StrmPlayer::SetupResult StrmPlayer::Setup(StrmBufferPool *bufferPool,
|
||||
InitParam();
|
||||
mChannelCount = ut::Min(allocChannelCount, STRM_CHANNEL_NUM);
|
||||
|
||||
byte4_t bitMask = allocTrackFlag;
|
||||
u32 bitMask = allocTrackFlag;
|
||||
|
||||
int trackIndex;
|
||||
for (trackIndex = 0; bitMask; bitMask >>= 1, trackIndex++)
|
||||
@@ -285,7 +280,7 @@ bool StrmPlayer::Start()
|
||||
return true;
|
||||
}
|
||||
|
||||
u32 StrmPlayer::GetSampleByByte(byte4_t byte, SampleFormat format)
|
||||
u32 StrmPlayer::GetSampleByByte(u32 byte, SampleFormat format)
|
||||
{
|
||||
u32 samples = 0;
|
||||
|
||||
@@ -1344,7 +1339,7 @@ StrmChannel *StrmPlayer::GetTrackChannel(StrmTrack const &track,
|
||||
return &mChannels[index];
|
||||
}
|
||||
|
||||
void StrmPlayer::SetTrackVolume(byte4_t trackBitFlag, f32 volume)
|
||||
void StrmPlayer::SetTrackVolume(u32 trackBitFlag, f32 volume)
|
||||
{
|
||||
ut::AutoInterruptLock lock;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/StrmSound.h"
|
||||
#include "nw4r/snd/snd_StrmSound.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -9,16 +9,15 @@
|
||||
* headers
|
||||
*/
|
||||
|
||||
#include <macros.h> // ARRAY_LENGTH
|
||||
#include <types.h>
|
||||
#include "common.h"
|
||||
|
||||
#include "nw4r/snd/BasicSound.h"
|
||||
#include "nw4r/snd/SoundInstanceManager.h"
|
||||
#include "nw4r/snd/StrmPlayer.h"
|
||||
#include "nw4r/snd/StrmSoundHandle.h"
|
||||
#include "nw4r/snd/MoveValue.h"
|
||||
#include "nw4r/snd/snd_BasicSound.h"
|
||||
#include "nw4r/snd/snd_SoundInstanceManager.h"
|
||||
#include "nw4r/snd/snd_StrmPlayer.h"
|
||||
#include "nw4r/snd/snd_StrmSoundHandle.h"
|
||||
#include "nw4r/snd/snd_MoveValue.h"
|
||||
|
||||
#include "nw4r/ut/RuntimeTypeInfo.h"
|
||||
#include "nw4r/ut/ut_RuntimeTypeInfo.h"
|
||||
|
||||
#include "nw4r/NW4RAssert.hpp"
|
||||
|
||||
@@ -69,7 +68,7 @@ void StrmSound::InitParam()
|
||||
|
||||
StrmPlayer::SetupResult StrmSound::Setup(StrmBufferPool *bufferPool,
|
||||
int allocChannelCount,
|
||||
byte2_t allocTrackFlag)
|
||||
u16 allocTrackFlag)
|
||||
{
|
||||
NW4RAssertPointerNonnull_Line(90, bufferPool);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/StrmSoundHandle.h"
|
||||
#include "nw4r/snd/snd_StrmSoundHandle.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -9,9 +9,9 @@
|
||||
* headers
|
||||
*/
|
||||
|
||||
#include <types.h> // nullptr
|
||||
#include "common.h" // nullptr
|
||||
|
||||
#include "nw4r/snd/StrmSound.h"
|
||||
#include "nw4r/snd/snd_StrmSound.h"
|
||||
|
||||
/*******************************************************************************
|
||||
* functions
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/Task.h"
|
||||
#include "nw4r/snd/snd_Task.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/TaskManager.h"
|
||||
#include "nw4r/snd/snd_TaskManager.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -10,18 +10,14 @@
|
||||
*/
|
||||
|
||||
#include <decomp.h>
|
||||
#include <macros.h> // NW4R_RANGE_FOR_NO_AUTO_INC
|
||||
#include <types.h> // nullptr
|
||||
#include "common.h" // nullptr
|
||||
|
||||
#include "nw4r/snd/Task.h"
|
||||
#include "nw4r/snd/snd_global.h"
|
||||
#include "nw4r/snd/snd_Task.h"
|
||||
|
||||
#include "nw4r/ut/Lock.h" // ut::AutoInterruptLock
|
||||
#include "nw4r/ut/ut_Lock.h" // ut::AutoInterruptLock
|
||||
|
||||
#if 0
|
||||
#include <revolution/OS/OSThread.h>
|
||||
#else
|
||||
#include <context_rvl.h>
|
||||
#endif
|
||||
#include <rvl/OS/OSThread.h>
|
||||
|
||||
#include "nw4r/NW4RAssert.hpp"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/TaskThread.h"
|
||||
#include "nw4r/snd/snd_TaskThread.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -9,15 +9,11 @@
|
||||
* headers
|
||||
*/
|
||||
|
||||
#include <types.h>
|
||||
#include "common.h"
|
||||
|
||||
#include "nw4r/snd/TaskManager.h"
|
||||
#include "nw4r/snd/snd_TaskManager.h"
|
||||
|
||||
#if 0
|
||||
#include <revolution/OS/OSThread.h>
|
||||
#else
|
||||
#include <context_rvl.h>
|
||||
#endif
|
||||
#include <rvl/OS/OSThread.h>
|
||||
|
||||
#include "nw4r/NW4RAssert.hpp"
|
||||
|
||||
@@ -54,7 +50,7 @@ bool TaskThread::Create(s32 priority, void *stack, u32 stackSize)
|
||||
if (!result)
|
||||
return false;
|
||||
|
||||
mStackEnd = static_cast<byte4_t *>(stack);
|
||||
mStackEnd = static_cast<u32 *>(stack);
|
||||
mFinishFlag = false;
|
||||
mCreateFlag = true;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/Util.h"
|
||||
#include "nw4r/snd/snd_Util.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -9,10 +9,9 @@
|
||||
* headers
|
||||
*/
|
||||
|
||||
#include <macros.h> // ARRAY_LENGTH
|
||||
#include <types.h>
|
||||
#include "common.h"
|
||||
|
||||
#include "nw4r/ut/inlines.h"
|
||||
#include "nw4r/ut/ut_algorithm.h"
|
||||
|
||||
#include "nw4r/NW4RAssert.hpp"
|
||||
|
||||
@@ -607,9 +606,9 @@ namespace nw4r { namespace snd { namespace detail
|
||||
// clang-format off
|
||||
f32 const *Util::PanTableTable[PAN_CURVE_NUM] =
|
||||
{
|
||||
[PAN_CURVE_SQRT] = Pan2RatioTableSqrt,
|
||||
[PAN_CURVE_SINCOS] = Pan2RatioTableSinCos,
|
||||
[PAN_CURVE_LINEAR] = Pan2RatioTableLinear,
|
||||
/*[PAN_CURVE_SQRT] = */Pan2RatioTableSqrt,
|
||||
/*[PAN_CURVE_SINCOS] =*/ Pan2RatioTableSinCos,
|
||||
/*[PAN_CURVE_LINEAR] =*/ Pan2RatioTableLinear,
|
||||
};
|
||||
// clang-format on
|
||||
}}} // namespace nw4r::snd::detail
|
||||
@@ -745,7 +744,7 @@ u16 Util::CalcRandom()
|
||||
return u >> 16;
|
||||
}
|
||||
|
||||
void const *Util::GetDataRefAddressImpl(RefType refType, byte4_t value,
|
||||
void const *Util::GetDataRefAddressImpl(RefType refType, u32 value,
|
||||
void const *baseAddress)
|
||||
{
|
||||
if (refType == REFTYPE_OFFSET)
|
||||
|
||||
+13
-18
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/Voice.h"
|
||||
#include "nw4r/snd/snd_Voice.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -10,26 +10,21 @@
|
||||
*/
|
||||
|
||||
#include <decomp.h>
|
||||
#include <macros.h>
|
||||
#include <types.h>
|
||||
#include "common.h"
|
||||
|
||||
#include "nw4r/snd/AxManager.h"
|
||||
#include "nw4r/snd/AxVoiceManager.h"
|
||||
#include "nw4r/snd/AxVoice.h"
|
||||
#include "nw4r/snd/adpcm.h"
|
||||
#include "nw4r/snd/global.h"
|
||||
#include "nw4r/snd/Util.h"
|
||||
#include "nw4r/snd/VoiceManager.h"
|
||||
#include "nw4r/snd/WaveFile.h"
|
||||
#include "nw4r/snd/snd_AxManager.h"
|
||||
#include "nw4r/snd/snd_AxVoiceManager.h"
|
||||
#include "nw4r/snd/snd_AxVoice.h"
|
||||
#include "nw4r/snd/snd_adpcm.h"
|
||||
#include "nw4r/snd/snd_global.h"
|
||||
#include "nw4r/snd/snd_Util.h"
|
||||
#include "nw4r/snd/snd_VoiceManager.h"
|
||||
#include "nw4r/snd/snd_WaveFile.h"
|
||||
|
||||
#include "nw4r/ut/inlines.h"
|
||||
#include "nw4r/ut/Lock.h"
|
||||
#include "nw4r/ut/ut_algorithm.h"
|
||||
#include "nw4r/ut/ut_Lock.h"
|
||||
|
||||
#if 0
|
||||
#include <revolution/AX/AXAlloc.h> // AX_MAX_VOLUME
|
||||
#else
|
||||
#include <context_rvl.h>
|
||||
#endif
|
||||
#include <rvl/AX/AXAlloc.h> // AX_MAX_VOLUME
|
||||
|
||||
#include "nw4r/NW4RAssert.hpp"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/VoiceManager.h"
|
||||
#include "nw4r/snd/snd_VoiceManager.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -11,13 +11,12 @@
|
||||
|
||||
#include <new>
|
||||
|
||||
#include <macros.h> // NW4R_RANGE_FOR_NO_AUTO_INC
|
||||
#include <types.h>
|
||||
#include "common.h"
|
||||
|
||||
#include "nw4r/snd/DisposeCallbackManager.h"
|
||||
#include "nw4r/snd/Voice.h"
|
||||
#include "nw4r/snd/snd_DisposeCallbackManager.h"
|
||||
#include "nw4r/snd/snd_Voice.h"
|
||||
|
||||
#include "nw4r/ut/Lock.h" // ut::AutoInterruptLock
|
||||
#include "nw4r/ut/ut_Lock.h" // ut::AutoInterruptLock
|
||||
|
||||
#include "nw4r/NW4RAssert.hpp"
|
||||
|
||||
@@ -225,7 +224,7 @@ void VoiceManager::UpdateEachVoicePriority(
|
||||
}
|
||||
}
|
||||
|
||||
void VoiceManager::UpdateAllVoicesSync(byte4_t syncFlag)
|
||||
void VoiceManager::UpdateAllVoicesSync(u32 syncFlag)
|
||||
{
|
||||
ut::AutoInterruptLock lock;
|
||||
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
#include "nw4r/snd/WaveArchive.h"
|
||||
#include "nw4r/snd/snd_WaveArchive.h"
|
||||
|
||||
/*******************************************************************************
|
||||
* headers
|
||||
*/
|
||||
|
||||
#include <types.h> // nullptr
|
||||
#include "common.h" // nullptr
|
||||
|
||||
#include "nw4r/snd/Util.h"
|
||||
#include "nw4r/snd/WaveFile.h"
|
||||
#include "nw4r/snd/snd_Util.h"
|
||||
#include "nw4r/snd/snd_WaveFile.h"
|
||||
|
||||
#include "nw4r/ut/binaryFileFormat.h" // ut::BinaryFileHeader
|
||||
#include "nw4r/ut/inlines.h" // ut::AddOffsetToPtr
|
||||
#include "nw4r/ut/ut_algorithm.h" // ut::AddOffsetToPtr
|
||||
|
||||
#include <nw4r/NW4RAssert.hpp>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/WaveFile.h"
|
||||
#include "nw4r/snd/snd_WaveFile.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -9,14 +9,14 @@
|
||||
* headers
|
||||
*/
|
||||
|
||||
#include <types.h>
|
||||
#include "common.h"
|
||||
|
||||
#include "nw4r/snd/AxVoice.h"
|
||||
#include "nw4r/snd/Channel.h"
|
||||
#include "nw4r/snd/global.h"
|
||||
#include "nw4r/snd/snd_AxVoice.h"
|
||||
#include "nw4r/snd/snd_Channel.h"
|
||||
#include "nw4r/snd/snd_global.h"
|
||||
|
||||
#include "nw4r/ut/inlines.h" // ut::AddOffsetToPtr
|
||||
#include "nw4r/ut/binaryFileFormat.h"
|
||||
#include "nw4r/ut/ut_algorithm.h" // ut::AddOffsetToPtr
|
||||
#include "nw4r/ut/ut_binaryFileFormat.h"
|
||||
|
||||
#include "nw4r/NW4RAssert.hpp"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/WaveSound.h"
|
||||
#include "nw4r/snd/snd_WaveSound.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -9,14 +9,14 @@
|
||||
* headers
|
||||
*/
|
||||
|
||||
#include <types.h>
|
||||
#include "common.h"
|
||||
|
||||
#include "nw4r/snd/BasicSound.h"
|
||||
#include "nw4r/snd/SoundInstanceManager.h"
|
||||
#include "nw4r/snd/WaveSoundHandle.h"
|
||||
#include "nw4r/snd/WsdPlayer.h"
|
||||
#include "nw4r/snd/snd_BasicSound.h"
|
||||
#include "nw4r/snd/snd_SoundInstanceManager.h"
|
||||
#include "nw4r/snd/snd_WaveSoundHandle.h"
|
||||
#include "nw4r/snd/snd_WsdPlayer.h"
|
||||
|
||||
#include "nw4r/ut/RuntimeTypeInfo.h"
|
||||
#include "nw4r/ut/ut_RuntimeTypeInfo.h"
|
||||
|
||||
#include "nw4r/NW4RAssert.hpp"
|
||||
|
||||
@@ -49,7 +49,7 @@ WaveSound::WaveSound(SoundInstanceManager<WaveSound> *manager, int priority,
|
||||
bool WaveSound::Prepare(void const *waveSoundBase, s32 waveSoundOffset,
|
||||
WsdPlayer::StartOffsetType startOffsetType, s32 offset,
|
||||
WsdPlayer::WsdCallback const *callback,
|
||||
register_t callbackData)
|
||||
u32 callbackData)
|
||||
{
|
||||
NW4RAssertPointerNonnull_Line(74, waveSoundBase);
|
||||
NW4RAssertPointerNonnull_Line(75, callback);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/WaveSoundHandle.h"
|
||||
#include "nw4r/snd/snd_WaveSoundHandle.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -9,13 +9,13 @@
|
||||
* headers
|
||||
*/
|
||||
|
||||
#include <types.h> // nullptr
|
||||
#include "common.h" // nullptr
|
||||
|
||||
#include "nw4r/snd/BasicSound.h"
|
||||
#include "nw4r/snd/SoundHandle.h"
|
||||
#include "nw4r/snd/WaveSound.h"
|
||||
#include "nw4r/snd/snd_BasicSound.h"
|
||||
#include "nw4r/snd/snd_SoundHandle.h"
|
||||
#include "nw4r/snd/snd_WaveSound.h"
|
||||
|
||||
#include "nw4r/ut/RuntimeTypeInfo.h" // ut::DynamicCast
|
||||
#include "nw4r/ut/ut_RuntimeTypeInfo.h" // ut::DynamicCast
|
||||
|
||||
#include "nw4r/NW4RAssert.hpp"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/WsdFile.h"
|
||||
#include "nw4r/snd/snd_WsdFile.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -9,15 +9,14 @@
|
||||
* headers
|
||||
*/
|
||||
|
||||
#include <macros.h> // NW4R_FILE_VERSION
|
||||
#include <types.h> // nullptr
|
||||
#include "common.h" // nullptr
|
||||
|
||||
#include "nw4r/snd/Util.h" // Util::GetDataRefAddress0
|
||||
#include "nw4r/snd/WaveFile.h"
|
||||
#include "nw4r/snd/WaveArchive.h" // WaveArchiveReader
|
||||
#include "nw4r/snd/snd_Util.h" // Util::GetDataRefAddress0
|
||||
#include "nw4r/snd/snd_WaveFile.h"
|
||||
#include "nw4r/snd/snd_WaveArchive.h" // WaveArchiveReader
|
||||
|
||||
#include "nw4r/ut/binaryFileFormat.h" // ut::BinaryFileHeader
|
||||
#include "nw4r/ut/inlines.h" // ut::AddOffsetToPtr
|
||||
#include "nw4r/ut/ut_binaryFileFormat.h" // ut::BinaryFileHeader
|
||||
#include "nw4r/ut/ut_algorithm.h" // ut::AddOffsetToPtr
|
||||
|
||||
#include "nw4r/NW4RAssert.hpp"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/WsdPlayer.h"
|
||||
#include "nw4r/snd/snd_WsdPlayer.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -9,17 +9,17 @@
|
||||
* headers
|
||||
*/
|
||||
|
||||
#include <types.h>
|
||||
#include "common.h"
|
||||
|
||||
#include "nw4r/snd/BasicPlayer.h"
|
||||
#include "nw4r/snd/Channel.h"
|
||||
#include "nw4r/snd/DisposeCallbackManager.h"
|
||||
#include "nw4r/snd/global.h"
|
||||
#include "nw4r/snd/Voice.h"
|
||||
#include "nw4r/snd/SoundThread.h"
|
||||
#include "nw4r/snd/WaveFile.h"
|
||||
#include "nw4r/snd/snd_BasicPlayer.h"
|
||||
#include "nw4r/snd/snd_Channel.h"
|
||||
#include "nw4r/snd/snd_DisposeCallbackManager.h"
|
||||
#include "nw4r/snd/snd_global.h"
|
||||
#include "nw4r/snd/snd_Voice.h"
|
||||
#include "nw4r/snd/snd_SoundThread.h"
|
||||
#include "nw4r/snd/snd_WaveFile.h"
|
||||
|
||||
#include "nw4r/ut/inlines.h" // ut::Min
|
||||
#include "nw4r/ut/ut_algorithm.h" // ut::Min
|
||||
|
||||
#include "nw4r/NW4RAssert.hpp"
|
||||
|
||||
@@ -35,7 +35,7 @@ WsdPlayer::WsdPlayer() :
|
||||
}
|
||||
|
||||
void WsdPlayer::InitParam(int voiceOutCount, WsdCallback const *callback,
|
||||
register_t callbackData)
|
||||
u32 callbackData)
|
||||
{
|
||||
BasicPlayer::InitParam();
|
||||
|
||||
@@ -66,7 +66,7 @@ void WsdPlayer::InitParam(int voiceOutCount, WsdCallback const *callback,
|
||||
bool WsdPlayer::Prepare(void const *waveSoundBase, int index,
|
||||
StartOffsetType startOffsetType, int startOffset,
|
||||
int voiceOutCount, WsdCallback const *callback,
|
||||
register_t callbackData)
|
||||
u32 callbackData)
|
||||
{
|
||||
SoundThread::AutoLock lock;
|
||||
|
||||
@@ -202,7 +202,7 @@ void WsdPlayer::Update()
|
||||
}
|
||||
|
||||
bool WsdPlayer::StartChannel(WsdCallback const *callback,
|
||||
register_t callbackData)
|
||||
u32 callbackData)
|
||||
{
|
||||
SoundThread::AutoLock lock;
|
||||
|
||||
@@ -234,7 +234,7 @@ bool WsdPlayer::StartChannel(WsdCallback const *callback,
|
||||
|
||||
Channel *channel = Channel::AllocChannel(
|
||||
ut::Min(waveData.numChannels, Channel::CHANNEL_MAX), GetVoiceOutCount(),
|
||||
priority, ChannelCallbackFunc, reinterpret_cast<register_t>(this));
|
||||
priority, ChannelCallbackFunc, reinterpret_cast<u32>(this));
|
||||
if (!channel)
|
||||
return false;
|
||||
|
||||
@@ -357,7 +357,7 @@ void WsdPlayer::UpdateChannel()
|
||||
|
||||
void WsdPlayer::ChannelCallbackFunc(Channel *dropChannel,
|
||||
Channel::ChannelCallbackStatus status,
|
||||
register_t userData)
|
||||
u32 userData)
|
||||
{
|
||||
SoundThread::AutoLock lock;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "nw4r/snd/adpcm.h"
|
||||
#include "nw4r/snd/snd_adpcm.h"
|
||||
|
||||
/* Original source:
|
||||
* kiwi515/ogws
|
||||
@@ -11,13 +11,9 @@
|
||||
|
||||
#include <climits>
|
||||
|
||||
#include <types.h>
|
||||
#include "common.h"
|
||||
|
||||
#if 0
|
||||
#include <revolution/AX/AXVPB.h> // AXPBADPCM
|
||||
#else
|
||||
#include <context_rvl.h>
|
||||
#endif
|
||||
#include <rvl/AX/AXVPB.h> // AXPBADPCM
|
||||
|
||||
/*******************************************************************************
|
||||
* functions
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#include "nw4r/snd/debug.h"
|
||||
#include "nw4r/snd/snd_debug.h"
|
||||
|
||||
/*******************************************************************************
|
||||
* headers
|
||||
*/
|
||||
|
||||
#include <types.h> // byte4_t
|
||||
#include "common.h" // u32
|
||||
|
||||
#include <nw4r/NW4RAssert.hpp>
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace nw4r { namespace snd { namespace
|
||||
|
||||
namespace nw4r { namespace snd { namespace
|
||||
{
|
||||
byte4_t GetWarningBitFlag(DebugWarningFlag warning);
|
||||
u32 GetWarningBitFlag(DebugWarningFlag warning);
|
||||
}}} // namespace nw4r::snd::(unnamed)
|
||||
|
||||
/*******************************************************************************
|
||||
@@ -49,7 +49,7 @@ namespace nw4r { namespace snd { namespace
|
||||
|
||||
namespace nw4r { namespace snd { namespace
|
||||
{
|
||||
byte4_t gWarningFlag = DEBUG_WARNING_BIT_FLAG_NOT_ENOUGH_INSTANCE;
|
||||
u32 gWarningFlag = DEBUG_WARNING_BIT_FLAG_NOT_ENOUGH_INSTANCE;
|
||||
}}} // namespace nw4r::snd::(unnamed)
|
||||
|
||||
/*******************************************************************************
|
||||
@@ -62,7 +62,7 @@ namespace detail {
|
||||
|
||||
bool Debug_GetWarningFlag(DebugWarningFlag warning)
|
||||
{
|
||||
byte4_t bitFlag = GetWarningBitFlag(warning);
|
||||
u32 bitFlag = GetWarningBitFlag(warning);
|
||||
|
||||
return (gWarningFlag & bitFlag) == bitFlag;
|
||||
}
|
||||
@@ -109,9 +109,9 @@ char const *Debug_GetSoundTypeString(DebugSoundType type)
|
||||
|
||||
namespace {
|
||||
|
||||
byte4_t GetWarningBitFlag(DebugWarningFlag warning)
|
||||
u32 GetWarningBitFlag(DebugWarningFlag warning)
|
||||
{
|
||||
byte4_t bitFlag = 0;
|
||||
u32 bitFlag = 0;
|
||||
|
||||
switch (warning)
|
||||
{
|
||||
|
||||
@@ -34,7 +34,7 @@ bool ResFont::SetResource(void *buffer) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (header->magic == MAGIC_UNPACKED) {
|
||||
if (header->signature == MAGIC_UNPACKED) {
|
||||
BinaryBlockHeader *block =
|
||||
reinterpret_cast<BinaryBlockHeader *>(reinterpret_cast<char *>(header) + header->headerSize);
|
||||
|
||||
@@ -115,7 +115,7 @@ FontInformation *ResFont::Rebuild(BinaryFileHeader *header) {
|
||||
block = reinterpret_cast<BinaryBlockHeader *>(reinterpret_cast<char *>(block) + block->length);
|
||||
}
|
||||
|
||||
header->magic = MAGIC_UNPACKED;
|
||||
header->signature = MAGIC_UNPACKED;
|
||||
return info;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace ut {
|
||||
|
||||
/* 8042a9e0 */
|
||||
bool IsValidBinaryFile(const BinaryFileHeader *header, u32 magic, u16 version, u16 numBlocks) {
|
||||
if (header->magic != magic) {
|
||||
if (header->signature != magic) {
|
||||
return false;
|
||||
}
|
||||
if (header->byteOrder != 0xFEFF) {
|
||||
|
||||
@@ -74,7 +74,7 @@ NandRequestWrite *NandRequestThread::writeRequest(const char *filePath, void *da
|
||||
}
|
||||
|
||||
bool NandRequestThread::waitForMessage() {
|
||||
return OSReceiveMessage(&mMessageQueue, nullptr, OS_MSG_PERSISTENT);
|
||||
return OSReceiveMessage(&mMessageQueue, nullptr, OS_MESSAGE_FLAG_PERSISTENT);
|
||||
}
|
||||
|
||||
void NandRequestThread::sendMessage() {
|
||||
|
||||
Reference in New Issue
Block a user