NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
nw4r::snd::SoundArchivePlayer Class Reference
Inheritance diagram for nw4r::snd::SoundArchivePlayer:
[legend]

Description

Definition at line 67 of file snd_SoundArchivePlayer.h.

Classes

struct  FileAddress
 
struct  GroupAddress
 
class  SeqNoteOnCallback
 
class  WsdCallback
 

Public Member Functions

virtual void InvalidateData (void const *start, void const *end)
 
virtual void InvalidateWaveData (void const *start, void const *end)
 
virtual ulong detail_ConvertLabelStringToSoundId (char const *label)
 
virtual StartResult detail_SetupSound (SoundHandle *handle, ulong soundId, bool holdFlag, StartInfo const *startInfo)
 
bool Setup (SoundArchive const *arc, void *buffer, ulong size, void *strmBuffer, ulong strmBufferSize)
 
void Shutdown ()
 
bool LoadGroup (ulong id, SoundMemoryAllocatable *pAllocatable, ulong blockSize)
 
bool LoadGroup (const char *pLabel, SoundMemoryAllocatable *pAllocatable, ulong blockSize)
 
bool LoadGroup (int id, SoundMemoryAllocatable *pAllocatable, ulong blockSize)
 
bool LoadGroup (unsigned int id, SoundMemoryAllocatable *pAllocatable, ulong blockSize)
 
bool IsLoadedGroup (ulong groupId) const
 
SoundArchive const & GetSoundArchive () const
 
ulong GetSoundPlayerCount () const
 
SoundPlayerGetSoundPlayer (ulong playerId)
 
bool IsAvailable () const
 
ulong GetRequiredMemSize (SoundArchive const *arc)
 
ulong GetRequiredStrmBufferSize (SoundArchive const *arc)
 
void const * GetGroupAddress (ulong groupId) const
 
void SetGroupAddress (ulong id, const void *pAddr)
 
void const * GetGroupWaveDataAddress (ulong groupId) const
 
void SetGroupWaveDataAddress (ulong id, const void *pAddr)
 
void const * GetFileAddress (ulong fileId) const
 
void const * GetFileWaveDataAddress (ulong fileId) const
 
void const * detail_GetFileAddress (ulong fileId) const
 
void const * detail_GetFileWaveDataAddress (ulong fileId) const
 
bool SetupMram (SoundArchive const *arc, void *buffer, ulong size)
 
bool SetupStrmBuffer (SoundArchive const *arc, void *buffer, ulong size)
 
bool SetupSoundPlayer (SoundArchive const *arc, void **buffer, void *endp)
 
bool SetupSeqSound (SoundArchive const *arc, int numSounds, void **buffer, void *endp)
 
bool SetupWaveSound (SoundArchive const *arc, int numSounds, void **buffer, void *endp)
 
bool SetupStrmSound (SoundArchive const *arc, int numSounds, void **buffer, void *endp)
 
bool SetupSeqTrack (SoundArchive const *arc, int numTracks, void **buffer, void *endp)
 
bool CreateGroupAddressTable (SoundArchive const *arc, void **buffer, void *endp)
 
bool CreateFileAddressTable (SoundArchive const *arc, void **buffer, void *endp)
 
detail::PlayerHeapCreatePlayerHeap (void **buffer, void *endp, ulong heapSize)
 
void Update ()
 
void UpdateCommonSoundParam (detail::BasicSound *sound, SoundArchive::SoundInfo const *commonInfo)
 
SoundStartable::StartResult detail_SetupSoundImpl (SoundHandle *handle, ulong soundId, detail::BasicSound::AmbientInfo *ambientArgInfo, SoundActor *actor, bool holdFlag, SoundStartable::StartInfo const *startInfo)
 
- Public Member Functions inherited from nw4r::snd::SoundStartable
StartResult detail_StartSound (SoundHandle *pHandle, ulong id, const StartInfo *pStartInfo)
 
StartResult detail_StartSound (SoundHandle *pHandle, const char *label, const StartInfo *pStartInfo)
 
StartResult detail_HoldSound (SoundHandle *pHandle, ulong id, const StartInfo *pStartInfo)
 
StartResult detail_HoldSound (SoundHandle *pHandle, const char *label, const StartInfo *pStartInfo)
 
StartResult detail_PrepareSound (SoundHandle *pHandle, ulong id, const StartInfo *pStartInfo)
 
StartResult detail_PrepareSound (SoundHandle *pHandle, const char *label, const StartInfo *pStartInfo)
 
bool StartSound (SoundHandle *pHandle, ulong id)
 
bool StartSound (SoundHandle *pHandle, const char *label)
 
bool StartSound (SoundHandle *pHandle, unsigned int id)
 
bool StartSound (SoundHandle *pHandle, int id)
 
bool HoldSound (SoundHandle *pHandle, ulong id)
 
bool HoldSound (SoundHandle *pHandle, const char *label)
 
bool HoldSound (SoundHandle *pHandle, unsigned int id)
 
