root/trunk/docs/sdlmix.html

Revision 255, 2.1 kB (checked in by aldacron, 2 years ago)

[Docs]
* corrected several spelling mistakes
* tweaked the wording of a few passages to make for clarity or to just make them more proper
* fixed a couple of glaring bugs that caused some bits of text to be invisible
* deleted a some things that were no longer relevant

  • Property svn:mime-type set to text/html
  • Property svn:mim-type set to text/html
Line 
1 <html lang="en">
2 <head>
3     <title>DerelictSDLImage</title>
4     <link rel="stylesheet" type="text/css" href="styles.css">
5 </head>
6 <body>
7 <hr>
8 <hr>
9 <h2 align="center">DerelictSDLMixer</h2>
10 <hr>
11 <hr>
12 <h3>Introduction</h3>
13 DerelictSDLMixer is a D binding to Sam Lantinga's
14 <a href="http://www.libsdl.org/projects/SDL_mixer/">SDL_mixer</a>, a cross
15 platform, multichannel, audio mixer library designed to be used together with
16 <a href="http://www.libsdl.org/">SDL</a>.
17
18 <div class="important">This version of DerelictSDLMixer requires SDL_mixer 1.2.7 or later.</div>
19
20 <h3>Using</h3>
21 <ol>
22 <li>Always make sure the DerelictSDLMixer source modules are available on your import
23 path.</li>
24 <li>In modules that make use of DerelictSDLMixer, you will need to import the
25 derelict.SDLMixer.SDLMixer module.</li>
26 <li>Before calling any SDLMixer functions, you need to make a call to <tt>DerelictSDLMixer.load()</tt>.
27 This will load the shared library.</li>
28 </ol>
29
30 <p>
31 The following is a complete program that loads DerelictSDLMixer:
32 </p>
33
34 <pre>
35 import derelict.sdl.mixer;
36
37 void main()
38 {
39     DerelictSDLMixer.load();
40    
41     // now you can call SDL_mixer functions
42 }
43 </pre>
44 <p>
45 As with other Derelict packages, DerelictSDLMixer will throw an exception if an error
46 occurs while loading the shared library. For more information on Derelict
47 exceptions, see the documentation for
48 <a href="loading.html">Loading/Unloading Shared Libraries</a>.
49 </p>
50 <div class="note">
51 In any module that calls SDL_mixer functions, you will also need
52 to import derelict.sdl.sdl. This is not required to load the library, as shown
53 above.</div>
54 <p>
55 Finally, the method <tt>DerelictSDLMixer.unload()</tt> is provided for convenience. In normal
56 practice you do not need to call this function, as Derelict will unload the library
57 automatically when the app exits. You generally should only use this function if
58 you need to unload DerelictSDL while the application is running.
59 </p>
60
61 <h3>Dependencies</h3>
62 <a href="util.html">DerelictUtil</a>
63 <br /><a href="sdl.html">DerelictSDL</a>
64
65 </body>
66 </html>
Note: See TracBrowser for help on using the browser.