| 1 |
<html lang="en"> |
|---|
| 2 |
<head> |
|---|
| 3 |
<title>DerelictOgg</title> |
|---|
| 4 |
<link rel="stylesheet" type="text/css" href="styles.css"> |
|---|
| 5 |
</head> |
|---|
| 6 |
<body> |
|---|
| 7 |
<hr> |
|---|
| 8 |
<hr> |
|---|
| 9 |
<h2 align="center">DerelictOgg</h2> |
|---|
| 10 |
<hr> |
|---|
| 11 |
<hr> |
|---|
| 12 |
<h3>Introduction</h3> |
|---|
| 13 |
|
|---|
| 14 |
<p>DerelictOgg is a D binding to the <a href="http://www.xiph.org/ogg/">Ogg</a> |
|---|
| 15 |
library. As explained in the link, Ogg is only a multimedia container |
|---|
| 16 |
file format. If you're wanting to be able to decode Ogg Vorbis sound files, |
|---|
| 17 |
see <a href="vorbis.html">DerelictVorbis</a> instead.</p> |
|---|
| 18 |
|
|---|
| 19 |
<h3>Using</h3> |
|---|
| 20 |
<ol> |
|---|
| 21 |
<li>Always make sure the DerelictOgg source modules are available on your import |
|---|
| 22 |
path.</li> |
|---|
| 23 |
<li>In modules that make use of DerelictOgg, you will need to import the derelict.ogg.ogg |
|---|
| 24 |
module.</li> |
|---|
| 25 |
<li>Before calling any OpenOgg functions, you need to make a call to <tt>DerelictOgg.load()</tt>. |
|---|
| 26 |
This will load the shared library.</li> |
|---|
| 27 |
</ol> |
|---|
| 28 |
|
|---|
| 29 |
<p> |
|---|
| 30 |
The following is a complete program that loads DerelictOgg: |
|---|
| 31 |
</p> |
|---|
| 32 |
|
|---|
| 33 |
<pre> |
|---|
| 34 |
import derelict.ogg.ogg; |
|---|
| 35 |
|
|---|
| 36 |
void main() |
|---|
| 37 |
{ |
|---|
| 38 |
DerelictOgg.load(); |
|---|
| 39 |
|
|---|
| 40 |
// now you can call Ogg functions |
|---|
| 41 |
} |
|---|
| 42 |
</pre> |
|---|
| 43 |
|
|---|
| 44 |
|
|---|
| 45 |
<p> |
|---|
| 46 |
As with other Derelict packages, DerelictOgg will throw an exception if an error |
|---|
| 47 |
occurs while loading the shared library. For more information on Derelict |
|---|
| 48 |
exceptions, see the documentation for |
|---|
| 49 |
<a href="loading.html">Loading/Unloading Shared Libraries</a>. |
|---|
| 50 |
</p><p> |
|---|
| 51 |
Finally, the method <tt>DerelictOgg.unload()</tt> is provided for convenience. In normal |
|---|
| 52 |
practice you do not need to call this function, as Derelict will unload the library |
|---|
| 53 |
automatically when the app exits. You generally should only use this function if |
|---|
| 54 |
you need to unload DerelictOgg while the application is running. |
|---|
| 55 |
</p> |
|---|
| 56 |
|
|---|
| 57 |
<h3>Dependencies</h3> |
|---|
| 58 |
<a href="util.html">DerelictUtil</a> |
|---|
| 59 |
|
|---|
| 60 |
</body> |
|---|
| 61 |
</html> |
|---|