bool HoldSound (SoundHandle *pHandle, int id)
 
bool PrepareSound (SoundHandle *pHandle, ulong id)
 
bool PrepareSound (SoundHandle *pHandle, unsigned int id)
 
bool PrepareSound (SoundHandle *pHandle, int id)
 

Static Public Attributes

static int const DEFAULT_STREAM_BLOCK_COUNT
 

Private Types

typedef detail::Util::Table< GroupAddressGroupAddressTable
 
typedef detail::Util::Table< FileAddressFileAddressTable
 

Private Member Functions

template<typename Sound>
Sound * AllocSound (detail::SoundInstanceManager< Sound > *manager, ulong soundId, int priority, int ambientPriority, detail::BasicSound::AmbientInfo *ambientArgInfo)
 
SoundStartable::StartResult PrepareSeqImpl (detail::SeqSound *sound, SoundArchive::SoundInfo const *commonInfo, SoundArchive::SeqSoundInfo const *info, SoundStartable::StartInfo::StartOffsetType startOffsetType, int startOffset, void const *externalSeqDataAddress, char const *externalSeqStartLabel)
 
SoundStartable::StartResult PrepareStrmImpl (detail::StrmSound *sound, SoundArchive::SoundInfo const *commonInfo, SoundArchive::StrmSoundInfo const *info, SoundStartable::StartInfo::StartOffsetType startOffsetType, int startOffset)
 
SoundStartable::StartResult PrepareWaveSoundImpl (detail::WaveSound *sound, SoundArchive::SoundInfo const *commonInfo, SoundArchive::WaveSoundInfo const *info, SoundStartable::StartInfo::StartOffsetType startOffsetType, int startOffset)
 

Private Attributes

SoundArchive const * mSoundArchive
 
GroupAddressTablemGroupTable
 
FileAddressTablemFileTable
 
SoundArchivePlayer_FileManagermFileManager
 
SeqNoteOnCallback mSeqCallback
 
WsdCallback mWsdCallback
 
detail::SeqTrackAllocatormSeqTrackAllocator
 
detail::SeqPlayer::SeqUserprocCallback * mSeqUserprocCallback
 
void * mSeqUserprocCallbackArg
 
ulong mSoundPlayerCount
 
SoundPlayermSoundPlayers
 
detail::SoundInstanceManager< detail::SeqSoundmSeqSoundInstanceManager
 
detail::SoundInstanceManager< detail::StrmSoundmStrmSoundInstanceManager
 
detail::SoundInstanceManager< detail::WaveSoundmWaveSoundInstanceManager
 
detail::MmlSeqTrackAllocator mMmlSeqTrackAllocator
 
detail::StrmBufferPool mStrmBufferPool
 
detail::MmlParser mMmlParser
 
void * mSetupBufferAddress
 
ulong mSetupBufferSize
 

Additional Inherited Members

- Public Types inherited from nw4r::snd::detail::DisposeCallback
typedef ut::LinkList< DisposeCallback, 0x00 > LinkList
 
- Public Types inherited from nw4r::snd::SoundStartable
enum  StartResult {
  START_SUCCESS ,
  START_ERR_LOW_PRIORITY ,
  START_ERR_INVALID_LABEL_STRING ,
  START_ERR_INVALID_SOUNDID ,
  START_ERR_NOT_DATA_LOADED ,
  START_ERR_NOT_ENOUGH_PLAYER_HEAP ,
  START_ERR_CANNOT_OPEN_FILE ,
  START_ERR_NOT_AVAILABLE ,
  START_ERR_CANNOT_ALLOCATE_TRACK ,
  START_ERR_NOT_ENOUGH_INSTANCE ,
  START_ERR_INVALID_PARAMETER ,
  START_ERR_INVALID_SEQ_START_LOCATION_LABEL ,
  START_ERR_USER = 128 ,
  START_ERR_UNKNOWN = 255
}
 
- Public Attributes inherited from nw4r::snd::detail::DisposeCallback
ut::LinkListNode mDisposeLink
 

Member Typedef Documentation

◆ GroupAddressTable

◆ FileAddressTable

Member Function Documentation

◆ InvalidateData()

virtual void nw4r::snd::SoundArchivePlayer::InvalidateData ( void const * start,
void const * end )
virtual

◆ InvalidateWaveData()

virtual void nw4r::snd::SoundArchivePlayer::InvalidateWaveData ( void const * start,
void const * end )
virtual

◆ detail_ConvertLabelStringToSoundId()

virtual ulong nw4r::snd::SoundArchivePlayer::detail_ConvertLabelStringToSoundId ( char const * label)
inlinevirtual

Implements nw4r::snd::SoundStartable.

Definition at line 155 of file snd_SoundArchivePlayer.h.

◆ detail_SetupSound()

virtual StartResult nw4r::snd::SoundArchivePlayer::detail_SetupSound ( SoundHandle * handle,
ulong soundId,
bool holdFlag,
StartInfo const * startInfo )
virtual

◆ LoadGroup() [1/2]

