Commits

Shlomi Fish committed 9e2d4f7

Got all pages to validate.

Comments (0)

Files changed (6)

mikmod-website/binaries.tt2

-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<META http-equiv="Content-Type" content="text/html; charset=utf-8">
-<META NAME="AUTHOR" CONTENT="Raphael Assenat">
-<META NAME="keywords" CONTENT="MikMod, libMikmod, mikmod, libmikmod, music,
-player, unix, linux, 669, amf, dsm, far, gdb, imf, it, med, mod, mtm, s3m, stm, stx, ult,
-xm">
-<META NAME="description" CONTENT="MikMod Logo contest">
-<title>MikMod binary releases</title>
-</head>
-<body bgcolor="#efefdf">
+[% PROCESS "blocks.tt2" %]
+[% SET title = 'MikMod binary releases' %]
+[% PROCESS start_html %]
+
 <h1>Mikmod binary releases</h1>
-<br>
 <h2>Official binaries</h2>
 <p>
 There are no official binaries yet.
 <p>
 <a href="mailto:wizard@syntheticsw.com">Torsten Giebl</a> has contributed
 packages for Slackware 9.1. In case of problems with the packages, please contact him. In case of problem with the library or player, please contact me.
-<br>
+<br />
 <a href="files/binaries/contrib/libmikmod-3.2.0-beta2-i386-1.tgz">
-libmikmod-3.2.0-beta2-i386-1.tgz</a><br>
+libmikmod-3.2.0-beta2-i386-1.tgz</a><br />
 <a href="files/binaries/contrib/mikmod-3.2.2-beta1-i386-1.tgz">
-mikmod-3.2.2-beta1-i386-1.tgz</a><br>
+mikmod-3.2.2-beta1-i386-1.tgz</a><br />
 </p>
 
-<p align="right">
-<a href="http://mikmod.raphnet.net">
-Back to MikMod Homepage
-</a>
-</p>
-
+[% PROCESS link_to_top %]
 
 [% PROCESS "footer.tt2" %]
 

mikmod-website/blocks.tt2

 [% BLOCK link_to_top %]
 <p class="to_top"><a href="http://mikmod.shlomifish.org/">Back to the MikMod Homepage</a></p>
 [% END %]
