VG3_audio_load()
Load an audio file.SYNTAX
int
VG3_audio_load(struct vg3_window *wstruct,
const char *filename,
int voladj,
int gvidx)
FUNCTION PARAMETERS
wstruct | Window-struct |
filename | Audio-file, can be a wave-, mp3-, flac- or midi-file |
voladj | Fixed volume level for playing this sound, from 0 to 255, default = 100 |
gvidx | Volume-group from VGAG3_AUDIO_VOLUMES, but not VGAG3_AUDIO_VOLUME_ALL |
RETURN VALUE
Returns the audio-descriptor as a positive number or 0 on failure.
ERRORS
On error VG3_errmsg() returns:
EINVAL - error in argument
ENOSPC - too many audio files loaded
ENOMEM - cannot get memory
ENXIO - error loading file
ENOEXEC - error decoding file
DESCRIPTION
Load an audio file and return its audio-descriptor.
Internally played are wave- and flac-files.
Externally played with a coprocess are mp3- and midi-files.
SEE ALSO