spPause

Pause an SPPlayer.

Synopsis

Err spPause (SPPlayer *player)

Description

Pauses playback of an SPPlayer. Use this to stop playback dead in its tracks and be able to pick up at the same spot. This differs from spStop() in that playback cannot be restarted at the position at which spStop() occurred. Resume playback with spResume().

Sets SP_STATUS_F_PAUSED. Calling spPause() multiple times has no effect, the calls do not nest. Calling spPause() while the SPPlayer's SP_STATUS_F_PLAYING flag is not set has no effect. The paused state is superceded by a call to spStop() or spStartPlaying().

There is presently no way to know if an SPPlayer is paused.

Data can still be spooled while paused if there were any completed buffers prior to pausing.

Arguments

player
Pointer to SPPlayer to pause.

Return Value

Non-negative value on success; negative error code on failure.

Implementation

Library call implemented in music.lib V24.

Associated Files

soundplayer.h, music.lib

See Also

spResume(), spStartPlaying(), spStop()