HGE::Stream_Play

Starts playing an audio stream.

HCHANNEL Stream_Play(
  HSTREAM stream,
  bool loop,
  int volume = 100
);

Parameters

stream
Handle of an audio stream to be played.
loop
If true, the stream is looped until the audio channel is stopped manually.
If false the stream is played once.
volume
The stream's initial volume, ranging from 0 to 100.

Return value

Returns the audio channel handle through which the stream is played. Use this handle with audio channel control functions.

Remarks

Only one instance of a stream can be played at the same time. If the stream is already playing, it is restarted with default parameters.

Requirements

Header: hge.h
Import library: hge.lib

See also

Stream_Load, Stream_Free