#include <nw/snd/snd_SoundArchivePlayer.h>
bool Initialize(
const SoundArchive* arc,
const SoundDataManager * manager,
void *buffer,
u32 size,
void* strmBuffer,
u32 strmBufferSize
);
| Name | Description | |
|---|---|---|
| in | arc | Sound archive used by the player. |
| in | manager | Sound data manager used by the player. |
| in | buffer | Pointer to the buffer. Must have 32-byte alignment. |
| in | size |
Buffer size. |
| in | strmBuffer | Pointer to the stream buffer. You must specify 32-byte aligned device memory. |
| in | strmBufferSize | The size of the stream buffer. |
Initializes a sound archive player.
Sound archive players must be initialized before they are used. Initializing the sound archive player associates it with a sound archive and sound data manager; this makes the data in the sound archive playable.
You can get the memory size required by the sound archive player using GetRequiredMemSize and GetRequiredStreamBufferSize.
If the required stream buffer size is 0, you can pass NULL to strmBuffer, the pointer to the stream buffer.
If the stream buffer is configured to be larger than the size obtained with GetRequiredStreamBufferSize, it becomes more difficult for stream sounds to stutter. However, there will be a longer delay between when data is loaded and when it is actually played back.
A device memory address must be specified for the stream buffer. Execution stops on an assert, or false is returned, if the addresses given by strmBuffer and strmBuffer + strmBufferSize do not exist in device memory. (Behavior differs depending on the build target.)
Setup to Initialize.CONFIDENTIAL