1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>NeL: NLSOUND::ISoundDriver class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.6 -->
<div class="qindex"> <form class="search" action="search.php" method="get">
<a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a> | <span class="search"><u>S</u>earch for <input class="search" type="text" name="query" value="" size="20" accesskey="s"/></span></form></div>
<h1>NLSOUND::ISoundDriver Class Reference</h1><code>#include <<a class="el" href="a06417.html">sound_driver.h</a>></code>
<p>
<p>Inheritance diagram for NLSOUND::ISoundDriver:
<p><center><img src="a03419.png" usemap="#NLSOUND::ISoundDriver_map" border="0" alt=""></center>
<map name="NLSOUND::ISoundDriver_map">
<area href="a03418.html" alt="NLSOUND::CSoundDriverAL" shape="rect" coords="0,56,204,80">
<area href="a03420.html" alt="NLSOUND::CSoundDriverDSound" shape="rect" coords="214,56,418,80">
</map>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Abstract sound driver (implemented in sound driver dynamic library)<p>
The caller of the create methods is responsible for the deletion of the created objects. These objects must be deleted before deleting the <a class="el" href="a03419.html">ISoundDriver</a> instance.<p>
The driver is a singleton. To access, only the pointer returned by <a class="el" href="a03419.html#NLSOUND_1_1ISoundDrivere0">createDriver()</a> is provided.<p>
<dl compact><dt><b>Author:</b></dt><dd>Olivier Cado <p>
Nevrax France </dd></dl>
<dl compact><dt><b>Date:</b></dt><dd>2001 </dd></dl>
<p>
<p>
Definition at line <a class="el" href="a06417.html#l00115">115</a> of file <a class="el" href="a06417.html">sound_driver.h</a>.<table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="a03419.html#NLSOUND_1_1ISoundDrivera0">commit3DChanges</a> ()=0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Commit all the changes made to 3D settings of listener and sources. <a href="#NLSOUND_1_1ISoundDrivera0"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="a04558.html#a15">uint</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03419.html#NLSOUND_1_1ISoundDrivera1">countMaxSources</a> ()=0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the maximum number of sources that can created. <a href="#NLSOUND_1_1ISoundDrivera1"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="a02298.html">IBuffer</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a03419.html#NLSOUND_1_1ISoundDrivera2">createBuffer</a> ()=0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Create a sound buffer. <a href="#NLSOUND_1_1ISoundDrivera2"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="a03861.html">IListener</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a03419.html#NLSOUND_1_1ISoundDrivera3">createListener</a> ()=0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Create the listener instance. <a href="#NLSOUND_1_1ISoundDrivera3"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="a03428.html">ISource</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a03419.html#NLSOUND_1_1ISoundDrivera4">createSource</a> ()=0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Create a source. <a href="#NLSOUND_1_1ISoundDrivera4"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="a03419.html#NLSOUND_1_1ISoundDrivera5">displayBench</a> (<a class="el" href="a02813.html">NLMISC::CLog</a> *log)=0</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="a03419.html#NLSOUND_1_1ISoundDrivera6">endBench</a> ()=0</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03419.html#NLSOUND_1_1ISoundDrivera7">readRawBuffer</a> (<a class="el" href="a02298.html">IBuffer</a> *destbuffer, const std::string &name, <a class="el" href="a04558.html#a7">uint8</a> *rawData, <a class="el" href="a04558.html#a15">uint</a> dataSize, <a class="el" href="a05381.html#a80">TSampleFormat</a> <a class="el" href="a04223.html#a641">format</a>, <a class="el" href="a04558.html#a11">uint32</a> frequency)=0</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03419.html#NLSOUND_1_1ISoundDrivera8">readWavBuffer</a> (<a class="el" href="a02298.html">IBuffer</a> *destbuffer, const std::string &name, <a class="el" href="a04558.html#a7">uint8</a> *wavData, <a class="el" href="a04558.html#a15">uint</a> dataSize)=0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Temp. <a href="#NLSOUND_1_1ISoundDrivera8"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="a03419.html#NLSOUND_1_1ISoundDrivera9">startBench</a> ()=0</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="a03419.html#NLSOUND_1_1ISoundDrivera10">writeProfile</a> (std::ostream &out)=0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Write information about the driver to the output stream. <a href="#NLSOUND_1_1ISoundDrivera10"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual </td><td class="memItemRight" valign=bottom><a class="el" href="a03419.html#NLSOUND_1_1ISoundDrivera11">~ISoundDriver</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="#NLSOUND_1_1ISoundDrivera11"></a><br><br></td></tr>
<tr><td colspan=2><br><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03419.html">ISoundDriver</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a03419.html#NLSOUND_1_1ISoundDrivere0">createDriver</a> (bool useEax, <a class="el" href="a03878.html">IStringMapperProvider</a> *stringMapper)</td></tr>
<tr><td colspan=2><br><h2>Static Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a04558.html#a11">uint32</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03419.html#NLSOUND_1_1ISoundDrivers0">InterfaceVersion</a> = 0x08</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Version of the driver interface. To increment when the interface change. <a href="#NLSOUND_1_1ISoundDrivers0"></a><br><br></td></tr>
<tr><td colspan=2><br><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="a03419.html#NLSOUND_1_1ISoundDriverb0">ISoundDriver</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <a href="#NLSOUND_1_1ISoundDriverb0"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="a03419.html#NLSOUND_1_1ISoundDriverb1">removeBuffer</a> (<a class="el" href="a02298.html">IBuffer</a> *<a class="el" href="a04223.html#a589">buffer</a>)=0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Remove a buffer (should be called by the friend destructor of the buffer class). <a href="#NLSOUND_1_1ISoundDriverb1"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="a03419.html#NLSOUND_1_1ISoundDriverb2">removeSource</a> (<a class="el" href="a03428.html">ISource</a> *source)=0</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Remove a source (should be called by the friend destructor of the source class). <a href="#NLSOUND_1_1ISoundDriverb2"></a><br><br></td></tr>
</table>
<hr><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" name="NLSOUND_1_1ISoundDrivera11" doxytag="NLSOUND::ISoundDriver::~ISoundDriver" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> virtual NLSOUND::ISoundDriver::~<a class="el" href="a03419.html">ISoundDriver</a> </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [inline, virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Destructor.
<p>
<p>
Definition at line <a class="el" href="a06417.html#l00180">180</a> of file <a class="el" href="a06417.html">sound_driver.h</a>.
<p>
<div class="fragment"><pre>00180 {}
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1ISoundDriverb0" doxytag="NLSOUND::ISoundDriver::ISoundDriver" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> NLSOUND::ISoundDriver::ISoundDriver </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [inline, protected]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Constructor.
<p>
<p>
Definition at line <a class="el" href="a06417.html#l00185">185</a> of file <a class="el" href="a06417.html">sound_driver.h</a>.
<p>
<div class="fragment"><pre>00185 {}
</pre></div> </td>
</tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="NLSOUND_1_1ISoundDrivera0" doxytag="NLSOUND::ISoundDriver::commit3DChanges" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> virtual void NLSOUND::ISoundDriver::commit3DChanges </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [pure virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Commit all the changes made to 3D settings of listener and sources.
<p>
<p>
Implemented in <a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSounda0">NLSOUND::CSoundDriverDSound</a>, and <a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALa1">NLSOUND::CSoundDriverAL</a>.
<p>
Referenced by <a class="el" href="a05465.html#l01268">NLSOUND::CAudioMixerUser::update()</a>. </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1ISoundDrivera1" doxytag="NLSOUND::ISoundDriver::countMaxSources" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> virtual <a class="el" href="a04558.html#a15">uint</a> NLSOUND::ISoundDriver::countMaxSources </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [pure virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Return the maximum number of sources that can created.
<p>
<p>
Implemented in <a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSounda3">NLSOUND::CSoundDriverDSound</a>, and <a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALa2">NLSOUND::CSoundDriverAL</a>. </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1ISoundDrivera2" doxytag="NLSOUND::ISoundDriver::createBuffer" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> virtual <a class="el" href="a02298.html">IBuffer</a>* NLSOUND::ISoundDriver::createBuffer </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [pure virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Create a sound buffer.
<p>
<p>
Implemented in <a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSounda5">NLSOUND::CSoundDriverDSound</a>, and <a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALa3">NLSOUND::CSoundDriverAL</a>.
<p>
Referenced by <a class="el" href="a05465.html#l00560">NLSOUND::CAudioMixerUser::buildSampleBankList()</a>, and <a class="el" href="a06346.html#l00228">NLSOUND::CSampleBank::load()</a>. </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1ISoundDrivere0" doxytag="NLSOUND::ISoundDriver::createDriver" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="a03419.html">ISoundDriver</a> * NLSOUND::ISoundDriver::createDriver </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">bool </td>
<td class="mdname" nowrap> <em>useEax</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap><a class="el" href="a03878.html">IStringMapperProvider</a> * </td>
<td class="mdname" nowrap> <em>stringMapper</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [static]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
The static method which builds the sound driver instance In case of failure, can throw one of these <a class="el" href="a03814.html">ESoundDriver</a> exception objects: <a class="el" href="a03819.html">ESoundDriverNotFound</a>, <a class="el" href="a03816.html">ESoundDriverCorrupted</a>, <a class="el" href="a03821.html">ESoundDriverOldVersion</a>, <a class="el" href="a03822.html">ESoundDriverUnknownVersion</a><p>
You can request support for EAX. If EAX is requested and if there is enougth hardware buffer replay, then only hardware buffer are created when calling createBuffer. If the number of available hardware buffer is less than 10, then EAX is ignored.
<p>
Definition at line <a class="el" href="a06416.html#l00061">61</a> of file <a class="el" href="a06416.html">sound_driver.cpp</a>.
<p>
References <a class="el" href="a05646.html#l00649">buffer</a>, <a class="el" href="a06416.html#l00050">NLSOUND::ISDRV_CREATE_PROC</a>, <a class="el" href="a06416.html#l00053">NLSOUND::ISDRV_VERSION_PROC</a>, <a class="el" href="a05622.html#l00111">nlinfo</a>, and <a class="el" href="a05622.html#l00135">nlwarning</a>.
<p>
<div class="fragment"><pre>00062 {
00063 <a class="code" href="a05381.html#a13">ISDRV_CREATE_PROC</a> createSoundDriver = NULL;
00064 <a class="code" href="a05381.html#a15">ISDRV_VERSION_PROC</a> versionDriver = NULL;
00065
00066 <span class="preprocessor">#ifdef NL_OS_WINDOWS</span>
00067 <span class="preprocessor"></span>
00068 <span class="comment">// WINDOWS code.</span>
00069 HINSTANCE hInst;
00070
00071 hInst = LoadLibrary(NLSOUND_DLL_NAME);
00072
00073 <span class="keywordflow">if</span> (!hInst)
00074 {
00075 <span class="keywordflow">throw</span> ESoundDriverNotFound();
00076 }
00077
00078 <span class="keywordtype">char</span> <a class="code" href="a04223.html#a589">buffer</a>[1024], *ptr;
00079 SearchPath (NULL, NLSOUND_DLL_NAME, NULL, 1023, buffer, &ptr);
00080 <a class="code" href="a04199.html#a1">nlinfo</a> (<span class="stringliteral">"Using the library '"</span>NLSOUND_DLL_NAME<span class="stringliteral">"' that is in the directory: '%s'"</span>, buffer);
00081
00082 createSoundDriver = (<a class="code" href="a05381.html#a13">ISDRV_CREATE_PROC</a>) GetProcAddress (hInst, IDRV_CREATE_PROC_NAME);
00083 <span class="keywordflow">if</span> (createSoundDriver == NULL)
00084 {
00085 <a class="code" href="a04199.html#a1">nlinfo</a>( <span class="stringliteral">"Error: %u"</span>, GetLastError() );
00086 <span class="keywordflow">throw</span> ESoundDriverCorrupted();
00087 }
00088
00089 versionDriver = (<a class="code" href="a05381.html#a15">ISDRV_VERSION_PROC</a>) GetProcAddress (hInst, IDRV_VERSION_PROC_NAME);
00090 <span class="keywordflow">if</span> (versionDriver != NULL)
00091 {
00092 <span class="keywordflow">if</span> (versionDriver()<ISoundDriver::InterfaceVersion)
00093 <span class="keywordflow">throw</span> ESoundDriverOldVersion();
00094 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (versionDriver()>ISoundDriver::InterfaceVersion)
00095 <span class="keywordflow">throw</span> ESoundDriverUnknownVersion();
00096 }
00097
00098 <span class="preprocessor">#elif defined (NL_OS_UNIX)</span>
00099 <span class="preprocessor"></span>
00100 <span class="comment">// Unix code</span>
00101 <span class="keywordtype">void</span> *handle = dlopen(NLSOUND_DLL_NAME, RTLD_NOW);
00102
00103 <span class="keywordflow">if</span> (handle == NULL)
00104 {
00105 <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"when loading dynamic library '%s': %s"</span>, NLSOUND_DLL_NAME, dlerror());
00106 <span class="keywordflow">throw</span> ESoundDriverNotFound();
00107 }
00108
00109 <span class="comment">/* Not ANSI. Might produce a warning */</span>
00110 createSoundDriver = (<a class="code" href="a05381.html#a13">ISDRV_CREATE_PROC</a>) dlsym (handle, IDRV_CREATE_PROC_NAME);
00111 <span class="keywordflow">if</span> (createSoundDriver == NULL)
00112 {
00113 <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"when getting function in dynamic library '%s': %s"</span>, NLSOUND_DLL_NAME, dlerror());
00114 <span class="keywordflow">throw</span> ESoundDriverCorrupted();
00115 }
00116
00117 versionDriver = (<a class="code" href="a05381.html#a15">ISDRV_VERSION_PROC</a>) dlsym (handle, IDRV_VERSION_PROC_NAME);
00118 <span class="keywordflow">if</span> (versionDriver != NULL)
00119 {
00120 <span class="keywordflow">if</span> (versionDriver()<ISoundDriver::InterfaceVersion)
00121 <span class="keywordflow">throw</span> ESoundDriverOldVersion();
00122 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (versionDriver()>ISoundDriver::InterfaceVersion)
00123 <span class="keywordflow">throw</span> ESoundDriverUnknownVersion();
00124 }
00125
00126 <span class="preprocessor">#else // NL_OS_UNIX</span>
00127 <span class="preprocessor"></span><span class="preprocessor">#error "Dynamic DLL loading not implemented!"</span>
00128 <span class="preprocessor"></span><span class="preprocessor">#endif // NL_OS_UNIX</span>
00129 <span class="preprocessor"></span>
00130 <a class="code" href="a03419.html#NLSOUND_1_1ISoundDriverb0">ISoundDriver</a> *ret = createSoundDriver(useEax, stringMapper);
00131 <span class="keywordflow">if</span> ( ret == NULL )
00132 {
00133 <span class="keywordflow">throw</span> ESoundDriverCantCreateDriver();
00134 }
00135 <span class="keywordflow">return</span> ret;
00136 }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1ISoundDrivera3" doxytag="NLSOUND::ISoundDriver::createListener" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> virtual <a class="el" href="a03861.html">IListener</a>* NLSOUND::ISoundDriver::createListener </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [pure virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Create the listener instance.
<p>
<p>
Implemented in <a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSounda6">NLSOUND::CSoundDriverDSound</a>, and <a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALa4">NLSOUND::CSoundDriverAL</a>.
<p>
Referenced by <a class="el" href="a05922.html#l00056">NLSOUND::CListenerUser::init()</a>. </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1ISoundDrivera4" doxytag="NLSOUND::ISoundDriver::createSource" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> virtual <a class="el" href="a03428.html">ISource</a>* NLSOUND::ISoundDriver::createSource </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [pure virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Create a source.
<p>
<p>
Implemented in <a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSounda7">NLSOUND::CSoundDriverDSound</a>, and <a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALa5">NLSOUND::CSoundDriverAL</a>.
<p>
Referenced by <a class="el" href="a06037.html#l00053">NLSOUND::CTrack::init()</a>. </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1ISoundDrivera5" doxytag="NLSOUND::ISoundDriver::displayBench" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> virtual void NLSOUND::ISoundDriver::displayBench </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="a02813.html">NLMISC::CLog</a> * </td>
<td class="mdname1" valign="top" nowrap> <em>log</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [pure virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Implemented in <a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundd2">NLSOUND::CSoundDriverDSound</a>, and <a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALa7">NLSOUND::CSoundDriverAL</a>.
<p>
Referenced by <a class="el" href="a05465.html#l02148">NLSOUND::CAudioMixerUser::displayDriverBench()</a>. </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1ISoundDrivera6" doxytag="NLSOUND::ISoundDriver::endBench" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> virtual void NLSOUND::ISoundDriver::endBench </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [pure virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Implemented in <a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundd3">NLSOUND::CSoundDriverDSound</a>, and <a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALa8">NLSOUND::CSoundDriverAL</a>.
<p>
Referenced by <a class="el" href="a05465.html#l02142">NLSOUND::CAudioMixerUser::endDriverBench()</a>. </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1ISoundDrivera7" doxytag="NLSOUND::ISoundDriver::readRawBuffer" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> virtual bool NLSOUND::ISoundDriver::readRawBuffer </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="a02298.html">IBuffer</a> * </td>
<td class="mdname" nowrap> <em>destbuffer</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>const std::string & </td>
<td class="mdname" nowrap> <em>name</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a> * </td>
<td class="mdname" nowrap> <em>rawData</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a> </td>
<td class="mdname" nowrap> <em>dataSize</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap><a class="el" href="a05381.html#a80">TSampleFormat</a> </td>
<td class="mdname" nowrap> <em>format</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap><a class="el" href="a04558.html#a11">uint32</a> </td>
<td class="mdname" nowrap> <em>frequency</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [pure virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Implemented in <a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSounda12">NLSOUND::CSoundDriverDSound</a>, and <a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALa11">NLSOUND::CSoundDriverAL</a>.
<p>
Referenced by <a class="el" href="a06346.html#l00228">NLSOUND::CSampleBank::load()</a>. </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1ISoundDrivera8" doxytag="NLSOUND::ISoundDriver::readWavBuffer" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> virtual bool NLSOUND::ISoundDriver::readWavBuffer </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="a02298.html">IBuffer</a> * </td>
<td class="mdname" nowrap> <em>destbuffer</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>const std::string & </td>
<td class="mdname" nowrap> <em>name</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap><a class="el" href="a04558.html#a7">uint8</a> * </td>
<td class="mdname" nowrap> <em>wavData</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap><a class="el" href="a04558.html#a15">uint</a> </td>
<td class="mdname" nowrap> <em>dataSize</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [pure virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Temp.
<p>
<p>
Implemented in <a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSounda13">NLSOUND::CSoundDriverDSound</a>, and <a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALa12">NLSOUND::CSoundDriverAL</a>.
<p>
Referenced by <a class="el" href="a05465.html#l00560">NLSOUND::CAudioMixerUser::buildSampleBankList()</a>, and <a class="el" href="a05459.html#l00150">NLSOUND::CAsyncFileManagerSound::CLoadWavFile::run()</a>. </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1ISoundDriverb1" doxytag="NLSOUND::ISoundDriver::removeBuffer" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> virtual void NLSOUND::ISoundDriver::removeBuffer </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="a02298.html">IBuffer</a> * </td>
<td class="mdname1" valign="top" nowrap> <em>buffer</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [protected, pure virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Remove a buffer (should be called by the friend destructor of the buffer class).
<p>
<p>
Implemented in <a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundd4">NLSOUND::CSoundDriverDSound</a>, and <a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALb7">NLSOUND::CSoundDriverAL</a>. </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1ISoundDriverb2" doxytag="NLSOUND::ISoundDriver::removeSource" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> virtual void NLSOUND::ISoundDriver::removeSource </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="a03428.html">ISource</a> * </td>
<td class="mdname1" valign="top" nowrap> <em>source</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [protected, pure virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Remove a source (should be called by the friend destructor of the source class).
<p>
<p>
Implemented in <a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundd5">NLSOUND::CSoundDriverDSound</a>, and <a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALb8">NLSOUND::CSoundDriverAL</a>. </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1ISoundDrivera9" doxytag="NLSOUND::ISoundDriver::startBench" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> virtual void NLSOUND::ISoundDriver::startBench </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [pure virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Implemented in <a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSoundd6">NLSOUND::CSoundDriverDSound</a>, and <a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALa13">NLSOUND::CSoundDriverAL</a>.
<p>
Referenced by <a class="el" href="a05465.html#l02136">NLSOUND::CAudioMixerUser::startDriverBench()</a>. </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1ISoundDrivera10" doxytag="NLSOUND::ISoundDriver::writeProfile" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> virtual void NLSOUND::ISoundDriver::writeProfile </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">std::ostream & </td>
<td class="mdname1" valign="top" nowrap> <em>out</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [pure virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Write information about the driver to the output stream.
<p>
<p>
Implemented in <a class="el" href="a03420.html#NLSOUND_1_1CSoundDriverDSounda16">NLSOUND::CSoundDriverDSound</a>, and <a class="el" href="a03418.html#NLSOUND_1_1CSoundDriverALa14">NLSOUND::CSoundDriverAL</a>.
<p>
Referenced by <a class="el" href="a05465.html#l00227">NLSOUND::CAudioMixerUser::writeProfile()</a>. </td>
</tr>
</table>
<hr><h2>Field Documentation</h2>
<a class="anchor" name="NLSOUND_1_1ISoundDrivers0" doxytag="NLSOUND::ISoundDriver::InterfaceVersion" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> const <a class="el" href="a04558.html#a11">uint32</a> <a class="el" href="a03419.html#NLSOUND_1_1ISoundDrivers0">NLSOUND::ISoundDriver::InterfaceVersion</a> = 0x08<code> [static]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Version of the driver interface. To increment when the interface change.
<p>
<p>
Definition at line <a class="el" href="a06416.html#l00048">48</a> of file <a class="el" href="a06416.html">sound_driver.cpp</a>. </td>
</tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="a06417.html">sound_driver.h</a><li><a class="el" href="a06416.html">sound_driver.cpp</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 14:51:45 2004 for NeL by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 >
</a>1.3.6 </small></address>
</body>
</html>
|