+
+[% BLOCK start_html %]
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE
+    html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta name="author" content="Raphael Assenat" />
+<meta name="keywords" content="MikMod, libMikmod, mikmod, libmikmod, music,
+player, unix, linux, 669, amf, dsm, far, gdb, imf, it, med, mod, mtm, s3m, stm, stx, ult, xm" />
+<meta name="description" content="[% title %]" />
+<style type="text/css">
+    body { background-color: #efefef; }
+    .logo { text-align: left; }
+    .wrap { background-color: #ffffef; }
+    .to_top, .r { text-align: right; }
+</style>
+<title>[% title %]</title>
+</head>
+<body>
+[% END %]

mikmod-website/doc/libmikmod-3.1.10/docs/mikmod.html

-<html lang="en"><head>
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang=
+"en-US">
+<head>
+<meta name="generator" content=
+"HTML Tidy for Linux (vers 25 March 2009), see www.w3.org" />
 <title>MikMod sound library</title>
-<meta http-equiv="Content-Type" content="text/html">
-<meta name=description content="MikMod sound library">
-<meta name=generator content="makeinfo 4.0">
-<link href="http://texinfo.org/" rel=generator-home>
-</head><body>
-
-<p><hr>
-Node:<a name="Top">Top</a>,
-Next:<a rel=next href="#Introduction">Introduction</a>,
-Previous:<a rel=previous href="#(dir)">(dir)</a>,
-Up:<a rel=up href="#(dir)">(dir)</a>
-<br>
-
+<meta http-equiv="Content-Type" content="text/html" />
+<meta name="description" content="MikMod sound library" />
+<meta name="generator" content="makeinfo 4.0" />
+<link href="http://texinfo.org/" rel="generator-home" />
+</head>
+<body>
+<hr />
+Node:<a name="Top" id="Top">Top</a>, Next:<a rel="next" href=
+"#Introduction">Introduction</a>, Previous:<a rel="previous" href=
+"#(dir)">(dir)</a>, Up:<a rel="up" href="#(dir)">(dir)</a><br />
 <h1>MikMod Sound Library</h1>
-
-<p>This&nbsp;manual&nbsp;documents&nbsp;the&nbsp;MikMod&nbsp;Sound&nbsp;Library,&nbsp;version&nbsp;3.1.10.
-
+<p>
+This&nbsp;manual&nbsp;documents&nbsp;the&nbsp;MikMod&nbsp;Sound&nbsp;Library,&nbsp;version&nbsp;3.1.10.</p>
 <ul>
-<li><a href="#Introduction">Introduction</a>:           What is MikMod ? 
-<li><a href="#Tutorial">Tutorial</a>:               Your first steps with MikMod. 
-<li><a href="#Using%20the%20Library">Using the Library</a>:      A thematic presentation of the library. 
-<li><a href="#Library%20Reference">Library Reference</a>:      Detailed description of the functions and variables. 
-<li><a href="#Index">Index</a>: 
+<li><a href="#Introduction">Introduction</a>: What is MikMod ?</li>
+<li><a href="#Tutorial">Tutorial</a>: Your first steps with
+MikMod.</li>
+<li><a href="#Using_the_Library">Using the Library</a>: A
+thematic presentation of the library.</li>
+<li><a href="#Library_Reference">Library Reference</a>: Detailed
+description of the functions and variables.</li>
+<li><a href="#Index">Index</a>:</li>
 </ul>
-
-<p><hr>
-Node:<a name="Introduction">Introduction</a>,
-Next:<a rel=next href="#Tutorial">Tutorial</a>,
-Previous:<a rel=previous href="#Top">Top</a>,
-Up:<a rel=up href="#Top">Top</a>
-<br>
-
+<hr />
+Node:<a name="Introduction" id="Introduction">Introduction</a>,
+Next:<a rel="next" href="#Tutorial">Tutorial</a>, Previous:<a rel=
+"previous" href="#Top">Top</a>, Up:<a rel="up" href=
+"#Top">Top</a><br />
 <h1>Introduction</h1>
-
-<p>The MikMod sound library is an excellent way for a programmer to add music
-and sound effects to an application. It is a powerful and flexible library,
-with a simple and easy-to-learn API.
-
-<p>Besides, the library is very portable and runs under a lot of Unices, as well
-as under OS/2, MacOS and Windows. Third party individuals also maintain ports
-on other systems, including MS-DOS, and BeOS.
-
-<p>MikMod is able to play a wide range of module formats, as well as digital sound
-files. It can take advantage of particular features of your system, such as
-sound redirection over the network. And due to its modular nature, the library
-can be extended to support more sound or module formats, as well as new
-hardware or other sound output capabilities, as they appear.
-
-<p><hr>
-Node:<a name="Tutorial">Tutorial</a>,
-Next:<a rel=next href="#Using%20the%20Library">Using the Library</a>,
-Previous:<a rel=previous href="#Introduction">Introduction</a>,
-Up:<a rel=up href="#Top">Top</a>
-<br>
-
+<p>The MikMod sound library is an excellent way for a programmer to
+add music and sound effects to an application. It is a powerful and
+flexible library, with a simple and easy-to-learn API.</p>
+<p>Besides, the library is very portable and runs under a lot of
+Unices, as well as under OS/2, MacOS and Windows. Third party
+individuals also maintain ports on other systems, including MS-DOS,
+and BeOS.</p>
+<p>MikMod is able to play a wide range of module formats, as well
+as digital sound files. It can take advantage of particular
+features of your system, such as sound redirection over the
+network. And due to its modular nature, the library can be extended
+to support more sound or module formats, as well as new hardware or
+other sound output capabilities, as they appear.</p>
+<hr />
+Node:<a name="Tutorial" id="Tutorial">Tutorial</a>, Next:<a rel=
+"next" href="#Using_the_Library">Using the Library</a>,
+Previous:<a rel="previous" href="#Introduction">Introduction</a>,
+Up:<a rel="up" href="#Top">Top</a><br />
 <h1>Tutorial</h1>
-
-<p>This chapter will describe how to quickly incorporate MikMod's power into
-your programs. It doesn't cover everything, but that's a start and I hope
-it will help you understand the library philosophy.
-
-<p>If you have a real tutorial to put here, you're welcome ! Please send it to
-me<small>...</small>.
-
+<p>This chapter will describe how to quickly incorporate MikMod's
+power into your programs. It doesn't cover everything, but that's a
+start and I hope it will help you understand the library
+philosophy.</p>
+<p>If you have a real tutorial to put here, you're welcome ! Please
+send it to me…</p>
 <ul>
-<li><a href="#MikMod%20Concepts">MikMod Concepts</a>:          A few things you'll need to know. 
-<li><a href="#A%20Skeleton%20Program">A Skeleton Program</a>:       The shortest MikMod program. 
-<li><a href="#Playing%20Modules">Playing Modules</a>:          How to create a simple module player. 
-<li><a href="#Playing%20Sound%20Effects">Playing Sound Effects</a>:    How to play simple sound effects. 
-<li><a href="#More%20Sound%20Effects">More Sound Effects</a>:       How to play more complex sound effects. 
+<li><a href="#MikMod_Concepts">MikMod Concepts</a>: A few things
+you'll need to know.</li>
+<li><a href="#A_Skeleton_Program">A Skeleton Program</a>: The
+shortest MikMod program.</li>
+<li><a href="#Playing_Modules">Playing Modules</a>: How to create
+a simple module player.</li>
+<li><a href="#Playing_Sound_Effects">Playing Sound Effects</a>:
+How to play simple sound effects.</li>
+<li><a href="#More_Sound_Effects">More Sound Effects</a>: How
+to play more complex sound effects.</li>
 </ul>
-
-<p><hr>
-Node:<a name="MikMod%20Concepts">MikMod Concepts</a>,
-Next:<a rel=next href="#A%20Skeleton%20Program">A Skeleton Program</a>,
-Previous:<a rel=previous href="#Tutorial">Tutorial</a>,
-Up:<a rel=up href="#Tutorial">Tutorial</a>
-<br>
-
+<hr />
+Node:<a name="MikMod_Concepts">MikMod Concepts</a>, Next:<a rel=
+"next" href="#A_Skeleton_Program">A Skeleton Program</a>,
+Previous:<a rel="previous" href="#Tutorial">Tutorial</a>,
+Up:<a rel="up" href="#Tutorial">Tutorial</a><br />
 <h2>MikMod Concepts</h2>
-
-<p>MikMod's sound output is composed of several sound <em>voices</em> which are
-mixed, either in software or in hardware, depending of your hardware
-configuration. Simple sounds, like sound effects, use only one voice, whereas
-sound modules, which are complex arrangements of sound effects, use several
-voices.
-
-<p>MikMod's functions operate either globally, or at the voice level. Differences
-in the handling of sound effects and modules are kept minimal, at least for
-the programmer.
-
-<p>The sound playback is done by a <em>sound driver</em>. MikMod provides several
-sound drivers: different hardware drivers, and some software drivers to
-redirect sound in a file, or over the network. You can even add your own
-driver, register it to make it known by the library, and select it (this is
-exactly what the module plugin of xmms does).
-
-<p><hr>
-Node:<a name="A%20Skeleton%20Program">A Skeleton Program</a>,
-Next:<a rel=next href="#Playing%20Modules">Playing Modules</a>,
-Previous:<a rel=previous href="#MikMod%20Concepts">MikMod Concepts</a>,
-Up:<a rel=up href="#Tutorial">Tutorial</a>
-<br>
-
+<p>MikMod's sound output is composed of several sound
+<em>voices</em> which are mixed, either in software or in hardware,
+depending of your hardware configuration. Simple sounds, like sound
+effects, use only one voice, whereas sound modules, which are
+complex arrangements of sound effects, use several voices.</p>
+<p>MikMod's functions operate either globally, or at the voice
+level. Differences in the handling of sound effects and modules are
+kept minimal, at least for the programmer.</p>
+<p>The sound playback is done by a <em>sound driver</em>. MikMod
+provides several sound drivers: different hardware drivers, and
+some software drivers to redirect sound in a file, or over the
+network. You can even add your own driver, register it to make it
+known by the library, and select it (this is exactly what the
+module plugin of xmms does).</p>
+<hr />
+Node:<a name="A_Skeleton_Program">A Skeleton Program</a>,
+Next:<a rel="next" href="#Playing_Modules">Playing Modules</a>,
+Previous:<a rel="previous" href="#MikMod_Concepts">MikMod
+Concepts</a>, Up:<a rel="up" href="#Tutorial">Tutorial</a><br />
 <h2>A Skeleton Program</h2>
-
-<p>To use MikMod in your program, there are a few steps required:
-
+<p>To use MikMod in your program, there are a few steps
+required:</p>
 <ul>
-<li>Include <code>mikmod.h</code> in your program. 
-<li>Register the MikMod drivers you need. 
-<li>Initialize the library with MikMod_Init() before using any other MikMod
-function. 
-<li>Give up resources with MikMod_Exit() at the end of your program, or before
-when MikMod is not needed anymore. 
-<li>Link your application with the MikMod sound library. 
+<li>Include <code>mikmod.h</code> in your program.</li>
+<li>Register the MikMod drivers you need.</li>
+<li>Initialize the library with MikMod_Init() before using any
+other MikMod function.</li>
+<li>Give up resources with MikMod_Exit() at the end of your
+program, or before when MikMod is not needed anymore.</li>
+<li>Link your application with the MikMod sound library.</li>
 </ul>
-
-<p>Here's a program which meets all those conditions:
-
-<pre>/* MikMod Sound Library example program: a skeleton */
+<p>Here's a program which meets all those conditions:</p>
+<pre>
+/* MikMod Sound Library example program: a skeleton */
 
 #include &lt;mikmod.h&gt;
 
 main()
 {
-	/* register all the drivers */
-	MikMod_RegisterAllDrivers();
+        /* register all the drivers */
+        MikMod_RegisterAllDrivers();
 
-	/* initialize the library */
-	MikMod_Init("");
+        /* initialize the library */
+        MikMod_Init("");
 
-	/* we could play some sound here... */
+        /* we could play some sound here... */
 
-	/* give up */
-	MikMod_Exit();
+        /* give up */
+        MikMod_Exit();
 }
 </pre>
-
 <p>This program would be compiled with the following command line:
-<code>cc -o example example.c `libmikmod-config --cflags` `libmikmod-config --libs`</code>
-
-<p>Although this programs produces no useful result, many things happen when you
-run it. The call to <code>MikMod_RegisterAllDrivers</code> registers all the drivers
-embedded in the MikMod library. Then, <code>MikMod_Init</code> chooses the more
-adequate driver and initializes it. The program is now ready to produce sound. 
-When sound is not needed any more, <code>MikMod_Exit</code> is used to relinquish
-memory and let other programs have access to the sound hardware.
-
-<p><hr>
-Node:<a name="Playing%20Modules">Playing Modules</a>,
-Next:<a rel=next href="#Playing%20Sound%20Effects">Playing Sound Effects</a>,
-Previous:<a rel=previous href="#A%20Skeleton%20Program">A Skeleton Program</a>,
-Up:<a rel=up href="#Tutorial">Tutorial</a>
-<br>
-
+<code>cc -o example example.c `libmikmod-config --cflags`
+`libmikmod-config --libs`</code></p>
+<p>Although this programs produces no useful result, many things
+happen when you run it. The call to
+<code>MikMod_RegisterAllDrivers</code> registers all the drivers
+embedded in the MikMod library. Then, <code>MikMod_Init</code>
+chooses the more adequate driver and initializes it. The program is
+now ready to produce sound. When sound is not needed any more,
+<code>MikMod_Exit</code> is used to relinquish memory and let other
+programs have access to the sound hardware.</p>
+<hr />
+Node:<a name="Playing_Modules">Playing Modules</a>, Next:<a rel=
+"next" href="#Playing_Sound_Effects">Playing Sound Effects</a>,
+Previous:<a rel="previous" href="#A_Skeleton_Program">A
+Skeleton Program</a>, Up:<a rel="up" href=
+"#Tutorial">Tutorial</a><br />
 <h2>Playing Modules</h2>
-
-<p>Our program is not really useful if it doesn't produce sound. Let's suppose
-you've got this good old module, "Beyond music", in the file
-<code>beyond music.mod</code>. How about playing it ?
-
-<p>To do this, we'll use the following code:
-
-<pre>/* MikMod Sound Library example program: a simple module player */
+<p>Our program is not really useful if it doesn't produce sound.
+Let's suppose you've got this good old module, "Beyond music", in
+the file <code>beyond music.mod</code>. How about playing it ?</p>
+<p>To do this, we'll use the following code:</p>
+<pre>
+/* MikMod Sound Library example program: a simple module player */
 
 #include &lt;unistd.h&gt;
 #include &lt;mikmod.h&gt;
     MikMod_Exit();
 }
 </pre>
-
-<p>What's new here ? First, we've not only registered MikMod's device driver,
-but also the module loaders. MikMod comes with a large choice of module
-loaders, each one for a different module type. Since <em>every</em> loader is
-called to determine the type of the module when we try to load them, you may
-want to register only a few of them to save time. In our case, we don't matter,
-so we happily register every module loader.
-
-<p>Then, there's an extra line before calling <code>MikMod_Init</code>. We change the
-value of MikMod's variable <code>md_mode</code> to tell the library that we want the
-module to be processed by the software. If you're the happy owner of a GUS-type
-card, you could use the specific hardware driver for this card, but in this
-case you should not set the <code>DMODE_SOFT_MUSIC</code> flag.
-
-<p>We'll ensure that <code>MikMod_Init</code> was successful. Note that, in case of
-error, MikMod provides the variable <code>MikMod_errno</code>, an equivalent of
-the C library <code>errno</code> for MikMod errors, and the function
-<code>MikMod_strerror</code>, an equivalent to <code>strerror</code>.
-
-<p>Now onto serious business ! The module is loaded with the <code>Player_Load</code>
-function, which takes the name of the module file, and the number of voices
-afforded to the module. In this case, the module has only 4 channels, so 4
-voices, but complex Impulse Tracker modules can have a lot of voices (as they
-can have as many as 256 virtual channels with so-called "new note actions"). 
-Since empty voices don't cost time to be processed, it is safe to use a big
-value, such as 64 or 128. The third parameter is the "curiosity" of the
-loader: if nonzero, the loader will search for hidden parts in the module. 
-However, only a few module formats can embed hidden or non played parts, so
-we'll use 0 here.
-
-<p>Now that the module is ready to play, let's play it. We inform the player that
-the current module is <code>module</code> with <code>Player_Start</code>. Playback starts,
-but we have to update it on a regular basis. So there's a loop on the result
-of the <code>Player_Active</code> function, which will tell us if the module has
-finished. To update the sound, we simply call <code>MikMod_Update</code>.
-
-<p>After the module has finished, we tell the player its job is done with
-<code>Player_Stop</code>, and we free the module with <code>Player_Free</code>.
-
-<p><hr>
-Node:<a name="Playing%20Sound%20Effects">Playing Sound Effects</a>,
-Next:<a rel=next href="#More%20Sound%20Effects">More Sound Effects</a>,
-Previous:<a rel=previous href="#Playing%20Modules">Playing Modules</a>,
-Up:<a rel=up href="#Tutorial">Tutorial</a>
-<br>
-
+<p>What's new here ? First, we've not only registered MikMod's
+device driver, but also the module loaders. MikMod comes with a
+large choice of module loaders, each one for a different module
+type. Since <em>every</em> loader is called to determine the type
+of the module when we try to load them, you may want to register
+only a few of them to save time. In our case, we don't matter, so
+we happily register every module loader.</p>
+<p>Then, there's an extra line before calling
+<code>MikMod_Init</code>. We change the value of MikMod's variable
+<code>md_mode</code> to tell the library that we want the module to
+be processed by the software. If you're the happy owner of a
+GUS-type card, you could use the specific hardware driver for this
+card, but in this case you should not set the
+<code>DMODE_SOFT_MUSIC</code> flag.</p>
+<p>We'll ensure that <code>MikMod_Init</code> was successful. Note
+that, in case of error, MikMod provides the variable
+<code>MikMod_errno</code>, an equivalent of the C library
+<code>errno</code> for MikMod errors, and the function
+<code>MikMod_strerror</code>, an equivalent to
+<code>strerror</code>.</p>
+<p>Now onto serious business ! The module is loaded with the
+<code>Player_Load</code> function, which takes the name of the
+module file, and the number of voices afforded to the module. In
+this case, the module has only 4 channels, so 4 voices, but complex
+Impulse Tracker modules can have a lot of voices (as they can have
+as many as 256 virtual channels with so-called "new note actions").
+Since empty voices don't cost time to be processed, it is safe to
+use a big value, such as 64 or 128. The third parameter is the
+"curiosity" of the loader: if nonzero, the loader will search for
+hidden parts in the module. However, only a few module formats can
+embed hidden or non played parts, so we'll use 0 here.</p>
+<p>Now that the module is ready to play, let's play it. We inform
+the player that the current module is <code>module</code> with
+<code>Player_Start</code>. Playback starts, but we have to update
+it on a regular basis. So there's a loop on the result of the
+<code>Player_Active</code> function, which will tell us if the
+module has finished. To update the sound, we simply call
+<code>MikMod_Update</code>.</p>
+<p>After the module has finished, we tell the player its job is
+done with <code>Player_Stop</code>, and we free the module with
+<code>Player_Free</code>.</p>
+<hr />
+Node:<a name="Playing_Sound_Effects">Playing Sound Effects</a>,
+Next:<a rel="next" href="#More_Sound_Effects">More Sound
+Effects</a>, Previous:<a rel="previous" href=
+"#Playing_Modules">Playing Modules</a>, Up:<a rel="up" href=
+"#Tutorial">Tutorial</a><br />
 <h2>Playing Sound Effects</h2>
-
-<p>MikMod is not limited to playing modules, it can also play sound effects, that
-is, module samples. It's a bit more complex than playing a module, because the
-module player does a lot of things for us, but here we'll get more control over
-what is actually played by the program. Let's look at an example:
-
-<pre>/* MikMod Sound Library example program: sound effects */
+<p>MikMod is not limited to playing modules, it can also play sound
+effects, that is, module samples. It's a bit more complex than
+playing a module, because the module player does a lot of things
+for us, but here we'll get more control over what is actually
+played by the program. Let's look at an example:</p>
+<pre>
+/* MikMod Sound Library example program: sound effects */
 
 #include &lt;unistd.h&gt;
 #include &lt;mikmod.h&gt;
     MikMod_Exit();
 }
 </pre>
