# NNS_SndHeapSaveState

## Syntax

      #include <nnsys/snd.h>

      int NNS_SndHeapSaveState( NNSSndHeapHandle heap );

## Arguments

`heap` | Sound heap handle.

## Return Values

Returns the hierarchical level after the state save. Returns a `-1` if the state save fails.

## Description

Saves the state of the sound heap.

The hierarchical level (position within the hierarchy) immediately after heap creation is `0`. The hierarchical level increases by `1` each time this function is called. By calling the `NNS_SndHeapLoadState` function, the assigned hierarchical level will be restored to the state immediately after it was saved.

Saving the state will consume a small amount of the heap. If there is not enough free space in the heap, the function fails.

## See Also

NNS_SndHeapLoadState

## Revision History

2004/06/01 Initial version.

CONFIDENTIAL