# NNS_SndHeapCreate

## Syntax

      #include <nnsys/snd.h>

      NNSSndHeapHandle NNS_SndHeapCreate( void* startAddress, u32 size );

## Arguments

`startAddress` | The starting address of the memory region to use as the heap.
`size` | The size of the memory region to use as the heap.

## Return Values

Returns the handle of the heap that was created. Returns `NNS_SND_HEAP_INVALID_HANDLE` if the creation fails.

## Description

Creates the sound heap.

The function fails if the size `size` of the memory region is insufficient. Also, because a heap management region is necessary, the size of the heap that is created is smaller than `size`.

To reuse the memory area passed to this function, use the `NNS_SndHeapDestroy` function to destroy the heap.

## See Also

NNS_SndHeapDestroy

## Revision History

2004/10/04 Added a description about reusing the memory area.
2004/06/01 Initial version.

CONFIDENTIAL