-
-<p>As in the previous example, we begin by registering the sound drivers and
-initializing the library. We also ask for software mixing by modifying the
-variable <code>md_mode</code>.
-
-<p>It's time to load our files, with the <code>Sample_Load</code> function. Don't forget
-to test the return value -- it looks ugly here on such a small example, but
-it's a good practice<small>...</small>.
-
-<p>Since we want to play two samples, we have to use at least two voices for this,
-so we reserve them with a <code>MikMod_SetNumVoices</code> call. The first parameter
-sets the number of module voices, and the second parameter the number of sound
-effect voices. We don't want to set the number of module voices here (it's part
-of the module player's duty), so we use the value <code>-1</code> to keep the current
-value, and we reserve two sound effect voices.
-
-<p>Now we're ready to play, so we call <code>MikMod_EnableOutput</code> to make the
-driver ready. Sound effects are played by the <code>Sample_Play</code> function. 
-You just have to specify which sample you want to play, the offset from which
-you want to start, and the playback flags. More on this later. The function
-returns the number of the voice associated to the sample.
-
-<p>We play the first sample for half a second, then we start to play the second
-sample. Since we've reserved two channels, both samples play simultaneously. We
-use the <code>Voice_Stopped</code> function to stop the playback: it returns the
-current status of the voice argument, which is zero when the sample plays and
-nonzero when it has finished. So the <code>do</code> loop will stop exactly when
-the second sample is finished, regardless of the length of the first sample.
-
-<p>To finish, we get rid of the samples with <code>Sample_Free</code>.
-
-<p><hr>
-Node:<a name="More%20Sound%20Effects">More Sound Effects</a>,
-Previous:<a rel=previous href="#Playing%20Sound%20Effects">Playing Sound Effects</a>,
-Up:<a rel=up href="#Tutorial">Tutorial</a>
-<br>
-
+<p>As in the previous example, we begin by registering the sound
+drivers and initializing the library. We also ask for software
+mixing by modifying the variable <code>md_mode</code>.</p>
+<p>It's time to load our files, with the <code>Sample_Load</code>
+function. Don't forget to test the return value -- it looks ugly
+here on such a small example, but it's a good
+practice….</p>
+<p>Since we want to play two samples, we have to use at least two
+voices for this, so we reserve them with a
+<code>MikMod_SetNumVoices</code> call. The first parameter sets the
+number of module voices, and the second parameter the number of
+sound effect voices. We don't want to set the number of module
+voices here (it's part of the module player's duty), so we use the
+value <code>-1</code> to keep the current value, and we reserve two
+sound effect voices.</p>
+<p>Now we're ready to play, so we call
+<code>MikMod_EnableOutput</code> to make the driver ready. Sound
+effects are played by the <code>Sample_Play</code> function. You
+just have to specify which sample you want to play, the offset from
+which you want to start, and the playback flags. More on this
+later. The function returns the number of the voice associated to
+the sample.</p>
+<p>We play the first sample for half a second, then we start to
+play the second sample. Since we've reserved two channels, both
+samples play simultaneously. We use the <code>Voice_Stopped</code>
+function to stop the playback: it returns the current status of the
+voice argument, which is zero when the sample plays and nonzero
+when it has finished. So the <code>do</code> loop will stop exactly
+when the second sample is finished, regardless of the length of the
+first sample.</p>
+<p>To finish, we get rid of the samples with
+<code>Sample_Free</code>.</p>
+<hr />
+Node:<a name="More_Sound_Effects">More Sound Effects</a>,
+Previous:<a rel="previous" href=
+"#Playing_Sound_Effects">Playing Sound Effects</a>, Up:<a rel=
+"up" href="#Tutorial">Tutorial</a><br />
 <h2>More Sound Effects</h2>
-
-<p>Sound effects have some attributes that can be affected to control the playback. 
-These are speed, panning, and volume. Given a voice number, you can affect these
-attributes with the <code>Voice_SetFrequency</code>, <code>Voice_SetPanning</code> and
-<code>Voice_SetVolume</code> functions.
-
-<p>In the previous example, we'll replace the actual sound code, located between
-the calls to <code>MikMod_EnableOutput</code> and <code>MikMod_DisableOutput</code>, with
-the following code:
-
-<pre>    Sample_Play(sfx1, 0, 0);
+<p>Sound effects have some attributes that can be affected to
+control the playback. These are speed, panning, and volume. Given a
+voice number, you can affect these attributes with the
+<code>Voice_SetFrequency</code>, <code>Voice_SetPanning</code> and
+<code>Voice_SetVolume</code> functions.</p>
+<p>In the previous example, we'll replace the actual sound code,
+located between the calls to <code>MikMod_EnableOutput</code> and
+<code>MikMod_DisableOutput</code>, with the following code:</p>
+<pre>
+    Sample_Play(sfx1, 0, 0);
     for(i = 0; i &lt; 5; i++) {
         MikMod_Update();
         usleep(100000);
         Voice_SetPanning(v2, (i++ &amp; 1) ? PAN_LEFT : PAN_RIGHT);
     } while (!Voice_Stopped(v2));
 </pre>
-
-<p>The first thing you'll notice, is the <code>SFX_CRITICAL</code> flag used to play the
-second sample. Since the <code>do</code> loop will add another sample every 100
-milliseconds, and we reserved only two voices, the oldest voice will be
-cut each time this is necessary. Doing this would cut the second sample in the
-second iteration of the loop. However, since we flagged this sound as
-"critical", it won't be cut until it is finished or we stop it with a
-<code>Voice_Stop</code> call. So the second sample will play fine, whereas the first
-sample will be stopped every loop iteration.
-
+<p>The first thing you'll notice, is the <code>SFX_CRITICAL</code>
+flag used to play the second sample. Since the <code>do</code> loop
+will add another sample every 100 milliseconds, and we reserved
+only two voices, the oldest voice will be cut each time this is
+necessary. Doing this would cut the second sample in the second
+iteration of the loop. However, since we flagged this sound as
+"critical", it won't be cut until it is finished or we stop it with
+a <code>Voice_Stop</code> call. So the second sample will play
+fine, whereas the first sample will be stopped every loop
+iteration.</p>
 <p>Then, we choose to play the first sample a bit lower, with
-<code>Voice_SetVolume</code>. Volume voices range from 0 (silence) to 256. In
-this case we play the sample at 160. To make the sound look weird, we also
-change its frequency with <code>Voice_SetFrequency</code>. The computation in the
-example code makes the frequency more and more high (starting from the sample
-frequency and then increasing from 1% each iteration).
-
-<p>And to demonstrate the <code>Voice_SetPanning</code> function, we change the panning
-of the second sample at each iteration from the left to the right. The argument
-can be one of the standard panning <code>PAN_LEFT</code>, <code>PAN_RIGHT</code>,
-<code>PAN_CENTER</code> and <code>PAN_SURROUND</code><a rel=footnote href="#fn-1"><sup>1</sup></a>, or a numeric value between 0 (<code>PAN_LEFT</code>) and
-255 (<code>PAN_RIGHT</code>).
-
-<p><hr>
-Node:<a name="Using%20the%20Library">Using the Library</a>,
-Next:<a rel=next href="#Library%20Reference">Library Reference</a>,
-Previous:<a rel=previous href="#Tutorial">Tutorial</a>,
-Up:<a rel=up href="#Top">Top</a>
-<br>
-
+<code>Voice_SetVolume</code>. Volume voices range from 0 (silence)
+to 256. In this case we play the sample at 160. To make the sound
+look weird, we also change its frequency with
+<code>Voice_SetFrequency</code>. The computation in the example
+code makes the frequency more and more high (starting from the
+sample frequency and then increasing from 1% each iteration).</p>
+<p>And to demonstrate the <code>Voice_SetPanning</code> function,
+we change the panning of the second sample at each iteration from
+the left to the right. The argument can be one of the standard
+panning <code>PAN_LEFT</code>, <code>PAN_RIGHT</code>,
+<code>PAN_CENTER</code> and <code>PAN_SURROUND</code><a rel=
+"footnote" href="#fn-1"><sup>1</sup></a>, or a numeric value
+between 0 (<code>PAN_LEFT</code>) and 255
+(<code>PAN_RIGHT</code>).</p>
+<hr />
+Node:<a name="Using_the_Library">Using the Library</a>,
+Next:<a rel="next" href="#Library_Reference">Library
+Reference</a>, Previous:<a rel="previous" href=
+"#Tutorial">Tutorial</a>, Up:<a rel="up" href="#Top">Top</a><br />
 <h1>Using the Library</h1>
-
-<p>This chapter describes the various parts of the library and their uses.
-
+<p>This chapter describes the various parts of the library and
+their uses.</p>
 <ul>
-<li><a href="#Library%20Version">Library Version</a>: 
-<li><a href="#Type%20Definitions">Type Definitions</a>: 
-<li><a href="#Error%20Handling">Error Handling</a>: 
-<li><a href="#Library%20Initialization">Library Initialization</a>: 
-<li><a href="#Samples%20and%20Voice%20Control">Samples and Voice Control</a>: 
-<li><a href="#Modules%20and%20Player%20Control">Modules and Player Control</a>: 
-<li><a href="#Loading%20Data%20from%20Memory">Loading Data from Memory</a>: 
+<li><a href="#Library_Version">Library Version</a>:</li>
+<li><a href="#Type_Definitions">Type Definitions</a>:</li>
+<li><a href="#Error_Handling">Error Handling</a>:</li>
+<li><a href="#Library_Initialization">Library
+Initialization</a>:</li>
+<li><a href="#Samples_and_Voice_Control">Samples and Voice
+Control</a>:</li>
+<li><a href="#Modules_and_Player_Control">Modules and Player
+Control</a>:</li>
+<li><a href="#Loading_Data_from_Memory">Loading Data from
+Memory</a>:</li>
 </ul>
-
-<p><hr>
-Node:<a name="Library%20Version">Library Version</a>,
-Next:<a rel=next href="#Type%20Definitions">Type Definitions</a>,
-Previous:<a rel=previous href="#Using%20the%20Library">Using the Library</a>,
-Up:<a rel=up href="#Using%20the%20Library">Using the Library</a>
-<br>
-
+<hr />
+Node:<a name="Library_Version">Library Version</a>, Next:<a rel=
+"next" href="#Type_Definitions">Type Definitions</a>,
+Previous:<a rel="previous" href="#Using_the_Library">Using the
+Library</a>, Up:<a rel="up" href="#Using_the_Library">Using the
+Library</a><br />
 <h2>Library Version</h2>
-
-<p>If your program is dynamically linked with the MikMod library, you should check
-which version of the library you're working with. 
-To do this, the library defines a few constants and a function to help you
-determine if the current library is adequate for your needs or if it has to
-be upgraded.
-
-<p>When your program includes <code>mikmod.h</code>, the following constants are
-defined:
+<p>If your program is dynamically linked with the MikMod library,
+you should check which version of the library you're working with.
+To do this, the library defines a few constants and a function to
+help you determine if the current library is adequate for your
+needs or if it has to be upgraded.</p>
+<p>When your program includes <code>mikmod.h</code>, the following
+constants are defined:</p>
 <ul>
