nw::snd::SoundSystem::Initialize Member Function

Syntax

#include <nw/snd/snd_SoundSystem.h>

static void Initialize(
     const SoundSystemParam & param,
     uptr workMem,
     size_t workMemSize
);

Arguments

Name Description
in param Initialization parameter.
in workMem Pointer to the sound system work memory.
in workMemSize The work memory size.

Return Values

None.

Description

The sound library is initialized.

The work memory used by the sound system is passed by the user. Set the parameter necessary for initialization to the SoundSystemParam structure to obtain the memory size necessary for nw::snd::SoundSystem::GetRequiredMemSize.

The thread that performs sound operations, along with the thread that loads sound data from the ROM, are initialized and run using the priority and stack size that were specified for the SoundSystemParam structure.

To initialize inside the nw::snd library without starting a sound thread, call this function with the autoCreateSoundThread member of the SoundSystemParam structure set to false. For details, see the demos/snd/createSoundThreadManually demo.

If a sound thread is not started inside the nw::snd library, GetSoundThreadTickCount will not function correctly.

To make sound threads started in the nw::snd library run in the system core (Core 1), set the soundThreadCoreNo member of the SoundSystemParam structure to 1. For further details, refer to Chapter 8, Running in the System Core, in the Sound Programmer's Guide.

See Also

Finalize
GetRequiredMemSize
SoundSystemParam
IsInitialized

Revision History

2010/09/27
Added information about running in the system core.
2010/06/14
Added a description of how to initialize without starting a sound thread.
2010/03/30
Deleted a note about limitations on the alignment of workMem.
2010/01/29
Changed the function name from InitSoundSystem to Initialize, removed the function that only specified the thread priority, and revised the wording.
2010/01/15
Initial version.

CONFIDENTIAL