View lcov test coverage results on http://www.gnu.org/software/liquidwar6/coverage/src/lib/snd/index.html.
backend: sound backend to use
fx_id: sound fx id
Plays a sound fx.
Return value: 1 on success, 0 on error
backend: sound backend to use
map_dir: map directory, to search additionnal files
music_path: config entry containing multiple paths
music_file: relative/local name of a music file
Tells wether a file is a valid music file, typicallly based on file existence and extension. Not bullet proof, file might actually not be loadable, but chances are 99%.
Return value: 1 if music file, 0 if not
backend: sound backend to use
map_dir: map directory, to search additionnal files
music_path: config entry containing multiple paths
music_file: relative/local name of a music file
Plays a music file.
Return value: 1 if OK, 0 if not.
backend: sound backend to use
music_path: config entry containing multiple paths
music_filter: string filter, must be present
music_exclude: string filter, must not be present
Plays a random music file. The filter and exclude mecanisms are not complete regex filters, only a quick and dirty feature which should still help in some cases, such as sorting musics for the menus and for the rest.
Return value: 1 if OK, 0 if not.
backend: sound backend to use
Stops the music.
Return value: none.
backend: the graphical backend to use
fx_volume: sound fx volume
water_volume: water sounds volume
music_volume: music volume
Sets up the sound backend for good, initializing a playback engine ready to play sounds and set to defaults. This call can typically fail if there's no device available, if the user doesn't have enough rights to access the hardware, and so on.
Return value: 1 on success, 0 if not
backend: sound backend to use
volume: sound fx volume
Changes sound fx volume.
Return value: none.
backend: sound backend to use
volume: water sounds volume
Changes water sounds volume.
Return value: none.
backend: sound backend to use
volume: music volume
Changes music volume.
Return value: none.
backend: sound backend to use
Polling function, must be called on a regular basis.
Return value: none.
backend: the backend to quit
Uninitializes the backend, that is, releases resources, stops playback.
Return value: none.
backend: the backend to represent
Returns a readable version of the backend object.
Return value: a newly allocated pointer.
argc: argc, as passed to
main
argv: argv, as passed to
main
List available snd backends. The hash contains pairs with id and name for each backend. The id is the technical key you can use to load the backend, the name is something more readable you can display in an interface. The backend objects themselves are not instanciated by this (in fact, they are, but released on the fly) you need to load and initialize them afterwards.
Return value: hash containing id/name pairs.
argc: argc, as passed to
main
argv: argv, as passed to
main
name: string containing snd key, typically got from
lw6snd_get_backends
Creates a snd backend, this is just about loading the dynamic library if needed, and/or check snd engine is available, and connect to it. It does not perform initialization.
Return value: snd backend.