-<li><code>LIBMIKMOD_VERSION_MAJOR</code> is equal to the major version number of
-the library. 
-<li><code>LIBMIKMOD_VERSION_MINOR</code> is equal to the minor version number of
-the library. 
-<li><code>LIBMIKMOD_REVISION</code> is equal to the revision number of the library. 
-<li><code>LIBMIKMOD_VERSION</code> is the sum of <code>LIBMIKMOD_VERSION_MAJOR</code> shifted 16 times, <code>LIBMIKMOD_VERSION_MINOR</code> shifted 8 times, and
-<code>LIBMIKMOD_REVISION</code>. 
+<li><code>LIBMIKMOD_VERSION_MAJOR</code> is equal to the major
+version number of the library.</li>
+<li><code>LIBMIKMOD_VERSION_MINOR</code> is equal to the minor
+version number of the library.</li>
+<li><code>LIBMIKMOD_REVISION</code> is equal to the revision number
+of the library.</li>
+<li><code>LIBMIKMOD_VERSION</code> is the sum of
+<code>LIBMIKMOD_VERSION_MAJOR</code> shifted 16 times,
+<code>LIBMIKMOD_VERSION_MINOR</code> shifted 8 times, and
+<code>LIBMIKMOD_REVISION</code>.</li>
 </ul>
