| 1 |
<xml> |
| 2 |
<head> |
| 3 |
<title>Sample Resources</title> |
| 4 |
</head> |
| 5 |
<body> |
| 6 |
|
| 7 |
<h3>Resource options</h3> |
| 8 |
|
| 9 |
<p>Each sample <i>can</i> have the following properties:</p> |
| 10 |
|
| 11 |
<pre> |
| 12 |
<sample |
| 13 |
name="my_sample" |
| 14 |
file="filename" |
| 15 |
format="sound_format" |
| 16 |
stream="[no,yes]" > |
| 17 |
</pre> |
| 18 |
|
| 19 |
<p>To setup a sample resource, it is required to specify the <i>name</i> |
| 20 |
and <i>file</i> attributes of <sample>. If ClanLib has trouble |
| 21 |
determining what format the specified filename is in, the extension known by |
| 22 |
clanlib (eg. "wav") can be told using the <i>format</i> attribute.</p> |
| 23 |
|
| 24 |
<p>Per default a sample is loaded in its entirely into memory. If the |
| 25 |
<i>stream</i> attribute is set to "yes", it will instead stream the sample |
| 26 |
from disk during playback. For very long samples (eg. music in a level), |
| 27 |
this can save considerable memory.</p> |
| 28 |
|
| 29 |
<h3>Sample resource options reference</h3> |
| 30 |
|
| 31 |
<p><b><sample></b></p> |
| 32 |
|
| 33 |
<ul> |
| 34 |
<li>Attribute <b>name</b>: Name of resource. |
| 35 |
<p> |
| 36 |
<i>Valid values</i>:<br> |
| 37 |
<i>Default value</i>: None, MUST BE PRESENT. |
| 38 |
</p> |
| 39 |
</li> |
| 40 |
<li>Attribute <b>file</b>: Filename of sample to be used. |
| 41 |
<p> |
| 42 |
<i>Valid values</i>:<br> |
| 43 |
<i>Default value</i>: None, MUST BE PRESENT. |
| 44 |
</p> |
| 45 |
</li> |
| 46 |
<li>Attribute <b>format</b>: Extension of known format to be used for loading. |
| 47 |
<p> |
| 48 |
<i>Valid values</i>: "wav", "ogg", "it", "xm", "s3m", "mtm", "669", "stm", "ult", "far", "med", "amf", "dsm", "imf", "gdm", "stx", "okt" and "mod"<br> |
| 49 |
<i>Default value</i>: Uses the extension used in the <i>file</i> attribute. |
| 50 |
</p> |
| 51 |
</li> |
| 52 |
<li>Attribute <b>stream</b>: Stream from file flag. |
| 53 |
<p> |
| 54 |
<i>Valid values</i>: "no", "yes"<br> |
| 55 |
<i>Default value</i>: "no" |
| 56 |
</p> |
| 57 |
</li> |
| 58 |
</ul> |
| 59 |
|
| 60 |
</body> |
| 61 |
</xml> |