#include <nnsys/snd.h>BOOL NNS_SndPlayerCreateHeap( int playerNo, NNSSndHeapHandle heap, u32 size );
playerNo |
The Player number. |
heap |
The heap used for allocation of the player heap. |
size |
The size of the player heap. |
Creates the player heap.
This function creates a player heap of size size in the sound heap heap. Because of the need for a management region in the player heap, more memory is actually consumed than the memory in the size size. The function will fail if there is insufficient empty space in the original sound heap heap.
The sound heap that was created is connected to the assigned player playerNo. This player heap is used when attempting to play the sequence with the assigned player using the NNS_SndArcPlayerStartSeq function.
Repeatedly calling this function will append a player heap to the assigned player playerNo. Generally, this creates only a number of player heaps equal to the maximum number of simultaneous sequence playbacks on each player. (However, If the sound data that is needed for playback is in the sound heap, there is no need to create a player heap.)
Depending on the heap operations on the original sound heap heap, when the region that allocated the player heap is deallocated, the player heap will be automatically detached from the player.
This function is called inside of the NNS_SndArcPlayerSetup function. When this function is called again, the player heap is appended in such a way that it is added to the settings in the sound archive.
Assign each player the same value for the player heap size size. Connecting a player heap with a different size to one of the players will result in instabilities such as successes and failures in loading the data.
NNS_SndArcPlayerStartSeq, NNS_SndArcPlayerSetup
06/01/2004 Initial version.