bool nw4r::snd::SoundArchivePlayer::LoadGroup ( int id,
SoundMemoryAllocatable * pAllocatable,
ulong blockSize )
inline

Definition at line 174 of file snd_SoundArchivePlayer.h.

◆ LoadGroup() [2/2]

bool nw4r::snd::SoundArchivePlayer::LoadGroup ( unsigned int id,
SoundMemoryAllocatable * pAllocatable,
ulong blockSize )
inline

Definition at line 177 of file snd_SoundArchivePlayer.h.

◆ GetSoundPlayerCount()

ulong nw4r::snd::SoundArchivePlayer::GetSoundPlayerCount ( ) const
inline

Definition at line 184 of file snd_SoundArchivePlayer.h.

Member Data Documentation

◆ DEFAULT_STREAM_BLOCK_COUNT

int const nw4r::snd::SoundArchivePlayer::DEFAULT_STREAM_BLOCK_COUNT
static

Definition at line 256 of file snd_SoundArchivePlayer.h.

◆ mSoundArchive

SoundArchive const* nw4r::snd::SoundArchivePlayer::mSoundArchive
private

Definition at line 262 of file snd_SoundArchivePlayer.h.

◆ mGroupTable

GroupAddressTable* nw4r::snd::SoundArchivePlayer::mGroupTable
private

Definition at line 263 of file snd_SoundArchivePlayer.h.

◆ mFileTable

FileAddressTable* nw4r::snd::SoundArchivePlayer::mFileTable
private

Definition at line 264 of file snd_SoundArchivePlayer.h.

◆ mFileManager

SoundArchivePlayer_FileManager* nw4r::snd::SoundArchivePlayer::mFileManager
private

Definition at line 265 of file snd_SoundArchivePlayer.h.

◆ mSeqCallback

SeqNoteOnCallback nw4r::snd::SoundArchivePlayer::mSeqCallback
private

Definition at line 266 of file snd_SoundArchivePlayer.h.

◆ mWsdCallback

WsdCallback nw4r::snd::SoundArchivePlayer::mWsdCallback
private

Definition at line 267 of file snd_SoundArchivePlayer.h.

◆ mSeqTrackAllocator

detail::SeqTrackAllocator* nw4r::snd::SoundArchivePlayer::mSeqTrackAllocator
private

Definition at line 268 of file snd_SoundArchivePlayer.h.

◆ mSeqUserprocCallback

detail::SeqPlayer::SeqUserprocCallback* nw4r::snd::SoundArchivePlayer::mSeqUserprocCallback
private

Definition at line 269 of file snd_SoundArchivePlayer.h.

◆ mSeqUserprocCallbackArg

void* nw4r::snd::SoundArchivePlayer::mSeqUserprocCallbackArg
private

Definition at line 270 of file snd_SoundArchivePlayer.h.

◆ mSoundPlayerCount

ulong nw4r::snd::SoundArchivePlayer::mSoundPlayerCount
private

Definition at line 271 of file snd_SoundArchivePlayer.h.

◆ mSoundPlayers

SoundPlayer* nw4r::snd::SoundArchivePlayer::mSoundPlayers
private

Definition at line 272 of file snd_SoundArchivePlayer.h.

◆ mSeqSoundInstanceManager

detail::SoundInstanceManager<detail::SeqSound> nw4r::snd::SoundArchivePlayer::mSeqSoundInstanceManager
private

Definition at line 273 of file snd_SoundArchivePlayer.h.

◆ mStrmSoundInstanceManager

detail::SoundInstanceManager<detail::StrmSound> nw4r::snd::SoundArchivePlayer::mStrmSoundInstanceManager
private

Definition at line 274 of file snd_SoundArchivePlayer.h.

◆ mWaveSoundInstanceManager

detail::SoundInstanceManager<detail::WaveSound> nw4r::snd::SoundArchivePlayer::mWaveSoundInstanceManager
private

Definition at line 275 of file snd_SoundArchivePlayer.h.

◆ mMmlSeqTrackAllocator

detail::MmlSeqTrackAllocator nw4r::snd::SoundArchivePlayer::mMmlSeqTrackAllocator
private

Definition at line 276 of file snd_SoundArchivePlayer.h.

◆ mStrmBufferPool

detail::StrmBufferPool nw4r::snd::SoundArchivePlayer::mStrmBufferPool
private

Definition at line 277 of file snd_SoundArchivePlayer.h.

◆ mMmlParser

detail::MmlParser nw4r::snd::SoundArchivePlayer::mMmlParser
private

Definition at line 278 of file snd_SoundArchivePlayer.h.

◆ mSetupBufferAddress

void* nw4r::snd::SoundArchivePlayer::mSetupBufferAddress
private

Definition at line 279 of file snd_SoundArchivePlayer.h.

◆ mSetupBufferSize

ulong nw4r::snd::SoundArchivePlayer::mSetupBufferSize
private

Definition at line 280 of file snd_SoundArchivePlayer.h.