# NNS_SndArcStrmCreatePrepareThread

## Syntax

      #include <nnsys/snd.h>

      void NNS_SndArcStrmCreatePrepareThread(
              NNSSndStrmThread* thread,
              u32 threadPrio );

## Arguments

`thread` | Pointer to the structure used for managing thread operations
`threadPrio` | Stream thread priority

## Return Values

None.

## Description

Starts the Stream Prepare thread to perform the processes that prepare the stream. When the Stream Prepare thread is activated, the stream-preparation processes are conducted not by the stream thread but by this Stream Prepare thread. Call this immediately after the `NNS_SndArcStrmInit` function.

Normally, in order to prevent the sound from being interrupted you need to give the sound thread higher priority than the main thread. However, because the stream-preparation processes are conducted before playback, it can be given lower priority than the main thread. By running the Stream Prepare thread you can lighten the operating burden on the main thread.

### Note

Giving lower priority to the Stream Prepare thread will delay the start of stream playback.

Also be aware that when the Stream Prepare thread has lower priority than the main thread, you will need to use functions like `OS_WaitIrq` in order to pass the process to it when the main thread is waiting for a V-Blank or other interrupt.

The memory area for `thread`, which is the structure used for managing thread operations, cannot be reused.

## See Also

NNS_SndArcStrmInit

## Revision History

2005/05/06 Initial version.

CONFIDENTIAL