snd_BasicPlayer OK

This commit is contained in:
robojumper
2025-05-25 21:57:46 +02:00
parent 7616b37976
commit d016bf8005
8 changed files with 84 additions and 50 deletions
+7 -6
View File
@@ -117,11 +117,11 @@ namespace nw4r { namespace snd { namespace detail
// static members
private:
static u8 const AUX_CALLBACK_WAIT_FRAME;
static u8 const AUX_CALLBACK_WAIT_FRAME = 6;
static u16 const AUX_RETURN_VOLUME_MAX = AX_MAX_VOLUME;
static int const FX_SAMPLE_RATE;
static SampleFormat const FX_SAMPLE_FORMAT;
static int const FX_BUFFER_SIZE;
static int const FX_SAMPLE_RATE = 32000;
static SampleFormat const FX_SAMPLE_FORMAT = SAMPLE_FORMAT_PCM_S32;
static int const FX_BUFFER_SIZE = 0x180;
static int const ZERO_BUFFER_SIZE = 256;
static int const SAMPLES_PAR_AUDIO_FRAME;
static int const AUDIO_FRAME_INTERVAL;
@@ -147,7 +147,7 @@ namespace nw4r { namespace snd { namespace detail
MoveValue<f32, int> mMainOutVolume; // size 0x10, offset 0x2c
MoveValue<f32, int> mVolumeForReset; // size 0x10, offset 0x3c
AIDMACallback mOldAidCallback; // size 0x04, offset 0x4c
s32 mResetReadyCounter; // size 0x04, offset 0x50
volatile s32 mResetReadyCounter; // size 0x04, offset 0x50
MoveValue<f32, int> mAuxFadeVolume[AUX_BUS_NUM]; // size 0x30, offset 0x54
MoveValue<f32, int> mAuxUserVolume[AUX_BUS_NUM]; // size 0x30, offset 0x84
FxBase::LinkList mFxList[AUX_BUS_NUM]; // size 0x24, offset 0xb4
@@ -156,7 +156,8 @@ namespace nw4r { namespace snd { namespace detail
u8 mAuxCallbackWaitCounter[AUX_BUS_NUM]; // size 0x03, offset 0xf0
/* 1 byte padding */
u32 mEffectProcessTick[AUX_BUS_NUM]; // size 0x0c, offset 0xf4
}; // size 0x100
u32 field_0x100;
}; // size 0x104
}}} // namespace nw4r::snd::detail
#endif // NW4R_SND_AX_MANAGER_H
+4 -1
View File
@@ -44,7 +44,8 @@ namespace nw4r { namespace snd { namespace detail
PanMode panMode; // size 0x04, offset 0x28
PanCurve panCurve; // size 0x04, offset 0x2c
f32 fxSend[AUX_BUS_NUM]; // size 0x0c, offset 0x30
VoiceOutParam voiceOutParam[4]; // size 0x60, offset 0x3c
f32 remoteOutVolume[4]; // size 0x04, offset 0x3c
VoiceOutParam voiceOutParam[4]; // size 0x60, offset 0x5c
}; // size 0x9c
}}} // namespace nw4r::snd::detail
@@ -75,6 +76,8 @@ namespace nw4r { namespace snd { namespace detail
// methods
void InitParam();
void SetRemoteOutVolume(int remote, f32 volume);
f32 GetRemoteOutVolume(int remote) const;
f32 GetVolume() const { return mPlayerParamSet.volume; }
f32 GetPitch() const { return mPlayerParamSet.pitch; }