76 void const *waveDataAddress;
85 void const *waveDataAddress;
96 SeqNoteOnCallback(SoundArchivePlayer
const &player) :
97 mSoundArchivePlayer(player)
101 virtual ~SeqNoteOnCallback() {}
112 SoundArchivePlayer
const &mSoundArchivePlayer;
121 WsdCallback(SoundArchivePlayer
const &player) :
122 mSoundArchivePlayer(player)
125 virtual ~WsdCallback() {}
132 void const *waveSoundData,
int index,
134 ulong userData)
const;
139 SoundArchivePlayer
const &mSoundArchivePlayer;
145 SoundArchivePlayer();
146 virtual ~SoundArchivePlayer();
150 virtual void InvalidateData(
void const *start,
void const *end);
151 virtual void InvalidateWaveData(
void const *start,
void const *end);
155 virtual ulong detail_ConvertLabelStringToSoundId(
char const *label)
158 NW4RAssertPointerNonnull_Line(194, mSoundArchive);
160 return mSoundArchive->ConvertLabelStringToSoundId(label);
162 virtual StartResult detail_SetupSound(
SoundHandle *handle, ulong soundId,
164 StartInfo
const *startInfo);
167 bool Setup(
SoundArchive const *arc,
void *buffer, ulong size,
168 void *strmBuffer, ulong strmBufferSize);
175 return LoadGroup(
static_cast<ulong
>(
id), pAllocatable, blockSize);
177 bool LoadGroup(
unsigned int id, SoundMemoryAllocatable *pAllocatable, ulong blockSize) {
178 return LoadGroup(
static_cast<ulong
>(
id), pAllocatable, blockSize);
181 bool IsLoadedGroup(ulong groupId)
const;
183 SoundArchive
const &GetSoundArchive()
const;
184 ulong GetSoundPlayerCount()
const {
return mSoundPlayerCount; }
185 SoundPlayer &GetSoundPlayer(ulong playerId);
187 bool IsAvailable()
const;
188 ulong GetRequiredMemSize(SoundArchive
const *arc);
189 ulong GetRequiredStrmBufferSize(SoundArchive
const *arc);
190 void const *GetGroupAddress(ulong groupId)
const;
191 void SetGroupAddress(ulong
id,
const void* pAddr);
192 void const *GetGroupWaveDataAddress(ulong groupId)
const;
193 void SetGroupWaveDataAddress(ulong
id,
const void* pAddr);
194 void const *GetFileAddress(ulong fileId)
const;
195 void const *GetFileWaveDataAddress(ulong fileId)
const;
196 void const *detail_GetFileAddress(ulong fileId)
const;
197 void const *detail_GetFileWaveDataAddress(ulong fileId)
const;
199 bool SetupMram(SoundArchive
const *arc,
void *buffer, ulong size);
200 bool SetupStrmBuffer(SoundArchive
const *arc,
void *buffer, ulong size);
201 bool SetupSoundPlayer(SoundArchive
const *arc,
void **buffer,
204 bool SetupSeqSound(SoundArchive
const *arc,
int numSounds,
205 void **buffer,
void *endp);
206 bool SetupWaveSound(SoundArchive
const *arc,
int numSounds,
207 void **buffer,
void *endp);
208 bool SetupStrmSound(SoundArchive
const *arc,
int numSounds,
209 void **buffer,
void *endp);
210 bool SetupSeqTrack(SoundArchive
const *arc,
int numTracks,
211 void **buffer,
void *endp);
213 bool CreateGroupAddressTable(SoundArchive
const *arc,
void **buffer,
215 bool CreateFileAddressTable(SoundArchive
const *arc,
void **buffer,
218 detail::PlayerHeap *CreatePlayerHeap(
void **buffer,
void *endp,
222 void UpdateCommonSoundParam(detail::BasicSound *sound,
223 SoundArchive::SoundInfo
const *commonInfo);
225 SoundStartable::StartResult detail_SetupSoundImpl(
226 SoundHandle *handle, ulong soundId,
227 detail::BasicSound::AmbientInfo *ambientArgInfo, SoundActor *actor,
228 bool holdFlag, SoundStartable::StartInfo
const *startInfo);
231 template <
typename Sound>
233 detail::SoundInstanceManager<Sound> *manager, ulong soundId,
234 int priority,
int ambientPriority,
235 detail::BasicSound::AmbientInfo *ambientArgInfo);
237 SoundStartable::StartResult PrepareSeqImpl(
238 detail::SeqSound *sound, SoundArchive::SoundInfo
const *commonInfo,
239 SoundArchive::SeqSoundInfo
const *info,
240 SoundStartable::StartInfo::StartOffsetType startOffsetType,
241 int startOffset,
void const *externalSeqDataAddress,
242 char const *externalSeqStartLabel);
243 SoundStartable::StartResult PrepareStrmImpl(
244 detail::StrmSound *sound, SoundArchive::SoundInfo
const *commonInfo,
245 SoundArchive::StrmSoundInfo
const *info,
246 SoundStartable::StartInfo::StartOffsetType startOffsetType,
248 SoundStartable::StartResult PrepareWaveSoundImpl(
249 detail::WaveSound *sound, SoundArchive::SoundInfo
const *commonInfo,
250 SoundArchive::WaveSoundInfo
const *info,
251 SoundStartable::StartInfo::StartOffsetType startOffsetType,
256 static int const DEFAULT_STREAM_BLOCK_COUNT;
262 SoundArchive
const *mSoundArchive;
263 GroupAddressTable *mGroupTable;
264 FileAddressTable *mFileTable;
265 SoundArchivePlayer_FileManager *mFileManager;
268 detail::SeqTrackAllocator *mSeqTrackAllocator;
269 detail::SeqPlayer::SeqUserprocCallback *mSeqUserprocCallback;
270 void *mSeqUserprocCallbackArg;
271 ulong mSoundPlayerCount;
272 SoundPlayer *mSoundPlayers;
273 detail::SoundInstanceManager<detail::SeqSound> mSeqSoundInstanceManager;
274 detail::SoundInstanceManager<detail::StrmSound> mStrmSoundInstanceManager;
275 detail::SoundInstanceManager<detail::WaveSound> mWaveSoundInstanceManager;
276 detail::MmlSeqTrackAllocator mMmlSeqTrackAllocator;
277 detail::StrmBufferPool mStrmBufferPool;
278 detail::MmlParser mMmlParser;
279 void *mSetupBufferAddress;
280 ulong mSetupBufferSize;