ClanLib

Sample Resources

Resource options

Each sample can have the following properties:

<sample
	name="my_sample"
	file="filename"
	format="sound_format"
	stream="[no,yes]" >

To setup a sample resource, it is required to specify the name and file attributes of <sample>. If ClanLib has trouble determining what format the specified filename is in, the extension known by clanlib (eg. "wav") can be told using the format attribute.

Per default a sample is loaded in its entirely into memory. If the stream attribute is set to "yes", it will instead stream the sample from disk during playback. For very long samples (eg. music in a level), this can save considerable memory.

Sample resource options reference

<sample>

Questions or comments, write to the ClanLib mailing list.