# NNS_SndArcStrmMoveVolume

## C Specification

      #include <nnsys/snd.h>

      void NNS_SndArcStrmMoveVolume(
      NNSSndStrmHandle* handle,
      int volume,
      int frames );

## Arguments

`handle` | Pointer to a stream handle
`volume` | Volume value Takes a value between 0 and 127
`frames` | Frame count over which to change

## Return Values

None.

## Description

This function changes the volume of the stream that is connected to the stream handle `handle`. This function does not perform any action if the stream handle is invalid.

The current volume value changes gradually over the number of `frames` to the volume value set with `volume`.

When `frames` is set to 0, the current volume value changes immediately. For example, when the volume is changed from a certain value that is unrelated to the current volume value to another targeted value, call this function with `frames` set to `0`. After changing the current volume value, specify the target volume value with a second call to this function

After a stream starts, the value of the volume is 0. The value of the volume changes to 127 after the next call to the `NNS_SndMain` function. This feature allows for a fade-in effect to occur when this function is called directly after the stream is started to gradually change the volume from the value of 0 to the specified volume value.

This volume value is independent of the volume value that is set in the sound archive and can be combined to create effects. However, the value that is set here is ignored during a fadeout.

## See Also

NNS_SndMain

## Revision History

08/10/2004 Initial version.