VgaGames4 - audio man-pages

[.. upper level ..]

vg4->audio->open()

Open audio system.

SYNTAX
VG_BOOL vg4->audio->open(int freq, VG_BOOL stereo)

FUNCTION PARAMETERS
freq Frequency: one of VG_AUDIO_FREQS
stereo VG_FALSE = mono, VG_TRUE = stereo

RETURN VALUE
Returns boolean: - VG_TRUE: OK - VG_FALSE: Error

DESCRIPTION
Open audio system. In order to play audio files, the audio system must be opened. The format of the audio files to load must be according to the parameters of this function. The bitsize of the audio files must be 16-bit integer.

EXAMPLE
if (!vg4->audio->open(VG_AUDIO_FREQ_MEDIUM, VG_TRUE)) {
  VG_dest();
  exit(1);
}

SEE ALSO
vg4->audio->is_open() vg4->audio->close()