-
-<p>So your program can tell with which version of the library it has been compiled
-this way:
-<pre>printf("Compiled with MikMod Sound Library version %ld.%ld.%ld\n",
+<p>So your program can tell with which version of the library it
+has been compiled this way:</p>
+<pre>
+printf("Compiled with MikMod Sound Library version %ld.%ld.%ld\n",
        LIBMIKMOD_VERSION_MAJOR,
        LIBMIKMOD_VERSION_MINOR,
        LIBMIKMOD_REVISION);
 </pre>
-
-<p>The library defines the function <code>MikMod_GetVersion</code> which returns the
-value of LIBMIKMOD_VERSION for the library. If this value is greater than or
-equal to the value of LIBMIKMOD_VERSION for your program, your program will
-work; otherwise, you'll have to inform the user that he has to upgrade the
-library:
-
-<pre>{
+<p>The library defines the function <code>MikMod_GetVersion</code>
+which returns the value of LIBMIKMOD_VERSION for the library. If
+this value is greater than or equal to the value of
+LIBMIKMOD_VERSION for your program, your program will work;
+otherwise, you'll have to inform the user that he has to upgrade
+the library:</p>
+<pre>
+{
     long engineversion = MikMod_GetVersion();
 
     if (engineversion &lt; LIBMIKMOD_VERSION) {
     }
 }
 </pre>
-
-<p><hr>
-Node:<a name="Type%20Definitions">Type Definitions</a>,
-Next:<a rel=next href="#Error%20Handling">Error Handling</a>,
-Previous:<a rel=previous href="#Library%20Version">Library Version</a>,
-Up:<a rel=up href="#Using%20the%20Library">Using the Library</a>
-<br>
-
+<hr />
+Node:<a name="Type_Definitions">Type Definitions</a>,
+Next:<a rel="next" href="#Error_Handling">Error Handling</a>,
+Previous:<a rel="previous" href="#Library_Version">Library
+Version</a>, Up:<a rel="up" href="#Using_the_Library">Using the
+Library</a><br />
 <h2>Type Definitions</h2>
-
-<p>MikMod defines several data types to deal with modules and sample data. 
-These types have the same memory size on every platform MikMod has been ported
-to.
-
-<p>These types are:
+<p>MikMod defines several data types to deal with modules and
+sample data. These types have the same memory size on every
+platform MikMod has been ported to.</p>
+<p>These types are:</p>
 <ul>
-<li><code>CHAR</code> is a printable character. For now it is the same as the
-<code>char</code> type, but in the future it may be wide char (Unicode) on some
-platforms. 
-<li><code>SBYTE</code> is a signed 8 bit number (can range from -128 to 127). 
-<li><code>UBYTE</code> is an unsigned 8 bit number (can range from 0 to 255). 
-<li><code>SWORD</code> is a signed 16 bit number (can range from -32768 to 32767). 
-<li><code>UWORD</code> is an unsigned 16 bit number (can range from 0 to 65535). 
-<li><code>SLONG</code> is a signed 32 bit number (can range from -2.147.483.648 to
-2.147.483.647). 
-<li><code>ULONG</code> is an unsigned 32 bit number (can range from 0 to
-4.294.967.296). 
-<li><code>BOOL</code> is a boolean value. A value of 0 means false, any other value
-means true. 
+<li><code>CHAR</code> is a printable character. For now it is the
+same as the <code>char</code> type, but in the future it may be
+wide char (Unicode) on some platforms.</li>
+<li><code>SBYTE</code> is a signed 8 bit number (can range from
+-128 to 127).</li>
+<li><code>UBYTE</code> is an unsigned 8 bit number (can range from
+0 to 255).</li>
+<li><code>SWORD</code> is a signed 16 bit number (can range from
+-32768 to 32767).</li>
+<li><code>UWORD</code> is an unsigned 16 bit number (can range from
+0 to 65535).</li>
+<li><code>SLONG</code> is a signed 32 bit number (can range from
+-2.147.483.648 to 2.147.483.647).</li>
+<li><code>ULONG</code> is an unsigned 32 bit number (can range from
+0 to 4.294.967.296).</li>
+<li><code>BOOL</code> is a boolean value. A value of 0 means false,
+any other value means true.</li>
 </ul>
-
-<p><hr>
-Node:<a name="Error%20Handling">Error Handling</a>,
-Next:<a rel=next href="#Library%20Initialization">Library Initialization</a>,
-Previous:<a rel=previous href="#Type%20Definitions">Type Definitions</a>,
-Up:<a rel=up href="#Using%20the%20Library">Using the Library</a>
-<br>
-
+<hr />
+Node:<a name="Error_Handling">Error Handling</a>, Next:<a rel=
+"next" href="#Library_Initialization">Library Initialization</a>,
+Previous:<a rel="previous" href="#Type_Definitions">Type
+Definitions</a>, Up:<a rel="up" href="#Using_the_Library">Using
+the Library</a><br />
 <h2>Error Handling</h2>
-
-<p>Although MikMod does its best to do its work, there are times where it can't. 
-For example, if you're trying to play a corrupted file, well, it can't.
-
-<p>A lot of MikMod functions return pointers or <code>BOOL</code> values. If the pointer
-is <code>NULL</code> or the <code>BOOL</code> is 0 (false), an error has occurred.
-
-<p>MikMod errors are returned in the variable <code>MikMod_errno</code>. Each possible
-error has a symbolic error code, beginning with <code>MMERR_</code>. For example, if
-MikMod can't open a file, <code>MikMod_errno</code> will receive the value
-<code>MMERR_OPENING_FILE</code>.
-
-<p>You can get an appropriate error message to display from the function
-<code>MikMod_strerror</code>.
-
-<p>There is a second error variable named <code>MikMod_critical</code>. As its name
-suggests, it is only set if the error lets the library in an unstable state. 
-This variable can only be set by the functions <code>MikMod_Init</code>,
-<code>MikMod_SetNumVoices</code> and <code>MikMod_EnableOutput</code>. If one of these
-functions return an error and <code>MikMod_critical</code> is set, the library is left
-in the uninitialized state (i.e. it was not initialized, or <code>MikMod_Exit</code>
-was called).
-
-<p>If you prefer, you can use a callback function to get notified of errors. This
-function must be prototyped as <code>void MyFunction(void)</code>. Then, call
-<code>MikMod_RegisterHandler</code> with your function as argument to have it notified
-when an error occurs. There can only be one callback function registered, but
-<code>MikMod_RegisterHandler</code> will return you the previous handler, so you can
-chain handlers if you want to.
-
-<p><hr>
-Node:<a name="Library%20Initialization">Library Initialization</a>,
-Next:<a rel=next href="#Samples%20and%20Voice%20Control">Samples and Voice Control</a>,
-Previous:<a rel=previous href="#Error%20Handling">Error Handling</a>,
-Up:<a rel=up href="#Using%20the%20Library">Using the Library</a>
-<br>
-
+<p>Although MikMod does its best to do its work, there are times
+where it can't. For example, if you're trying to play a corrupted
+file, well, it can't.</p>
+<p>A lot of MikMod functions return pointers or <code>BOOL</code>
+values. If the pointer is <code>NULL</code> or the
+<code>BOOL</code> is 0 (false), an error has occurred.</p>
+<p>MikMod errors are returned in the variable
+<code>MikMod_errno</code>. Each possible error has a symbolic error
+code, beginning with <code>MMERR_</code>. For example, if MikMod
+can't open a file, <code>MikMod_errno</code> will receive the value
+<code>MMERR_OPENING_FILE</code>.</p>
+<p>You can get an appropriate error message to display from the
+function <code>MikMod_strerror</code>.</p>
+<p>There is a second error variable named
+<code>MikMod_critical</code>. As its name suggests, it is only set
+if the error lets the library in an unstable state. This variable
+can only be set by the functions <code>MikMod_Init</code>,
+<code>MikMod_SetNumVoices</code> and
+<code>MikMod_EnableOutput</code>. If one of these functions return
+an error and <code>MikMod_critical</code> is set, the library is
+left in the uninitialized state (i.e. it was not initialized, or
+<code>MikMod_Exit</code> was called).</p>
+<p>If you prefer, you can use a callback function to get notified
+of errors. This function must be prototyped as <code>void
+MyFunction(void)</code>. Then, call
+<code>MikMod_RegisterHandler</code> with your function as argument
+to have it notified when an error occurs. There can only be one
+callback function registered, but
+<code>MikMod_RegisterHandler</code> will return you the previous
+handler, so you can chain handlers if you want to.</p>
+<hr />
+Node:<a name="Library_Initialization">Library Initialization</a>,
+Next:<a rel="next" href="#Samples_and_Voice_Control">Samples
+and Voice Control</a>, Previous:<a rel="previous" href=
+"#Error_Handling">Error Handling</a>, Up:<a rel="up" href=
+"#Using_the_Library">Using the Library</a><br />
 <h2>Library Initialization and Core Functions</h2>
-
-<p>To initialize the library, you must register some sound drivers first. You can
-either register all the drivers embedded in the library for your platform with
-<code>MikMod_RegisterAllDrivers</code>, or register only some of them with
-<code>MikMod_RegisterDriver</code>. If you choose to register the drivers manually,
-you must be careful in their order, since <code>MikMod_Init</code> will try them in
-the order you registered them. The <code>MikMod_RegisterAllDrivers</code> function
-registers the network drivers first (for playing sound over the network), then
-the hardware drivers, then the disk writers, and in last resort, the nosound
-driver. Registering the nosound driver first would not be a very good
-idea<small>...</small>.
-
-<p>You can get some printable information regarding the registered drivers with
-<code>MikMod_InfoDriver</code>; don't forget to call <code>free</code> on the returned
-string when you don't need it anymore.
-
-<p>After you've registered your drivers, you can initialize the sound playback
-with <code>MikMod_Init</code>, passing specific information to the driver if
-necessary. If you set the variable <code>md_device</code> to zero, which
-is its default value, the driver will be autodetected, that is, the first driver
-in the list that is available on the system will be used; otherwise only
-the driver whose order in the list of the registered drivers is equal to
-<code>md_device</code> will be tried.  If your playback settings, in the variables
-<code>md_mixfreq</code> and <code>md_mode</code>, are not supported by the device,
-<code>MikMod_Init</code> will fail.
-
+<p>To initialize the library, you must register some sound drivers
+first. You can either register all the drivers embedded in the
+library for your platform with
+<code>MikMod_RegisterAllDrivers</code>, or register only some of
+them with <code>MikMod_RegisterDriver</code>. If you choose to
+register the drivers manually, you must be careful in their order,
+since <code>MikMod_Init</code> will try them in the order you
+registered them. The <code>MikMod_RegisterAllDrivers</code>
+function registers the network drivers first (for playing sound
+over the network), then the hardware drivers, then the disk
+writers, and in last resort, the nosound driver. Registering the
+nosound driver first would not be a very good
+idea….</p>
+<p>You can get some printable information regarding the registered
+drivers with <code>MikMod_InfoDriver</code>; don't forget to call
+<code>free</code> on the returned string when you don't need it
+anymore.</p>
+<p>After you've registered your drivers, you can initialize the
+sound playback with <code>MikMod_Init</code>, passing specific
+information to the driver if necessary. If you set the variable
+<code>md_device</code> to zero, which is its default value, the
+driver will be autodetected, that is, the first driver in the list
+that is available on the system will be used; otherwise only the
+driver whose order in the list of the registered drivers is equal
+to <code>md_device</code> will be tried. If your playback settings,
+in the variables <code>md_mixfreq</code> and <code>md_mode</code>,
+are not supported by the device, <code>MikMod_Init</code> will
+fail.</p>
 <p>You can then choose the number of voices you need with
 <code>MikMod_SetNumVoices</code>, and activate the playback with
-<code>MikMod_EnableOutput</code>.
-
-<p>Don't forget to call <code>MikMod_Update</code> as often as possible to process the
-sound mixing. If necessary, fork a dedicated process to do this, or if the
-library is thread-safe on your system, use a dedicated thread.
-
-<p>If you want to change playback settings, most of them can't be changed on the
-fly. You'll need to stop the playback and reinitialize the driver. Use
-<code>MikMod_Active</code> to check if there is still sound playing; in this case,
-call <code>MikMod_DisableOutput</code> to end playback. Then, change your settings
-and call <code>MikMod_Reset</code>. You're now ready to select your number of voices
-and restart playback.
-
+<code>MikMod_EnableOutput</code>.</p>
+<p>Don't forget to call <code>MikMod_Update</code> as often as
+possible to process the sound mixing. If necessary, fork a
+dedicated process to do this, or if the library is thread-safe on
+your system, use a dedicated thread.</p>
+<p>If you want to change playback settings, most of them can't be
+changed on the fly. You'll need to stop the playback and
+reinitialize the driver. Use <code>MikMod_Active</code> to check if
+there is still sound playing; in this case, call
+<code>MikMod_DisableOutput</code> to end playback. Then, change
+your settings and call <code>MikMod_Reset</code>. You're now ready
+to select your number of voices and restart playback.</p>
 <p>When your program ends, don't forget to stop playback and call
-<code>MikMod_Exit</code> to leave the sound hardware in a coherent state.
-
-<p>On systems that have pthreads, libmikmod is thread-safe<a rel=footnote href="#fn-2"><sup>2</sup></a>. You can check this in your programs with the
-<code>MikMod_InitThreads</code> function. If this function returns 1, the library is
-thread-safe.
-
-<p>The main benefit of thread-safety is that <code>MikMod_Update</code> can be called
-from a separate thread, which often makes application design easier. However,
-several libmikmod global variables are accessible from all your threads, so
-when more than one thread need to access libmikmod variables, you'll have to
-protect these access with the <code>MikMod_Lock</code> and <code>MikMod_Unlock</code>
-functions. If libmikmod is not thread-safe, these functions are no-ops.
-
-<p><hr>
-Node:<a name="Samples%20and%20Voice%20Control">Samples and Voice Control</a>,
-Next:<a rel=next href="#Modules%20and%20Player%20Control">Modules and Player Control</a>,
-Previous:<a rel=previous href="#Library%20Initialization">Library Initialization</a>,
-Up:<a rel=up href="#Using%20the%20Library">Using the Library</a>
-<br>
-
+<code>MikMod_Exit</code> to leave the sound hardware in a coherent
+state.</p>
+<p>On systems that have pthreads, libmikmod is thread-safe<a rel=
+"footnote" href="#fn-2"><sup>2</sup></a>. You can check this in
+your programs with the <code>MikMod_InitThreads</code> function. If
+this function returns 1, the library is thread-safe.</p>
+<p>The main benefit of thread-safety is that
+<code>MikMod_Update</code> can be called from a separate thread,
+which often makes application design easier. However, several
+libmikmod global variables are accessible from all your threads, so
+when more than one thread need to access libmikmod variables,
+you'll have to protect these access with the
+<code>MikMod_Lock</code> and <code>MikMod_Unlock</code> functions.
+If libmikmod is not thread-safe, these functions are no-ops.</p>
+<hr />
+Node:<a name="Samples_and_Voice_Control">Samples and Voice
+Control</a>, Next:<a rel="next" href=
+"#Modules_and_Player_Control">Modules and Player Control</a>,
+Previous:<a rel="previous" href="#Library_Initialization">Library
+Initialization</a>, Up:<a rel="up" href=
+"#Using_the_Library">Using the Library</a><br />
 <h2>Samples and Voice Control</h2>
-
-<p>Currently, MikMod only supports uncompressed mono WAV files as samples. You can
-load a sample by calling <code>Sample_Load</code> with a filename, or by calling
-<code>Sample_LoadFP</code> with an open <code>FILE*</code> pointer. These functions return
-a pointer to a <code>SAMPLE</code> structure, or <code>NULL</code> in case of error.
-
-<p>The <code>SAMPLE</code> structure has a few interesting fields:
+<p>Currently, MikMod only supports uncompressed mono WAV files as
+samples. You can load a sample by calling <code>Sample_Load</code>
+with a filename, or by calling <code>Sample_LoadFP</code> with an
+open <code>FILE*</code> pointer. These functions return a pointer
+to a <code>SAMPLE</code> structure, or <code>NULL</code> in case of
+error.</p>
+<p>The <code>SAMPLE</code> structure has a few interesting
+fields:</p>
 <ul>
-<li><code>speed</code> contains the default frequency of the sample. 
-<li><code>volume</code> contains the default volume of the sample, ranging from 0 (silence)
-to 64. 
-<li><code>panning</code> contains the default panning position of the sample. 
+<li><code>speed</code> contains the default frequency of the
+sample.</li>
+<li><code>volume</code> contains the default volume of the sample,
+ranging from 0 (silence) to 64.</li>
+<li><code>panning</code> contains the default panning position of
+the sample.</li>
 </ul>
-
-<p>Altering one of those fields will affect all voices currently playing the
-sample. You can achieve the same result on a single voice with the functions
-<code>Voice_SetFrequency</code>, <code>Voice_SetVolume</code> and <code>Voice_SetPanning</code>. 
-Since the same sample can be played with different frequency, volume and panning
-parameters on each voice, you can get voice specific information with
-<code>Voice_GetFrequency</code>, <code>Voice_GetVolume</code> and <code>Voice_GetPanning</code>.
-
-<p>You can also make your sample loop by setting the fields <code>loopstart</code> and
-<code>loopend</code> and or'ing <code>flags</code> with <code>SF_LOOP</code>. To compute your loop
-values, the field <code>length</code> will be useful. However, you must know that
-all the sample length are expressed in samples, i.e. 8 bits for an 8 bit sample,
-and 16 bit for a 16 bit sample<small>...</small> Test <code>flags</code> for the value
-<code>SF_16BITS</code> to know this.
-
-<p>Speaking of flags, if you're curious and want to know the original format of the
-sample on disk (since libmikmod does some work on the sample data internally),
-refer to the <code>inflags</code> field.
-
-<p>If the common forward loop isn't enough, you can play with some other flags:
-<code>SF_BIDI</code> will make your sample loop "ping pong" (back and forth), and
-<code>SF_REVERSE</code> will make it play backwards.
-
-<p>To play your sample, use the <code>Sample_Play</code> function. This function
-will return a voice number which enable you to use the <code>Voice_xx</code>
-functions.
-
-<p>The sample will play until another sample takes over its voice (when you play
-more samples than you reserved sound effect voices), unless it has been flagged
-as <code>SFX_CRITICAL</code>. You can force it to stop with <code>Voice_Stop</code>, or you
-can force another sample to take over this voice with <code>Voice_Play</code>;
-however <code>Voice_Play</code> doesn't let you flag the new sample as critical.
-
-<p>Non looping samples will free their voice channel as soon as they are finished;
-you can know the current playback position of your sample with
-<code>Voice_GetPosition</code>. If it is zero, either the sample has finished playing
-or it is just beginning; use <code>Voice_Stopped</code> to know.
-
-<p>When you don't need a sample anymore, don't forget to free its memory with
-<code>Sample_Free</code>.
-
-<p><hr>
-Node:<a name="Modules%20and%20Player%20Control">Modules and Player Control</a>,
-Next:<a rel=next href="#Loading%20Data%20from%20Memory">Loading Data from Memory</a>,
-Previous:<a rel=previous href="#Samples%20and%20Voice%20Control">Samples and Voice Control</a>,
-Up:<a rel=up href="#Using%20the%20Library">Using the Library</a>
-<br>
-
+<p>Altering one of those fields will affect all voices currently
+playing the sample. You can achieve the same result on a single
+voice with the functions <code>Voice_SetFrequency</code>,
+<code>Voice_SetVolume</code> and <code>Voice_SetPanning</code>.
+Since the same sample can be played with different frequency,
+volume and panning parameters on each voice, you can get voice
+specific information with <code>Voice_GetFrequency</code>,
+<code>Voice_GetVolume</code> and <code>Voice_GetPanning</code>.</p>
+<p>You can also make your sample loop by setting the fields
+<code>loopstart</code> and <code>loopend</code> and or'ing
+<code>flags</code> with <code>SF_LOOP</code>. To compute your loop
+values, the field <code>length</code> will be useful. However, you
+must know that all the sample length are expressed in samples, i.e.
+8 bits for an 8 bit sample, and 16 bit for a 16 bit
+sample… Test <code>flags</code> for the value
+<code>SF_16BITS</code> to know this.</p>
+<p>Speaking of flags, if you're curious and want to know the
+original format of the sample on disk (since libmikmod does some
+work on the sample data internally), refer to the
+<code>inflags</code> field.</p>
+<p>If the common forward loop isn't enough, you can play with some
+other flags: <code>SF_BIDI</code> will make your sample loop "ping
+pong" (back and forth), and <code>SF_REVERSE</code> will make it
+play backwards.</p>
+<p>To play your sample, use the <code>Sample_Play</code> function.
+This function will return a voice number which enable you to use
+the <code>Voice_xx</code> functions.</p>
+<p>The sample will play until another sample takes over its voice
+(when you play more samples than you reserved sound effect voices),
+unless it has been flagged as <code>SFX_CRITICAL</code>. You can
+force it to stop with <code>Voice_Stop</code>, or you can force
+another sample to take over this voice with
+<code>Voice_Play</code>; however <code>Voice_Play</code> doesn't
+let you flag the new sample as critical.</p>
+<p>Non looping samples will free their voice channel as soon as
+they are finished; you can know the current playback position of
+your sample with <code>Voice_GetPosition</code>. If it is zero,
+either the sample has finished playing or it is just beginning; use
+<code>Voice_Stopped</code> to know.</p>
+<p>When you don't need a sample anymore, don't forget to free its
+memory with <code>Sample_Free</code>.</p>
+<hr />
+Node:<a name="Modules_and_Player_Control">Modules and Player
+Control</a>, Next:<a rel="next" href=
+"#Loading_Data_from_Memory">Loading Data from Memory</a>,
+Previous:<a rel="previous" href=
+"#Samples_and_Voice_Control">Samples and Voice Control</a>,
+Up:<a rel="up" href="#Using_the_Library">Using the
+Library</a><br />
 <h2>Modules and Player Control</h2>
-
-<p>As for the sound drivers, you have to register the module loaders you want to
-use for MikMod to be able to load modules. You can either register all the
-module loaders with <code>MikMod_RegisterAllLoaders</code>, or only a few of them with
-<code>MikMod_RegisterLoader</code>. Be careful if you choose this solution, as the
-15 instrument MOD loader has to be registered last, since loaders are called in
-the order they were register to identify modules, and the detection of this
-format is not fully reliable, so other modules might be mistaken as 15
-instrument MOD files.
-
-<p>You can get some printable information regarding the registered loaders with
-<code>MikMod_InfoLoader</code>; don't forget to call <code>free</code> on the returned
-string when you don't need it anymore.
-
-<p>Note that, contrary to the sound drivers, you can register module loaders at
-any time, it doesn't matter.
-
-<p>For playlists, you might be interested in knowing the module title first, and
-<code>Player_LoadTitle</code> will give you this information. Don't forget to
-<code>free</code> the returned text when you don't need it anymore.
-
-<p>You can load a module either with <code>Player_Load</code> and the name of the
-module, or with <code>Player_LoadFP</code> and an open <code>FILE*</code> pointer. These
-functions also expect a maximal number of voices, and a curiosity flag. Unless
-you have excellent reasons not to do so, choose a big limit, such as 64 or even
-128 for complex Impulse Tracker modules. Both functions return a pointer to an
-<code>MODULE</code> structure, or <code>NULL</code> if an error occurs.
-
-<p>You'll find some useful information in this structure:
+<p>As for the sound drivers, you have to register the module
+loaders you want to use for MikMod to be able to load modules. You
+can either register all the module loaders with
+<code>MikMod_RegisterAllLoaders</code>, or only a few of them with
+<code>MikMod_RegisterLoader</code>. Be careful if you choose this
+solution, as the 15 instrument MOD loader has to be registered
+last, since loaders are called in the order they were register to
+identify modules, and the detection of this format is not fully
+reliable, so other modules might be mistaken as 15 instrument MOD
+files.</p>
+<p>You can get some printable information regarding the registered
+loaders with <code>MikMod_InfoLoader</code>; don't forget to call
+<code>free</code> on the returned string when you don't need it
+anymore.</p>
+<p>Note that, contrary to the sound drivers, you can register
+module loaders at any time, it doesn't matter.</p>
+<p>For playlists, you might be interested in knowing the module
+title first, and <code>Player_LoadTitle</code> will give you this
+information. Don't forget to <code>free</code> the returned text
+when you don't need it anymore.</p>
+<p>You can load a module either with <code>Player_Load</code> and
+the name of the module, or with <code>Player_LoadFP</code> and an
+open <code>FILE*</code> pointer. These functions also expect a
+maximal number of voices, and a curiosity flag. Unless you have
+excellent reasons not to do so, choose a big limit, such as 64 or
+even 128 for complex Impulse Tracker modules. Both functions return
+a pointer to an <code>MODULE</code> structure, or <code>NULL</code>
+if an error occurs.</p>
+<p>You'll find some useful information in this structure:</p>
 <ul>
-<li><code>numchn</code> contains the number of module "real" channels. 
-<li><code>numvoices</code> contains the number of voices reserved by the player for
-the real channels and the virtual channels (NNA). 
-<li><code>numpas</code> and <code>numpat</code> contain the number of song positions and
-song patterns. 
-<li><code>numins</code> and <code>numsmp</code> contain the number of instruments and
-samples. 
-<li><code>songname</code> contains the song title. 
-<li><code>modtype</code> contains the name of the tracker used to create the song. 
-<li><code>comment</code> contains the song comment, if it has one. 
-<li><code>sngtime</code> contains the time elapsed in the module, in
-2^-10 seconds (not exactly a millisecond). 
-<li><code>sngspd</code> and <code>bpm</code> contain the song speed and tempo. 
-<li><code>realchn</code> contains the actual number of active channels. 
-<li><code>totalchn</code> contains the actual number of active virtual channels,
-i.e. the sum of <code>realchn</code> and the number of NNA virtual channels. 
+<li><code>numchn</code> contains the number of module "real"
+channels.</li>
+<li><code>numvoices</code> contains the number of voices reserved
+by the player for the real channels and the virtual channels
+(NNA).</li>
+<li><code>numpas</code> and <code>numpat</code> contain the number
+of song positions and song patterns.</li>
+<li><code>numins</code> and <code>numsmp</code> contain the number
+of instruments and samples.</li>
+<li><code>songname</code> contains the song title.</li>
+<li><code>modtype</code> contains the name of the tracker used to
+create the song.</li>
+<li><code>comment</code> contains the song comment, if it has
+one.</li>
+<li><code>sngtime</code> contains the time elapsed in the module,
+in 2^-10 seconds (not exactly a millisecond).</li>
+<li><code>sngspd</code> and <code>bpm</code> contain the song speed
+and tempo.</li>
+<li><code>realchn</code> contains the actual number of active
+channels.</li>
+<li><code>totalchn</code> contains the actual number of active
+virtual channels, i.e. the sum of <code>realchn</code> and the
+number of NNA virtual channels.</li>
 </ul>
-
-<p>Now that the module is loaded, you need to tell the module player that you want
-to play this particular module with <code>Player_Start</code> (the player can only
-play one module, but you can have several modules in memory). The playback
-begins. Should you forget which module is playing, <code>Player_GetModule</code> will
-return it to you.
-
+<p>Now that the module is loaded, you need to tell the module
+player that you want to play this particular module with
+<code>Player_Start</code> (the player can only play one module, but
+you can have several modules in memory). The playback begins.
+Should you forget which module is playing,
+<code>Player_GetModule</code> will return it to you.</p>
 <p>You can change the current song position with the functions
-<code>Player_NextPosition</code>, <code>Player_PrevPosition</code> and
-<code>Player_SetPosition</code>, the speed with <code>Player_SetSpeed</code> and
-<code>Player_SetTempo</code>, and the volume (ranging from 0 to 128) with
-<code>Player_SetVolume</code>.
-
-<p>Playback can be paused or resumed with <code>Player_TogglePause</code>. Be sure to
-check with <code>Player_Paused</code> that it isn't already in the state you want !
-
-<p>Fine player control is achieved by the functions <code>Player_Mute</code>,
-<code>Player_UnMute</code> and <code>Player_ToggleMute</code> which can silence or resume
-a set of module channels. The function <code>Player_Muted</code> will return the
-state of a given channel. And if you want even more control, you can get the
-voice corresponding to a module channel with <code>Player_GetChannelVoice</code> and
-act directly on the voice.
-
-<p>Modules play only once, but can loop indefinitely if they are designed to do so. 
-You can change this behavior with the <code>wrap</code> and <code>loop</code> of the
-<code>MODULE</code> structure; the first one, if set, will make the module restart
-when it's finished, and the second one, if set, will prevent the module from
-jumping backwards.
-
-<p>You can test if the module is still playing with <code>Player_Active</code>, and you
-can stop it at any time with <code>Player_Stop</code>. When the module isn't needed
-anymore, get rid of it with <code>Player_Free</code>.
-
-<p><hr>
-Node:<a name="Loading%20Data%20from%20Memory">Loading Data from Memory</a>,
-Previous:<a rel=previous href="#Modules%20and%20Player%20Control">Modules and Player Control</a>,
-Up:<a rel=up href="#Using%20the%20Library">Using the Library</a>
-<br>
-
+<code>Player_NextPosition</code>, <code>Player_PrevPosition</code>
+and <code>Player_SetPosition</code>, the speed with
+<code>Player_SetSpeed</code> and <code>Player_SetTempo</code>, and
+the volume (ranging from 0 to 128) with
+<code>Player_SetVolume</code>.</p>
+<p>Playback can be paused or resumed with
+<code>Player_TogglePause</code>. Be sure to check with
+<code>Player_Paused</code> that it isn't already in the state you
+want !</p>
+<p>Fine player control is achieved by the functions
+<code>Player_Mute</code>, <code>Player_UnMute</code> and
+<code>Player_ToggleMute</code> which can silence or resume a set of
+module channels. The function <code>Player_Muted</code> will return
+the state of a given channel. And if you want even more control,
+you can get the voice corresponding to a module channel with
+<code>Player_GetChannelVoice</code> and act directly on the
+voice.</p>
+<p>Modules play only once, but can loop indefinitely if they are
+designed to do so. You can change this behavior with the
+<code>wrap</code> and <code>loop</code> of the <code>MODULE</code>
+structure; the first one, if set, will make the module restart when
+it's finished, and the second one, if set, will prevent the module
+from jumping backwards.</p>
+<p>You can test if the module is still playing with
+<code>Player_Active</code>, and you can stop it at any time with
+<code>Player_Stop</code>. When the module isn't needed anymore, get
+rid of it with <code>Player_Free</code>.</p>
+<hr />
+Node:<a name="Loading_Data_from_Memory">Loading Data from
+Memory</a>, Previous:<a rel="previous" href=
+"#Modules_and_Player_Control">Modules and Player Control</a>,
+Up:<a rel="up" href="#Using_the_Library">Using the
+Library</a><br />
 <h2>Loading Data from Memory</h2>
-
-<p>If you need to load modules or sound effects from other places than plain
-files, you can use the <code>MREADER</code> and <code>MWRITER</code> objects to achieve
-this.
-
-<p>The <code>MREADER</code> and <code>MWRITER</code> structures contain a list of function
-pointers, which emulate the behaviour of a regular <code>FILE *</code> object. In
-fact, all functions which take filenames or <code>FILE *</code> as arguments are only
-wrappers to a real function which takes an <code>MREADER</code> or an <code>MWRITER</code>
-argument.
-
-<p>So, if you need to load a module from memory, or for a multi-file archive, for
-example, all you need is to build an adequate <code>MREADER</code> object, and use
-<code>Player_LoadGeneric</code> instead of <code>Player_Load</code> or
-<code>Player_LoadFP</code>. For samples, use <code>Sample_LoadGeneric</code> instead of
-<code>Sample_Load</code> or <code>Sample_LoadFP</code>.
-
-<p><hr>
-Node:<a name="Library%20Reference">Library Reference</a>,
-Next:<a rel=next href="#Index">Index</a>,
-Previous:<a rel=previous href="#Using%20the%20Library">Using the Library</a>,
-Up:<a rel=up href="#Top">Top</a>
-<br>
-
+<p>If you need to load modules or sound effects from other places
+than plain files, you can use the <code>MREADER</code> and
+<code>MWRITER</code> objects to achieve this.</p>
+<p>The <code>MREADER</code> and <code>MWRITER</code> structures
+contain a list of function pointers, which emulate the behaviour of
+a regular <code>FILE *</code> object. In fact, all functions which
+take filenames or <code>FILE *</code> as arguments are only
+wrappers to a real function which takes an <code>MREADER</code> or
+an <code>MWRITER</code> argument.</p>
+<p>So, if you need to load a module from memory, or for a
+multi-file archive, for example, all you need is to build an
+adequate <code>MREADER</code> object, and use
+<code>Player_LoadGeneric</code> instead of <code>Player_Load</code>
+or <code>Player_LoadFP</code>. For samples, use
+<code>Sample_LoadGeneric</code> instead of <code>Sample_Load</code>
+or <code>Sample_LoadFP</code>.</p>
+<hr />
+Node:<a name="Library_Reference">Library Reference</a>,
+Next:<a rel="next" href="#Index">Index</a>, Previous:<a rel=
+"previous" href="#Using_the_Library">Using the Library</a>,
+Up:<a rel="up" href="#Top">Top</a><br />
 <h1>Library Reference</h1>
-
-<p>This chapter describes in more detail all the functions and variables provided
-by the library. See <a href="#Type%20Definitions">Type Definitions</a>, for the basic type reference.
-
+<p>This chapter describes in more detail all the functions and
+variables provided by the library. See <a href=
+"#Type_Definitions">Type Definitions</a>, for the basic type
+reference.</p>
 <ul>
-<li><a href="#Variable%20Reference">Variable Reference</a>: 
-<li><a href="#Structure%20Reference">Structure Reference</a>: 
-<li><a href="#Error%20Reference">Error Reference</a>: 
-<li><a href="#Function%20Reference">Function Reference</a>: 
-<li><a href="#Loader%20Reference">Loader Reference</a>: 
-<li><a href="#Driver%20Reference">Driver Reference</a>: 
+<li><a href="#Variable_Reference">Variable Reference</a>:</li>
+<li><a href="#Structure_Reference">Structure Reference</a>:</li>
+<li><a href="#Error_Reference">Error Reference</a>:</li>
+<li><a href="#Function_Reference">Function Reference</a>:</li>
+<li><a href="#Loader_Reference">Loader Reference</a>:</li>
+<li><a href="#Driver_Reference">Driver Reference</a>:</li>
 </ul>
-
-<p><hr>
-Node:<a name="Variable%20Reference">Variable Reference</a>,
-Next:<a rel=next href="#Structure%20Reference">Structure Reference</a>,
-Previous:<a rel=previous href="#Library%20Reference">Library Reference</a>,
-Up:<a rel=up href="#Library%20Reference">Library Reference</a>
-<br>
-
+<hr />
+Node:<a name="Variable_Reference">Variable Reference</a>,
+Next:<a rel="next" href="#Structure_Reference">Structure
+Reference</a>, Previous:<a rel="previous" href=
+"#Library_Reference">Library Reference</a>, Up:<a rel="up" href=
+"#Library_Reference">Library Reference</a><br />
 <h2>Variable Reference</h2>
-
 <h3>Error Variables</h3>
-
-<p>The following variables are set by the library to return error information.
-
+<p>The following variables are set by the library to return error
+information.</p>
 <dl>
-<dt><code>int MikMod_errno</code>
-<dd>When an error occurs, this variable contains the error code. 
-See <a href="#Error%20Reference">Error Reference</a>, for more information. 
-<br><dt><code>BOOL MikMod_critical</code>
-<dd>When an error occurs, this variable informs of the severity of the error. Its
-value has sense only if the value of <code>MikMod_errno</code> is different from zero. 
-If the value of <code>MikMod_critical</code> is zero, the error wasn't fatal and the
-library is in a stable state. However, if it is nonzero, then the library can't
-be used and has reseted itself to the uninitialized state. This often means
-that the mixing parameters you choose were not supported by the driver, or that
-it doesn't has enough voices for your needs if you called
-<code>MikMod_SetNumVoices</code>. 
+<dt><code>int MikMod_errno</code></dt>
+<dd>When an error occurs, this variable contains the error code.
+See <a href="#Error_Reference">Error Reference</a>, for more
+information.<br /></dd>
+<dt><code>BOOL MikMod_critical</code></dt>
+<dd>When an error occurs, this variable informs of the severity of
+the error. Its value has sense only if the value of
+<code>MikMod_errno</code> is different from zero. If the value of
+<code>MikMod_critical</code> is zero, the error wasn't fatal and
+the library is in a stable state. However, if it is nonzero, then
+the library can't be used and has reseted itself to the
+uninitialized state. This often means that the mixing parameters
+you choose were not supported by the driver, or that it doesn't has
+enough voices for your needs if you called
+<code>MikMod_SetNumVoices</code>.</dd>
 </dl>
-
 <h3>Sound Settings</h3>
-
-<p>The following variables control the sound output parameters and their changes
-take effect immediately.
-
+<p>The following variables control the sound output parameters and
+their changes take effect immediately.</p>
 <dl>
-<dt><code>UBYTE md_musicvolume</code>
-<dd>Volume of the module. Allowed values range from
-0 to 128. The default value is 128. 
-<br><dt><code>UBYTE md_pansep</code>
-<dd>Stereo channels separation. Allowed values range
-from 0 (no separation, thus mono sound) to 128 (full channel separation). The
-default value is 128. 
-<br><dt><code>UBYTE md_reverb</code>
-<dd>Amount of sound reverberation. Allowed values range
-from 0 (no reverberation) to 15 (a rough estimate for chaos<small>...</small>). The
-default value is 0. 
-<br><dt><code>UBYTE md_sndfxvolume</code>
-<dd>Volume of the sound effects. Allowed values range
-from 0 to 128. The default value is 128. 
-<br><dt><code>UBYTE md_volume</code>
-<dd>Overall sound volume. Allowed values range from 0
-to 128. The default value is 128. 
+<dt><code>UBYTE md_musicvolume</code></dt>
+<dd>Volume of the module. Allowed values range from 0 to 128. The
+default value is 128.<br /></dd>
+<dt><code>UBYTE md_pansep</code></dt>
+<dd>Stereo channels separation. Allowed values range from 0 (no
+separation, thus mono sound) to 128 (full channel separation). The
+default value is 128.<br /></dd>
+<dt><code>UBYTE md_reverb</code></dt>
+<dd>Amount of sound reverberation. Allowed values range from 0 (no
+reverberation) to 15 (a rough estimate for
+chaos…). The default value is 0.<br /></dd>
+<dt><code>UBYTE md_sndfxvolume</code></dt>
+<dd>Volume of the sound effects. Allowed values range from 0 to
+128. The default value is 128.<br /></dd>
+<dt><code>UBYTE md_volume</code></dt>
+<dd>Overall sound volume. Allowed values range from 0 to 128. The
+default value is 128.</dd>
 </dl>
-
 <h3>Driver Settings</h3>
-
-<p>The following variables control more in-depth sound output parameters. Except
-for some <code>md_mode</code> flags, their changes do not have any effect until you
-call <code>MikMod_Init</code> or <code>MikMod_Reset</code>.
-
+<p>The following variables control more in-depth sound output
+parameters. Except for some <code>md_mode</code> flags, their
+changes do not have any effect until you call
+<code>MikMod_Init</code> or <code>MikMod_Reset</code>.</p>
 <dl>
-<dt><code>UWORD md_device</code>
-<dd>This variable contains the order, in the list of the registered drivers, of the
-sound driver which will be used for sound playback. This order is one-based; if
-this variable is set to zero, the driver is autodetected, which means the list
-is tested until a driver is present on the system. The default value is 0, thus
-driver is autodetected. 
-<br><dt><code>MDRIVER* md_driver</code>
-<dd>This variable points to the driver which is being used for sound playback, and
-is undefined when the library is uninitialized (before <code>MikMod_Init</code> and
-after <code>MikMod_Exit</code>). This variable is for information only, you should
-never attempt to change its value. Use <code>md_driver</code> and <code>MikMod_Init</code>
-(or <code>MikMod_Reset</code>) instead. 
-<br><dt><code>UWORD md_mixfreq</code>
-<dd>Sound playback frequency, in hertz. High values
-yield high sound quality, but need more computing power than lower values. The
-default value is 44100 Hz, which is compact disc quality. Other common values
-are 22100 Hz (radio quality), 11025 Hz (phone quality), and 8000 Hz (mu-law
-quality). 
-<br><dt><code>UWORD md_mode</code>
-<dd>This variable is a combination of several flags, to select which output mode
-to select. 
-The following flags have a direct action to the sound output (i.e. changes take
-effect immediately):
+<dt><code>UWORD md_device</code></dt>
+<dd>This variable contains the order, in the list of the registered
+drivers, of the sound driver which will be used for sound playback.
+This order is one-based; if this variable is set to zero, the
+driver is autodetected, which means the list is tested until a
+driver is present on the system. The default value is 0, thus
+driver is autodetected.<br /></dd>
+<dt><code>MDRIVER* md_driver</code></dt>
+<dd>This variable points to the driver which is being used for
+sound playback, and is undefined when the library is uninitialized
+(before <code>MikMod_Init</code> and after
+<code>MikMod_Exit</code>). This variable is for information only,
+you should never attempt to change its value. Use
+<code>md_driver</code> and <code>MikMod_Init</code> (or
+<code>MikMod_Reset</code>) instead.<br /></dd>
+<dt><code>UWORD md_mixfreq</code></dt>
+<dd>Sound playback frequency, in hertz. High values yield high
+sound quality, but need more computing power than lower values. The
+default value is 44100 Hz, which is compact disc quality. Other
+common values are 22100 Hz (radio quality), 11025 Hz (phone
+quality), and 8000 Hz (mu-law quality).<br /></dd>
+<dt><code>UWORD md_mode</code></dt>
+<dd>This variable is a combination of several flags, to select
+which output mode to select. The following flags have a direct
+action to the sound output (i.e. changes take effect immediately):
 <dl>
-<dt><code>DMODE_INTERP</code>
-<dd>This flag, if set, enables the interpolated mixers. Interpolated mixing gives
-better sound but takes a bit more time than standard mixing. If the library
-is built with the high quality mixer, interpolated mixing is always enabled,
-regardless of this flag. 
-<br><dt><code>DMODE_REVERSE</code>
-<dd>This flag, if set, exchanges the left and right stereo channels. 
-<br><dt><code>DMODE_SURROUND</code>
-<dd>This flag, if set, enables the surround mixers. Since surround mixing works
-only for stereo sound, this flag has no effect if the sound playback is in
-mono. 
+<dt><code>DMODE_INTERP</code></dt>
+<dd>This flag, if set, enables the interpolated mixers.
+Interpolated mixing gives better sound but takes a bit more time
+than standard mixing. If the library is built with the high quality
+mixer, interpolated mixing is always enabled, regardless of this
+flag.<br /></dd>
+<dt><code>DMODE_REVERSE</code></dt>
+<dd>This flag, if set, exchanges the left and right stereo
+channels.<br /></dd>
+<dt><code>DMODE_SURROUND</code></dt>
+<dd>This flag, if set, enables the surround mixers. Since surround
+mixing works only for stereo sound, this flag has no effect if the
+sound playback is in mono.</dd>
 </dl>
-
-<br>The following flags aren't taken in account until the sound driver is changed
-or reset:
+<br />
+The following flags aren't taken in account until the sound driver
+is changed or reset:
 <dl>
-<dt><code>DMODE_16BIT</code>
-<dd>This flag, if set, selects 16 bit sound mode. This mode yields better sound
-quality, but needs twice more mixing time. 
-<br><dt><code>DMODE_HQMIXER</code>
-<dd>This flag, if set, selects the high-quality software mixer. This mode yields
-better sound quality, but needs more mixing time. Of course, this flag has no
-effect if no <code>DMODE_SOFT_xx</code> flag is set. 
-<br><dt><code>DMODE_SOFT_MUSIC</code>
-<dd>This flag, if set, selects software mixing of the module. 
-<br><dt><code>DMODE_SOFT_SNDFX</code>
-<dd>This flag, if set, selects software mixing of the sound effects. 
-<br><dt><code>DMODE_STEREO</code>
-<dd>This flag, if set, selects stereo sound. 
+<dt><code>DMODE_16BIT</code></dt>
+<dd>This flag, if set, selects 16 bit sound mode. This mode yields
+better sound quality, but needs twice more mixing time.<br /></dd>
+<dt><code>DMODE_HQMIXER</code></dt>
+<dd>This flag, if set, selects the high-quality software mixer.
+This mode yields better sound quality, but needs more mixing time.
+Of course, this flag has no effect if no <code>DMODE_SOFT_xx</code>
+flag is set.<br /></dd>
+<dt><code>DMODE_SOFT_MUSIC</code></dt>
+<dd>This flag, if set, selects software mixing of the
+module.<br /></dd>
+<dt><code>DMODE_SOFT_SNDFX</code></dt>
+<dd>This flag, if set, selects software mixing of the sound
+effects.<br /></dd>
+<dt><code>DMODE_STEREO</code></dt>
+<dd>This flag, if set, selects stereo sound.</dd>
 </dl>
-
-<br>The default value of this variable is <code>DMODE_STEREO | DMODE_SURROUND |
-DMODE_16BITS | DMODE_SOFT_MUSIC | DMODE_SOFT_SNDFX</code>. 
+<br />
+The default value of this variable is <code>DMODE_STEREO |
+DMODE_SURROUND | DMODE_16BITS | DMODE_SOFT_MUSIC |
+DMODE_SOFT_SNDFX</code>.</dd>
 </dl>
-
-<p><hr>
-Node:<a name="Structure%20Reference">Structure Reference</a>,
-Next:<a rel=next href="#Error%20Reference">Error Reference</a>,
-Previous:<a rel=previous href="#Variable%20Reference">Variable Reference</a>,
-Up:<a rel=up href="#Library%20Reference">Library Reference</a>
-<br>
-
+<hr />
+Node:<a name="Structure_Reference">Structure Reference</a>,
+Next:<a rel="next" href="#Error_Reference">Error Reference</a>,
+Previous:<a rel="previous" href="#Variable_Reference">Variable
+Reference</a>, Up:<a rel="up" href="#Library_Reference">Library
+Reference</a><br />
 <h2>Structure Reference</h2>
-
-<p>Only the useful fields are described here; if a structure field is not
-described, you must assume that it's an internal field which must not be
-modified.
-
+<p>Only the useful fields are described here; if a structure field
+is not described, you must assume that it's an internal field which
+must not be modified.</p>
 <h3>Drivers</h3>
-
-<p>The <code>MDRIVER</code> structure is not meant to be used by anything else than the
-core of the library, but its first four fields contain useful information for
-your programs:
+<p>The <code>MDRIVER</code> structure is not meant to be used by
+anything else than the core of the library, but its first four
+fields contain useful information for your programs:</p>
 <dl>
-<dt><code>CHAR* Name</code>
-<dd>Name of the driver, usually never more than 20 characters. 
-<br><dt><code>CHAR* Description</code>
-<dd>Description of the driver, usually never more than 50 characters. 
-<br><dt><code>UBYTE HardVoiceLimit</code>
-<dd>Maximum number of hardware voices for this driver, 0 if the driver has no
-hardware mixing support. 
-<br><dt><code>UBYTE SoftVoiceLimit</code>
-<dd>Maximum number of software voices for this driver, 0 if the driver has no
-software mixing support. 
-<br><dt><code>CHAR* Alias</code>
-<dd>A short name for the driver, without spaces, usually never more than 10
-characters. 
+<dt><code>CHAR* Name</code></dt>
+<dd>Name of the driver, usually never more than 20
+characters.<br /></dd>
+<dt><code>CHAR* Description</code></dt>
+<dd>Description of the driver, usually never more than 50
+characters.<br /></dd>
+<dt><code>UBYTE HardVoiceLimit</code></dt>
+<dd>Maximum number of hardware voices for this driver, 0 if the
+driver has no hardware mixing support.<br /></dd>
+<dt><code>UBYTE SoftVoiceLimit</code></dt>
+<dd>Maximum number of software voices for this driver, 0 if the
+driver has no software mixing support.<br /></dd>
+<dt><code>CHAR* Alias</code></dt>
+<dd>A short name for the driver, without spaces, usually never more
+than 10 characters.</dd>
 </dl>
-
 <h3>Modules</h3>
-
-<p>The <code>MODULE</code> structure gathers all the necessary information needed to
-play a module file, regardless of its initial format.
-
+<p>The <code>MODULE</code> structure gathers all the necessary
+information needed to play a module file, regardless of its initial
+format.</p>
 <h4>General Module Information</h4>
-
-<p>The fields described in this section contain general information about the
-module and should not be modified.
-
+<p>The fields described in this section contain general information
+about the module and should not be modified.</p>
 <dl>
-<dt><code>CHAR* songname</code>
-<dd>Name of the module. 
-<br><dt><code>CHAR* modtype</code>
-<dd>Type of the module (which tracker format). 
-<br><dt><code>CHAR* comment</code>
-<dd>Either the module comments, or NULL if the module doesn't have comments. 
+<dt><code>CHAR* songname</code></dt>
+<dd>Name of the module.<br /></dd>
+<dt><code>CHAR* modtype</code></dt>
+<dd>Type of the module (which tracker format).<br /></dd>
+<dt><code>CHAR* comment</code></dt>
+<dd>Either the module comments, or NULL if the module doesn't have
+comments.</dd>
 </dl>
-
 <dl>
-<dt><code>UWORD flags</code>
+<dt><code>UWORD flags</code></dt>
 <dd>Several module flags or'ed together.
 <dl>
-<dt><code>UF_ARPMEM</code>
-<dd>If set, arpeggio effects have memory. 
-<br><dt><code>UF_BGSLIDES</code>
-<dd>If set, volume slide effects continue until a new note or a new effect is played. 
-<br><dt><code>UF_HIGHBPM</code>
-<dd>If set, the module is allowed to have its tempo value (bpm) over 255. 
-<br><dt><code>UF_INST</code>
+<dt><code>UF_ARPMEM</code></dt>
+<dd>If set, arpeggio effects have memory.<br /></dd>
+<dt><code>UF_BGSLIDES</code></dt>
+<dd>If set, volume slide effects continue until a new note or a new
+effect is played.<br /></dd>
+<dt><code>UF_HIGHBPM</code></dt>
+<dd>If set, the module is allowed to have its tempo value (bpm)
+over 255.<br /></dd>
+<dt><code>UF_INST</code></dt>
 <dd>If set, the module has instruments and samples; otherwise, the
-module has only samples. 
-<br><dt><code>UF_LINEAR</code>
-<dd>If set, slide periods are linear; otherwise, they are logarithmic. 
-<br><dt><code>UF_NNA</code>
-<dd>If set, module uses new note actions (NNA) and the <code>numvoices</code> field is
-valid. 
-<br><dt><code>UF_NOWRAP</code>
-<dd>If set, pattern break on the last pattern does not continue to the first
-pattern. 
-<br><dt><code>UF_S3MSLIDES</code>
-<dd>If set, module uses old-S3M style volume slides (slides processed every tick);
-otherwise, it uses the standard style (slides processed every tick except the
-first). 
-<br><dt><code>UF_XMPERIODS</code>
-<dd>If set, module uses XM-type periods; otherwise, it uses Amiga periods. 
-<br><dt><code>UF_FT2QUIRKS</code>
-<dd>If set, module player will reproduce some FastTracker 2 quirks during playback. 
-<br><dt><code>UF_PANNING</code>
-<dd>If set, module use panning commands. 
+module has only samples.<br /></dd>
+<dt><code>UF_LINEAR</code></dt>
+<dd>If set, slide periods are linear; otherwise, they are
+logarithmic.<br /></dd>
+<dt><code>UF_NNA</code></dt>
+<dd>If set, module uses new note actions (NNA) and the
+<code>numvoices</code> field is valid.<br /></dd>
+<dt><code>UF_NOWRAP</code></dt>
+<dd>If set, pattern break on the last pattern does not continue to
+the first pattern.<br /></dd>
+<dt><code>UF_S3MSLIDES</code></dt>
+<dd>If set, module uses old-S3M style volume slides (slides
+processed every tick); otherwise, it uses the standard style
+(slides processed every tick except the first).<br /></dd>
+<dt><code>UF_XMPERIODS</code></dt>
+<dd>If set, module uses XM-type periods; otherwise, it uses Amiga
+periods.<br /></dd>
+<dt><code>UF_FT2QUIRKS</code></dt>
+<dd>If set, module player will reproduce some FastTracker 2 quirks
+during playback.<br /></dd>
+<dt><code>UF_PANNING</code></dt>
+<dd>If set, module use panning commands.</dd>
 </dl>
-<br><dt><code>UBYTE numchn</code>
-<dd>The number of channels in the module. 
-<br><dt><code>UBYTE numvoices</code>
-<dd>If the module uses NNA, and this variable is not zero, it contains the limit
-of module voices; otherwise, the limit is set to the <code>maxchan</code> parameter
-of the <code>Player_Loadxx</code> functions. 
-<br><dt><code>UWORD numpos</code>
-<dd>The number of sound positions in the module. 
-<br><dt><code>UWORD numpat</code>
-<dd>The number of patterns. 
-<br><dt><code>UWORD numins</code>
-<dd>The number of instruments. 
-<br><dt><code>UWORD numsmp</code>
-<dd>The number of samples. 
+<br /></dd>
+<dt><code>UBYTE numchn</code></dt>
+<dd>The number of channels in the module.<br /></dd>
+<dt><code>UBYTE numvoices</code></dt>
+<dd>If the module uses NNA, and this variable is not zero, it
+contains the limit of module voices; otherwise, the limit is set to
+the <code>maxchan</code> parameter of the
+<code>Player_Loadxx</code> functions.<br /></dd>
+<dt><code>UWORD numpos</code></dt>
+<dd>The number of sound positions in the module.<br /></dd>
+<dt><code>UWORD numpat</code></dt>
+<dd>The number of patterns.<br /></dd>
+<dt><code>UWORD numins</code></dt>
+<dd>The number of instruments.<br /></dd>
+<dt><code>UWORD numsmp</code></dt>
+<dd>The number of samples.</dd>
 </dl>
-
 <dl>
-<dt><code>INSTRUMENT* instruments</code>
-<dd>Points to an array of instrument structures. 
-<br><dt><code>SAMPLE* samples</code>
-<dd>Points to an array of sample structures. 
+<dt><code>INSTRUMENT* instruments</code></dt>
+<dd>Points to an array of instrument structures.<br /></dd>
+<dt><code>SAMPLE* samples</code></dt>
+<dd>Points to an array of sample structures.</dd>
 </dl>
-