Sophie

Sophie

distrib > Mageia > 7 > i586 > media > core-release > by-pkgid > a2116f36018873d572acbcadddb8e994 > files > 38

clanlib0.8-docs-0.8.1-22.mga7.i586.rpm


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Sample Resources - ClanLib Game SDK</title>
<link rel="stylesheet" type="text/css" href="../../default.css">
</head>
<body style="background-color: #a4daea; color: black; margin: 1em 3em 1em 3em;">
<div style="border-style: solid; border-width:thin; border-color: black;">
<div style="background-color: white; color: black; padding: .3em 1em .3em 1em; border-bottom-style: dotted; border-bottom-width: 2px;">
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td align="center">
<h1>
<a href="http://www.clanlib.org"><img style="border-style: none; padding-right: 130px;" src="../../gfx/clanlib.png" alt="ClanLib"></a>
</h1>
</td>
</tr>
</table>
<!--<div class="menu">
  <a href="index.html">News</a>
  <a href="intro.html">About</a>
  <a href="download.html">Download</a>
  <a href="cvs.html">CVS</a>
  <a class="active" href="docs.html">Docs</a>
  <a href="games.html">Games</a>
  <a href="contact.html">Contact</a>
  <a href="links.html">Links</a>
</div>-->
</div>
<div style="background-color: white; padding: 1em 3em 1em 3em;">
<!-- clanlib header end -->

<div style="border-bottom-style: dotted;  border-bottom-width: 1px; margin-bottom: 1em;"><h2>Sample Resources</h2></div>



<div style="border-bottom-style: dotted;  border-bottom-width: 1px;"><h3>Resource options</h3></div>

<p>Each sample <i>can</i> have the following properties:</p>

<pre>
&lt;sample
	name="my_sample"
	file="filename"
	format="sound_format"
	stream="[no,yes]" &gt;
</pre>

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

<p>Per default a sample is loaded in its entirely into memory. If the
<i>stream</i> 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.</p>

<div style="border-bottom-style: dotted;  border-bottom-width: 1px;"><h3>Sample resource options reference</h3></div>

<p><b>&lt;sample&gt;</b></p>

<ul>
<li>Attribute <b>name</b>: Name of resource.
  <p>
  <i>Valid values</i>:<br>
  <i>Default value</i>: None, MUST BE PRESENT.
  </p>
</li>
<li>Attribute <b>file</b>: Filename of sample to be used.
  <p>
  <i>Valid values</i>:<br>
  <i>Default value</i>: None, MUST BE PRESENT.
  </p>
</li>
<li>Attribute <b>format</b>: Extension of known format to be used for loading.
  <p>
  <i>Valid values</i>: "wav", "ogg", "it", "xm", "s3m", "mtm", "669", "stm", "ult", "far", "med", "amf", "dsm", "imf", "gdm", "stx", "okt" and "mod"<br>
  <i>Default value</i>: Uses the extension used in the <i>file</i> attribute.
  </p>
</li>
<li>Attribute <b>stream</b>: Stream from file flag.
  <p>
  <i>Valid values</i>: "no", "yes"<br>
  <i>Default value</i>: "no"
  </p>
</li>
</ul>

<!-- clanlib footer begin -->
<div style="margin-top: 0em; text-align: center; color: #a0a0a0; border-top-style: dotted; border-top-width: 1px;">
              Questions or comments, write to the <a href="http://clanlib.org/contact.html">ClanLib mailing list</a>.
            </div>
</div>
</div>
</body>
</html>