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
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
|
<!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::CBufferDSound 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::CBufferDSound Class Reference</h1><code>#include <<a class="el" href="a05521.html">buffer_dsound.h</a>></code>
<p>
<p>Inheritance diagram for NLSOUND::CBufferDSound:
<p><center><img src="a02299.png" usemap="#NLSOUND::CBufferDSound_map" border="0" alt=""></center>
<map name="NLSOUND::CBufferDSound_map">
<area href="a02298.html" alt="NLSOUND::IBuffer" shape="rect" coords="0,0,167,24">
</map>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Buffer for the DSound implementation of the audio driver.<p>
A buffer represents a sound file loaded in RAM.<p>
<dl compact><dt><b>Author:</b></dt><dd>Peter Hanappe, Olivier Cado <p>
Nevrax France </dd></dl>
<dl compact><dt><b>Date:</b></dt><dd>2002 </dd></dl>
<p>
<p>
Definition at line <a class="el" href="a05521.html#l00045">45</a> of file <a class="el" href="a05521.html">buffer_dsound.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> </td><td class="memItemRight" valign=bottom><a class="el" href="a02299.html#NLSOUND_1_1CBufferDSounda0">CBufferDSound</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <a href="#NLSOUND_1_1CBufferDSounda0"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02299.html#NLSOUND_1_1CBufferDSounda1">fillBuffer</a> (void *<a class="el" href="a04223.html#a652">src</a>, <a class="el" href="a04558.html#a11">uint32</a> bufsize)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the buffer size and fill the buffer. Return true if ok. Call <a class="el" href="a02299.html#NLSOUND_1_1CBufferDSounda16">setFormat()</a> first. <a href="#NLSOUND_1_1CBufferDSounda1"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02298.html#NLSOUND_1_1IBuffera1">fillMore</a> (void *<a class="el" href="a04223.html#a652">src</a>, <a class="el" href="a04558.html#a11">uint32</a> srcsize)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="a04558.html#a11">uint32</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02299.html#NLSOUND_1_1CBufferDSounda3">getBufferADPCMEncoded</a> (std::vector< <a class="el" href="a04558.html#a7">uint8</a> > &result)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="a04558.html#a11">uint32</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02299.html#NLSOUND_1_1CBufferDSounda4">getBufferMono16</a> (std::vector< <a class="el" href="a04558.html#a8">sint16</a> > &result)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="a04558.html#a7">uint8</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a02299.html#NLSOUND_1_1CBufferDSounda5">getData</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return a pointer to the sample data. <a href="#NLSOUND_1_1CBufferDSounda5"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual float </td><td class="memItemRight" valign=bottom><a class="el" href="a02299.html#NLSOUND_1_1CBufferDSounda6">getDuration</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the duration (in ms) of the sample in the buffer. <a href="#NLSOUND_1_1CBufferDSounda6"></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="a02299.html#NLSOUND_1_1CBufferDSounda7">getFormat</a> (<a class="el" href="a05381.html#a80">TSampleFormat</a> &<a class="el" href="a04223.html#a641">format</a>, <a class="el" href="a04558.html#a15">uint</a> &freq) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the format and frequency. <a href="#NLSOUND_1_1CBufferDSounda7"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual const <a class="el" href="a05378.html#a236">NLMISC::TStringId</a> & </td><td class="memItemRight" valign=bottom><a class="el" href="a02299.html#NLSOUND_1_1CBufferDSounda8">getName</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the name of the buffer. <a href="#NLSOUND_1_1CBufferDSounda8"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual <a class="el" href="a04558.html#a11">uint32</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02299.html#NLSOUND_1_1CBufferDSounda9">getSize</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the size of the buffer, in bytes. <a href="#NLSOUND_1_1CBufferDSounda9"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02299.html#NLSOUND_1_1CBufferDSounda10">isBufferLoaded</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return true if the buffer is loaded. Used for async load/unload. <a href="#NLSOUND_1_1CBufferDSounda10"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02299.html#NLSOUND_1_1CBufferDSounda11">isFillMoreSupported</a> () const </td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02299.html#NLSOUND_1_1CBufferDSounda12">isStereo</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return true if the buffer is stereo, false if mono. <a href="#NLSOUND_1_1CBufferDSounda12"></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="a02299.html#NLSOUND_1_1CBufferDSounda13">presetName</a> (const <a class="el" href="a05378.html#a236">NLMISC::TStringId</a> &bufferName)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02299.html#NLSOUND_1_1CBufferDSounda14">readRawBuffer</a> (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)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02299.html#NLSOUND_1_1CBufferDSounda15">readWavBuffer</a> (const std::string &name, <a class="el" href="a04558.html#a7">uint8</a> *wavData, <a class="el" href="a04558.html#a15">uint</a> dataSize)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Load a sound file in the buffer. Throws an exception is an error occurs. <a href="#NLSOUND_1_1CBufferDSounda15"></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="a02299.html#NLSOUND_1_1CBufferDSounda16">setFormat</a> (<a class="el" href="a05381.html#a80">TSampleFormat</a> <a class="el" href="a04223.html#a641">format</a>, <a class="el" href="a04558.html#a15">uint</a> freq)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set the sample format. Example: freq=44100. <a href="#NLSOUND_1_1CBufferDSounda16"></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="a02298.html#NLSOUND_1_1IBuffera11">setSize</a> (<a class="el" href="a04558.html#a11">uint32</a> <a class="el" href="a04223.html#a587">size</a>)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Force the buffer size without filling data (if <a class="el" href="a02298.html#NLSOUND_1_1IBuffera7">isFillMoreSupported()</a> only). <a href="#NLSOUND_1_1IBuffera11"></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="a02299.html#NLSOUND_1_1CBufferDSounda18">~CBufferDSound</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="#NLSOUND_1_1CBufferDSounda18"></a><br><br></td></tr>
<tr><td colspan=2><br><h2>Static Public Member Functions</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader">Source properties</div></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02298.html#NLSOUND_1_1IBufferz1304_2">decodeADPCM</a> (<a class="el" href="a04558.html#a7">uint8</a> *indata, <a class="el" href="a04558.html#a8">sint16</a> *outdata, <a class="el" href="a04558.html#a15">uint</a> nbSample, TADPCMState &state)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02298.html#NLSOUND_1_1IBufferz1304_3">encodeADPCM</a> (<a class="el" href="a04558.html#a8">sint16</a> *indata, <a class="el" href="a04558.html#a7">uint8</a> *outdata, <a class="el" href="a04558.html#a15">uint</a> nbSample, TADPCMState &state)</td></tr>
<tr><td colspan="2"><div class="groupHeader">Source properties</div></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02298.html#NLSOUND_1_1IBufferz1304_2">decodeADPCM</a> (<a class="el" href="a04558.html#a7">uint8</a> *indata, <a class="el" href="a04558.html#a8">sint16</a> *outdata, <a class="el" href="a04558.html#a15">uint</a> nbSample, TADPCMState &state)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02298.html#NLSOUND_1_1IBufferz1304_3">encodeADPCM</a> (<a class="el" href="a04558.html#a8">sint16</a> *indata, <a class="el" href="a04558.html#a7">uint8</a> *outdata, <a class="el" href="a04558.html#a15">uint</a> nbSample, TADPCMState &state)</td></tr>
<tr><td colspan=2><br><h2>Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a7">uint8</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a02299.html#NLSOUND_1_1CBufferDSoundr0">_Data</a></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a05381.html#a80">TSampleFormat</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02299.html#NLSOUND_1_1CBufferDSoundr1">_Format</a></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a15">uint</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02299.html#NLSOUND_1_1CBufferDSoundr2">_Freq</a></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a05378.html#a236">NLMISC::TStringId</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02299.html#NLSOUND_1_1CBufferDSoundr3">_Name</a></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a11">uint32</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02299.html#NLSOUND_1_1CBufferDSoundr4">_Size</a></td></tr>
</table>
<hr><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" name="NLSOUND_1_1CBufferDSounda0" doxytag="NLSOUND::CBufferDSound::CBufferDSound" ></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::CBufferDSound::CBufferDSound </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></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="a05520.html#l00131">131</a> of file <a class="el" href="a05520.html">buffer_dsound.cpp</a>.
<p>
References <a class="el" href="a05521.html#l00118">_Format</a>, <a class="el" href="a05521.html#l00120">_Freq</a>, <a class="el" href="a05520.html#l00044">NLSOUND::EmptyString</a>, and <a class="el" href="a05381.html#a80a19">NLSOUND::Mono16</a>.
<p>
<div class="fragment"><pre>00132 {
00133 <a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr3">_Name</a> = CSoundDriverDSound::instance()->getStringMapper()->map(EmptyString);
00134 <a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr0">_Data</a> = NULL;
00135 <a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr4">_Size</a> = 0;
00136 <a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr1">_Format</a> = <a class="code" href="a05381.html#a80a19">Mono16</a>;
00137 <a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr2">_Freq</a> = 0;
00138 }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBufferDSounda18" doxytag="NLSOUND::CBufferDSound::~CBufferDSound" ></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::CBufferDSound::~<a class="el" href="a02299.html">CBufferDSound</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> [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="a05520.html#l00140">140</a> of file <a class="el" href="a05520.html">buffer_dsound.cpp</a>.
<p>
<div class="fragment"><pre>00141 {
00142 <span class="comment">// nldebug("Destroying DirectSound buffer %s (%p)", CSoundDriverDSound::instance()->getStringMapper()->unmap(_Name).c_str(), this);</span>
00143
00144 <span class="keywordflow">if</span> (<a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr0">_Data</a> != NULL)
00145 {
00146 <span class="keyword">delete</span>[] <a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr0">_Data</a>;
00147 }
00148 }
</pre></div> </td>
</tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="NLSOUND_1_1IBufferz1304_2" doxytag="NLSOUND::CBufferDSound::decodeADPCM" ></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"> void NLSOUND::IBuffer::decodeADPCM </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="a04558.html#a7">uint8</a> * </td>
<td class="mdname" nowrap> <em>indata</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap><a class="el" href="a04558.html#a8">sint16</a> * </td>
<td class="mdname" nowrap> <em>outdata</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>nbSample</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap><a class="el" href="a03845.html">TADPCMState</a> & </td>
<td class="mdname" nowrap> <em>state</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [static, inherited]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Unoptimized utility function designed to build ADPCM encoded sample bank file. Return the number of sample in the buffer.
<p>
Definition at line <a class="el" href="a05516.html#l00164">164</a> of file <a class="el" href="a05516.html">buffer.cpp</a>.
<p>
References <a class="el" href="a05516.html#l00031">NLSOUND::IBuffer::_IndexTable</a>, <a class="el" href="a05516.html#l00037">NLSOUND::IBuffer::_StepsizeTable</a>, <a class="el" href="a05646.html#l00225">index</a>, <a class="el" href="a05517.html#l00092">NLSOUND::IBuffer::TADPCMState::PreviousSample</a>, <a class="el" href="a05981.html#l00097">sint16</a>, <a class="el" href="a05517.html#l00094">NLSOUND::IBuffer::TADPCMState::StepIndex</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05981.html#l00096">uint8</a>.
<p>
<div class="fragment"><pre>00165 {
00166 <a class="code" href="a04558.html#a7">uint8</a> *inp; <span class="comment">/* Input buffer pointer */</span>
00167 <a class="code" href="a04558.html#a8">sint16</a> *outp; <span class="comment">/* output buffer pointer */</span>
00168 <span class="keywordtype">int</span> sign; <span class="comment">/* Current adpcm sign bit */</span>
00169 <span class="keywordtype">int</span> delta; <span class="comment">/* Current adpcm output value */</span>
00170 <span class="keywordtype">int</span> step; <span class="comment">/* Stepsize */</span>
00171 <span class="keywordtype">int</span> valpred; <span class="comment">/* Predicted value */</span>
00172 <span class="keywordtype">int</span> vpdiff; <span class="comment">/* Current change to valpred */</span>
00173 <span class="keywordtype">int</span> <a class="code" href="a04223.html#a566">index</a>; <span class="comment">/* Current step change index */</span>
00174 <span class="keywordtype">int</span> inputbuffer; <span class="comment">/* place to keep next 4-bit value */</span>
00175 <span class="keywordtype">int</span> bufferstep; <span class="comment">/* toggle between inputbuffer/input */</span>
00176
00177 outp = outdata;
00178 inp = indata;
00179
00180 valpred = state.PreviousSample;
00181 <a class="code" href="a04223.html#a566">index</a> = state.StepIndex;
00182 step = _StepsizeTable[<a class="code" href="a04223.html#a566">index</a>];
00183
00184 bufferstep = 0;
00185
00186 <span class="keywordflow">for</span> ( ; nbSample > 0 ; nbSample-- )
00187 {
00188
00189 <span class="comment">/* Step 1 - get the delta value */</span>
00190 <span class="keywordflow">if</span> ( bufferstep )
00191 {
00192 delta = inputbuffer & 0xf;
00193 }
00194 <span class="keywordflow">else</span>
00195 {
00196 inputbuffer = *inp++;
00197 delta = (inputbuffer >> 4) & 0xf;
00198 }
00199 bufferstep = !bufferstep;
00200
00201 <span class="comment">/* Step 2 - Find new index value (for later) */</span>
00202 <a class="code" href="a04223.html#a566">index</a> += _IndexTable[delta];
00203 <span class="keywordflow">if</span> ( <a class="code" href="a04223.html#a566">index</a> < 0 )
00204 <a class="code" href="a04223.html#a566">index</a> = 0;
00205 <span class="keywordflow">if</span> ( <a class="code" href="a04223.html#a566">index</a> > 88 )
00206 <a class="code" href="a04223.html#a566">index</a> = 88;
00207
00208 <span class="comment">/* Step 3 - Separate sign and magnitude */</span>
00209 sign = delta & 8;
00210 delta = delta & 7;
00211
00212 <span class="comment">/* Step 4 - Compute difference and new predicted value */</span>
00213 <span class="comment">/*</span>
00214 <span class="comment"> ** Computes 'vpdiff = (delta+0.5)*step/4', but see comment</span>
00215 <span class="comment"> ** in adpcm_coder.</span>
00216 <span class="comment"> */</span>
00217 vpdiff = step >> 3;
00218 <span class="keywordflow">if</span> ( delta & 4 )
00219 vpdiff += step;
00220 <span class="keywordflow">if</span> ( delta & 2 )
00221 vpdiff += step>>1;
00222 <span class="keywordflow">if</span> ( delta & 1 )
00223 vpdiff += step>>2;
00224
00225 <span class="keywordflow">if</span> ( sign )
00226 valpred -= vpdiff;
00227 <span class="keywordflow">else</span>
00228 valpred += vpdiff;
00229
00230 <span class="comment">/* Step 5 - clamp output value */</span>
00231 <span class="keywordflow">if</span> ( valpred > 32767 )
00232 valpred = 32767;
00233 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( valpred < -32768 )
00234 valpred = -32768;
00235
00236 <span class="comment">/* Step 6 - Update step value */</span>
00237 step = _StepsizeTable[<a class="code" href="a04223.html#a566">index</a>];
00238
00239 <span class="comment">/* Step 7 - Output value */</span>
00240 *outp++ = valpred;
00241 }
00242
00243 state.PreviousSample = valpred;
00244 state.StepIndex = <a class="code" href="a04223.html#a566">index</a>;
00245 }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1IBufferz1304_3" doxytag="NLSOUND::CBufferDSound::encodeADPCM" ></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"> void NLSOUND::IBuffer::encodeADPCM </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="a04558.html#a8">sint16</a> * </td>
<td class="mdname" nowrap> <em>indata</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>outdata</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>nbSample</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap><a class="el" href="a03845.html">TADPCMState</a> & </td>
<td class="mdname" nowrap> <em>state</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [static, inherited]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Unoptimized utility function designed to build ADPCM encoded sample bank file. Return the number of sample in the buffer.
<p>
Definition at line <a class="el" href="a05516.html#l00051">51</a> of file <a class="el" href="a05516.html">buffer.cpp</a>.
<p>
References <a class="el" href="a05516.html#l00031">NLSOUND::IBuffer::_IndexTable</a>, <a class="el" href="a05516.html#l00037">NLSOUND::IBuffer::_StepsizeTable</a>, <a class="el" href="a05646.html#l00225">index</a>, <a class="el" href="a05517.html#l00092">NLSOUND::IBuffer::TADPCMState::PreviousSample</a>, <a class="el" href="a05981.html#l00097">sint16</a>, <a class="el" href="a05517.html#l00094">NLSOUND::IBuffer::TADPCMState::StepIndex</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05981.html#l00096">uint8</a>.
<p>
Referenced by <a class="el" href="a05520.html#l00451">getBufferADPCMEncoded()</a>.
<p>
<div class="fragment"><pre>00052 {
00053 <a class="code" href="a04558.html#a8">sint16</a> *inp; <span class="comment">/* Input buffer pointer */</span>
00054 <a class="code" href="a04558.html#a7">uint8</a> *outp; <span class="comment">/* output buffer pointer */</span>
00055 <span class="keywordtype">int</span> val; <span class="comment">/* Current input sample value */</span>
00056 <span class="keywordtype">int</span> sign; <span class="comment">/* Current adpcm sign bit */</span>
00057 <span class="keywordtype">int</span> delta; <span class="comment">/* Current adpcm output value */</span>
00058 <span class="keywordtype">int</span> diff; <span class="comment">/* Difference between val and valprev */</span>
00059 <span class="keywordtype">int</span> step; <span class="comment">/* Stepsize */</span>
00060 <span class="keywordtype">int</span> valpred; <span class="comment">/* Predicted output value */</span>
00061 <span class="keywordtype">int</span> vpdiff; <span class="comment">/* Current change to valpred */</span>
00062 <span class="keywordtype">int</span> <a class="code" href="a04223.html#a566">index</a>; <span class="comment">/* Current step change index */</span>
00063 <span class="keywordtype">int</span> outputbuffer; <span class="comment">/* place to keep previous 4-bit value */</span>
00064 <span class="keywordtype">int</span> bufferstep; <span class="comment">/* toggle between outputbuffer/output */</span>
00065
00066 outp = outdata;
00067 inp = indata;
00068
00069 valpred = state.PreviousSample;
00070 <a class="code" href="a04223.html#a566">index</a> = state.StepIndex;
00071 step = _StepsizeTable[<a class="code" href="a04223.html#a566">index</a>];
00072
00073 bufferstep = 1;
00074
00075 <span class="keywordflow">for</span> ( ; nbSample > 0 ; nbSample-- )
00076 {
00077 val = *inp++;
00078
00079 <span class="comment">/* Step 1 - compute difference with previous value */</span>
00080 diff = val - valpred;
00081 sign = (diff < 0) ? 8 : 0;
00082 <span class="keywordflow">if</span> ( sign ) diff = (-diff);
00083
00084 <span class="comment">/* Step 2 - Divide and clamp */</span>
00085 <span class="comment">/* Note:</span>
00086 <span class="comment"> ** This code *approximately* computes:</span>
00087 <span class="comment"> ** delta = diff*4/step;</span>
00088 <span class="comment"> ** vpdiff = (delta+0.5)*step/4;</span>
00089 <span class="comment"> ** but in shift step bits are dropped. The net result of this is</span>
00090 <span class="comment"> ** that even if you have fast mul/div hardware you cannot put it to</span>
00091 <span class="comment"> ** good use since the fixup would be too expensive.</span>
00092 <span class="comment"> */</span>
00093 delta = 0;
00094 vpdiff = (step >> 3);
00095
00096 <span class="keywordflow">if</span> ( diff >= step )
00097 {
00098 delta = 4;
00099 diff -= step;
00100 vpdiff += step;
00101 }
00102 step >>= 1;
00103 <span class="keywordflow">if</span> ( diff >= step )
00104 {
00105 delta |= 2;
00106 diff -= step;
00107 vpdiff += step;
00108 }
00109 step >>= 1;
00110 <span class="keywordflow">if</span> ( diff >= step )
00111 {
00112 delta |= 1;
00113 vpdiff += step;
00114 }
00115
00116 <span class="comment">/* Step 3 - Update previous value */</span>
00117 <span class="keywordflow">if</span> ( sign )
00118 valpred -= vpdiff;
00119 <span class="keywordflow">else</span>
00120 valpred += vpdiff;
00121
00122 <span class="comment">/* Step 4 - Clamp previous value to 16 bits */</span>
00123 <span class="keywordflow">if</span> ( valpred > 32767 )
00124 {
00125 printf(<span class="stringliteral">"over+ %d\n"</span>,valpred);
00126 valpred = 32767;
00127 }
00128 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( valpred < -32768 )
00129 {
00130 printf(<span class="stringliteral">"over- %d\n"</span>,valpred);
00131 valpred = -32768;
00132 }
00133
00134 <span class="comment">/* Step 5 - Assemble value, update index and step values */</span>
00135 delta |= sign;
00136
00137 <a class="code" href="a04223.html#a566">index</a> += _IndexTable[delta];
00138 <span class="keywordflow">if</span> ( <a class="code" href="a04223.html#a566">index</a> < 0 )
00139 <a class="code" href="a04223.html#a566">index</a> = 0;
00140 <span class="keywordflow">if</span> ( <a class="code" href="a04223.html#a566">index</a> > 88 )
00141 <a class="code" href="a04223.html#a566">index</a> = 88;
00142 step = _StepsizeTable[<a class="code" href="a04223.html#a566">index</a>];
00143
00144 <span class="comment">/* Step 6 - Output value */</span>
00145 <span class="keywordflow">if</span> ( bufferstep )
00146 {
00147 outputbuffer = (delta << 4) & 0xf0;
00148 }
00149 <span class="keywordflow">else</span>
00150 {
00151 *outp++ = (delta & 0x0f) | outputbuffer;
00152 }
00153 bufferstep = !bufferstep;
00154 }
00155
00156 <span class="comment">/* Output last step, if needed */</span>
00157 <span class="keywordflow">if</span> ( !bufferstep )
00158 *outp++ = outputbuffer;
00159
00160 state.PreviousSample = valpred;
00161 state.StepIndex = <a class="code" href="a04223.html#a566">index</a>;
00162 }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBufferDSounda1" doxytag="NLSOUND::CBufferDSound::fillBuffer" ></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"> bool NLSOUND::CBufferDSound::fillBuffer </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">void * </td>
<td class="mdname" nowrap> <em>src</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>bufsize</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Set the buffer size and fill the buffer. Return true if ok. Call <a class="el" href="a02299.html#NLSOUND_1_1CBufferDSounda16">setFormat()</a> first.
<p>
<p>
Implements <a class="el" href="a02298.html#NLSOUND_1_1IBuffera0">NLSOUND::IBuffer</a>.
<p>
Definition at line <a class="el" href="a05520.html#l00163">163</a> of file <a class="el" href="a05520.html">buffer_dsound.cpp</a>.
<p>
References <a class="el" href="a05646.html#l01124">src</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
<p>
<div class="fragment"><pre>00164 {
00165 <span class="keywordflow">return</span> <span class="keyword">false</span>;
00166 }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1IBuffera1" doxytag="NLSOUND::CBufferDSound::fillMore" ></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::IBuffer::fillMore </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">void * </td>
<td class="mdname" nowrap> <em>src</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>srcsize</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [inline, virtual, inherited]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Fill the buffer partially (if <a class="el" href="a02298.html#NLSOUND_1_1IBuffera7">isFillMoreSupported()</a> only), beginning at the pos changed by a previous call to <a class="el" href="a02298.html#NLSOUND_1_1IBuffera1">fillMore()</a>. If the pos+srcsize exceeds the buffer size, the exceeding data is put at the beginning of the buffer. srcsize must be smaller than the buffer size.
<p>
Reimplemented in <a class="el" href="a02297.html#NLSOUND_1_1CBufferALa3">NLSOUND::CBufferAL</a>.
<p>
Definition at line <a class="el" href="a05517.html#l00079">79</a> of file <a class="el" href="a05517.html">buffer.h</a>.
<p>
References <a class="el" href="a05981.html#l00100">uint32</a>.
<p>
Referenced by <a class="el" href="a05927.html#l00048">NLSOUND::ILoader::fillBufferPart()</a>.
<p>
<div class="fragment"><pre>00079 { <span class="keywordflow">throw</span> ESoundDriverNotSupp(); }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBufferDSounda3" doxytag="NLSOUND::CBufferDSound::getBufferADPCMEncoded" ></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="a04558.html#a11">uint32</a> NLSOUND::CBufferDSound::getBufferADPCMEncoded </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">std::vector< <a class="el" href="a04558.html#a7">uint8</a> > & </td>
<td class="mdname1" valign="top" nowrap> <em>result</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Unoptimized utility function designed to build ADPCM encoded sample bank file. Return the number of sample in the buffer.
<p>
Implements <a class="el" href="a02298.html#NLSOUND_1_1IBufferz1304_0">NLSOUND::IBuffer</a>.
<p>
Definition at line <a class="el" href="a05520.html#l00451">451</a> of file <a class="el" href="a05520.html">buffer_dsound.cpp</a>.
<p>
References <a class="el" href="a05521.html#l00118">_Format</a>, <a class="el" href="a05516.html#l00051">NLSOUND::IBuffer::encodeADPCM()</a>, <a class="el" href="a05381.html#a80a19">NLSOUND::Mono16</a>, <a class="el" href="a05981.html#l00097">sint16</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
<p>
<div class="fragment"><pre>00452 {
00453 result.clear();
00454
00455 <span class="keywordflow">if</span> (<a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr0">_Data</a> == 0)
00456 <span class="keywordflow">return</span> 0;
00457
00458 <span class="keywordflow">if</span> (<a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr1">_Format</a> != <a class="code" href="a05381.html#a80a19">Mono16</a>)
00459 <span class="keywordflow">return</span> 0;
00460
00461 <a class="code" href="a04558.html#a11">uint32</a> nbSample = <a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr4">_Size</a>/2;
00462 nbSample &= 0xfffffffe;
00463
00464 result.resize(nbSample / 2);
00465
00466 TADPCMState state;
00467 state.PreviousSample = 0;
00468 state.StepIndex = 0;
00469 <a class="code" href="a02298.html#NLSOUND_1_1IBufferz1304_3">encodeADPCM</a>((<a class="code" href="a04558.html#a8">sint16</a>*)_Data, &result[0], nbSample, state);
00470
00471 <span class="keywordflow">return</span> nbSample;
00472 }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBufferDSounda4" doxytag="NLSOUND::CBufferDSound::getBufferMono16" ></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="a04558.html#a11">uint32</a> NLSOUND::CBufferDSound::getBufferMono16 </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">std::vector< <a class="el" href="a04558.html#a8">sint16</a> > & </td>
<td class="mdname1" valign="top" nowrap> <em>result</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Unoptimized utility function designed to build Mono 16 bits encoded sample bank file. Return the number of sample in the buffer.
<p>
Implements <a class="el" href="a02298.html#NLSOUND_1_1IBufferz1304_1">NLSOUND::IBuffer</a>.
<p>
Definition at line <a class="el" href="a05520.html#l00474">474</a> of file <a class="el" href="a05520.html">buffer_dsound.cpp</a>.
<p>
References <a class="el" href="a05521.html#l00118">_Format</a>, <a class="el" href="a05381.html#a80a19">NLSOUND::Mono16</a>, <a class="el" href="a05981.html#l00097">sint16</a>, <a class="el" href="a05381.html#a80a21">NLSOUND::Stereo16</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
<p>
<div class="fragment"><pre>00475 {
00476 result.clear();
00477
00478 <span class="keywordflow">if</span> (<a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr0">_Data</a> == 0)
00479 <span class="keywordflow">return</span> 0;
00480
00481 <span class="keywordflow">if</span> (<a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr1">_Format</a> == <a class="code" href="a05381.html#a80a19">Mono16</a>)
00482 {
00483 <a class="code" href="a04558.html#a15">uint</a> nbSample = <a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr4">_Size</a>/2;
00484 nbSample &= 0xfffffffe;
00485
00486 result.reserve(nbSample);
00487 result.insert(result.begin(), (<a class="code" href="a04558.html#a8">sint16</a>*)<a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr0">_Data</a>, ((<a class="code" href="a04558.html#a8">sint16</a>*)<a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr0">_Data</a>)+nbSample);
00488
00489 <span class="keywordflow">return</span> nbSample;
00490 }
00491 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr1">_Format</a> == <a class="code" href="a05381.html#a80a21">Stereo16</a>)
00492 {
00493 <a class="code" href="a04558.html#a15">uint</a> nbSample = <a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr4">_Size</a>/4;
00494 nbSample &= 0xfffffffe;
00495
00496 <span class="keyword">struct </span>TFrame
00497 {
00498 <a class="code" href="a04558.html#a8">sint16</a> Channel1;
00499 <a class="code" href="a04558.html#a8">sint16</a> Channel2;
00500 };
00501 result.reserve(nbSample);
00502 <a class="code" href="a06800.html">TFrame</a> *frame = (<a class="code" href="a06800.html">TFrame</a> *)<a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr0">_Data</a>;
00503 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> i=0; i<nbSample; ++i)
00504 {
00505 result[i] = (frame->Channel1>>1) +(frame->Channel2>>1);
00506 }
00507
00508 <span class="keywordflow">return</span> nbSample;
00509 }
00510 <span class="keywordflow">else</span>
00511 <span class="keywordflow">return</span> 0;
00512 }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBufferDSounda5" doxytag="NLSOUND::CBufferDSound::getData" ></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#a7">uint8</a>* NLSOUND::CBufferDSound::getData </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap> const<code> [inline, virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Return a pointer to the sample data.
<p>
<p>
Definition at line <a class="el" href="a05521.html#l00103">103</a> of file <a class="el" href="a05521.html">buffer_dsound.h</a>.
<p>
References <a class="el" href="a05981.html#l00096">uint8</a>.
<p>
<div class="fragment"><pre>00103 { <span class="keywordflow">return</span> <a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr0">_Data</a>; }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBufferDSounda6" doxytag="NLSOUND::CBufferDSound::getDuration" ></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"> float NLSOUND::CBufferDSound::getDuration </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap> const<code> [virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Return the duration (in ms) of the sample in the buffer.
<p>
<p>
Implements <a class="el" href="a02298.html#NLSOUND_1_1IBuffera2">NLSOUND::IBuffer</a>.
<p>
Definition at line <a class="el" href="a05520.html#l00169">169</a> of file <a class="el" href="a05520.html">buffer_dsound.cpp</a>.
<p>
References <a class="el" href="a05521.html#l00118">_Format</a>, <a class="el" href="a05521.html#l00120">_Freq</a>, <a class="el" href="a05381.html#a80a19">NLSOUND::Mono16</a>, <a class="el" href="a05381.html#a80a18">NLSOUND::Mono16ADPCM</a>, <a class="el" href="a05381.html#a80a17">NLSOUND::Mono8</a>, <a class="el" href="a05381.html#a80a21">NLSOUND::Stereo16</a>, and <a class="el" href="a05381.html#a80a20">NLSOUND::Stereo8</a>.
<p>
<div class="fragment"><pre>00170 {
00171 <span class="keywordtype">float</span> frames = (<span class="keywordtype">float</span>) <a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr4">_Size</a>;
00172
00173 <span class="keywordflow">switch</span> (<a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr1">_Format</a>)
00174 {
00175 <span class="keywordflow">case</span> <a class="code" href="a05381.html#a80a17">Mono8</a>:
00176 <span class="keywordflow">break</span>;
00177 <span class="keywordflow">case</span> <a class="code" href="a05381.html#a80a18">Mono16ADPCM</a>:
00178 frames *= 2.0f;
00179 <span class="keywordflow">break</span>;
00180 <span class="keywordflow">case</span> <a class="code" href="a05381.html#a80a19">Mono16</a>:
00181 frames /= 2.0f;
00182 <span class="keywordflow">break</span>;
00183 <span class="keywordflow">case</span> <a class="code" href="a05381.html#a80a20">Stereo8</a>:
00184 frames /= 2.0f;
00185 <span class="keywordflow">break</span>;
00186 <span class="keywordflow">case</span> <a class="code" href="a05381.html#a80a21">Stereo16</a>:
00187 frames /= 4.0f;
00188 <span class="keywordflow">break</span>;
00189 }
00190
00191 <span class="keywordflow">return</span> 1000.0f * frames / (<span class="keywordtype">float</span>) <a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr2">_Freq</a>;
00192 }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBufferDSounda7" doxytag="NLSOUND::CBufferDSound::getFormat" ></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::CBufferDSound::getFormat </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><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#a15">uint</a> & </td>
<td class="mdname" nowrap> <em>freq</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"> const<code> [inline, virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Return the format and frequency.
<p>
<p>
Implements <a class="el" href="a02298.html#NLSOUND_1_1IBuffera3">NLSOUND::IBuffer</a>.
<p>
Definition at line <a class="el" href="a05521.html#l00072">72</a> of file <a class="el" href="a05521.html">buffer_dsound.h</a>.
<p>
References <a class="el" href="a05521.html#l00118">_Format</a>, <a class="el" href="a05521.html#l00120">_Freq</a>, <a class="el" href="a05646.html#l01016">format</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
<div class="fragment"><pre>00072 { <a class="code" href="a04223.html#a641">format</a> = <a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr1">_Format</a>; freq = <a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr2">_Freq</a>; }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBufferDSounda8" doxytag="NLSOUND::CBufferDSound::getName" ></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 const <a class="el" href="a05378.html#a236">NLMISC::TStringId</a>& NLSOUND::CBufferDSound::getName </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">void </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>
Return the name of the buffer.
<p>
<p>
Implements <a class="el" href="a02298.html#NLSOUND_1_1IBuffera4">NLSOUND::IBuffer</a>.
<p>
Definition at line <a class="el" href="a05521.html#l00106">106</a> of file <a class="el" href="a05521.html">buffer_dsound.h</a>.
<p>
<div class="fragment"><pre>00106 { <span class="keywordflow">return</span> <a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr3">_Name</a>; }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBufferDSounda9" doxytag="NLSOUND::CBufferDSound::getSize" ></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#a11">uint32</a> NLSOUND::CBufferDSound::getSize </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">void </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap> const<code> [inline, virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Return the size of the buffer, in bytes.
<p>
<p>
Implements <a class="el" href="a02298.html#NLSOUND_1_1IBuffera5">NLSOUND::IBuffer</a>.
<p>
Definition at line <a class="el" href="a05521.html#l00063">63</a> of file <a class="el" href="a05521.html">buffer_dsound.h</a>.
<p>
References <a class="el" href="a05981.html#l00100">uint32</a>.
<p>
<div class="fragment"><pre>00063 { <span class="keywordflow">return</span> <a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr4">_Size</a>; }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBufferDSounda10" doxytag="NLSOUND::CBufferDSound::isBufferLoaded" ></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::CBufferDSound::isBufferLoaded </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>
Return true if the buffer is loaded. Used for async load/unload.
<p>
<p>
Implements <a class="el" href="a02298.html#NLSOUND_1_1IBuffera6">NLSOUND::IBuffer</a>.
<p>
Definition at line <a class="el" href="a05521.html#l00108">108</a> of file <a class="el" href="a05521.html">buffer_dsound.h</a>.
<p>
<div class="fragment"><pre>00108 { <span class="keywordflow">return</span> <a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr0">_Data</a> != 0; }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBufferDSounda11" doxytag="NLSOUND::CBufferDSound::isFillMoreSupported" ></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::CBufferDSound::isFillMoreSupported </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap> const<code> [inline, virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Return true if the buffer is able to be fill part by part, false if it must be filled in one call (OpenAL 1.0 -> false)
<p>
Implements <a class="el" href="a02298.html#NLSOUND_1_1IBuffera7">NLSOUND::IBuffer</a>.
<p>
Definition at line <a class="el" href="a05521.html#l00078">78</a> of file <a class="el" href="a05521.html">buffer_dsound.h</a>.
<p>
<div class="fragment"><pre>00078 { <span class="keywordflow">return</span> <span class="keyword">false</span>; }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBufferDSounda12" doxytag="NLSOUND::CBufferDSound::isStereo" ></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::CBufferDSound::isStereo </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap> const<code> [inline, virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Return true if the buffer is stereo, false if mono.
<p>
<p>
Implements <a class="el" href="a02298.html#NLSOUND_1_1IBuffera8">NLSOUND::IBuffer</a>.
<p>
Definition at line <a class="el" href="a05521.html#l00069">69</a> of file <a class="el" href="a05521.html">buffer_dsound.h</a>.
<p>
References <a class="el" href="a05521.html#l00118">_Format</a>, <a class="el" href="a05381.html#a80a21">NLSOUND::Stereo16</a>, and <a class="el" href="a05381.html#a80a20">NLSOUND::Stereo8</a>.
<p>
<div class="fragment"><pre>00069 { <span class="keywordflow">return</span> (<a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr1">_Format</a> == <a class="code" href="a05381.html#a80a20">Stereo8</a>) || (<a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr1">_Format</a> == <a class="code" href="a05381.html#a80a21">Stereo16</a>); }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBufferDSounda13" doxytag="NLSOUND::CBufferDSound::presetName" ></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"> void NLSOUND::CBufferDSound::presetName </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const <a class="el" href="a05378.html#a236">NLMISC::TStringId</a> & </td>
<td class="mdname1" valign="top" nowrap> <em>bufferName</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Preset the name of the buffer. Used for async loading to give a name before the buffer is effectivly loaded. If the name after loading of the buffer doesn't match the preset name, the load will assert.
<p>
Implements <a class="el" href="a02298.html#NLSOUND_1_1IBuffera9">NLSOUND::IBuffer</a>.
<p>
Definition at line <a class="el" href="a05520.html#l00150">150</a> of file <a class="el" href="a05520.html">buffer_dsound.cpp</a>.
<p>
<div class="fragment"><pre>00151 {
00152 <a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr3">_Name</a> = bufferName;
00153 }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBufferDSounda14" doxytag="NLSOUND::CBufferDSound::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"> bool NLSOUND::CBufferDSound::readRawBuffer </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">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> [virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="a05520.html#l00416">416</a> of file <a class="el" href="a05520.html">buffer_dsound.cpp</a>.
<p>
References <a class="el" href="a05521.html#l00118">_Format</a>, <a class="el" href="a05521.html#l00120">_Freq</a>, <a class="el" href="a05646.html#l01016">format</a>, <a class="el" href="a05622.html#l00333">nlassertex</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00100">uint32</a>, and <a class="el" href="a05981.html#l00096">uint8</a>.
<p>
<div class="fragment"><pre>00417 {
00418 NL_ALLOC_CONTEXT(NLSOUND_CBufferDSound);
00419 <span class="comment">// free any existing data</span>
00420 <span class="keywordflow">if</span> (<a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr0">_Data</a> != NULL)
00421 {
00422 free(_Data);
00423 <a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr0">_Data</a> = NULL;
00424 }
00425
00426 <a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr1">_Format</a> = <a class="code" href="a04223.html#a641">format</a>;
00427 <a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr4">_Size</a> = dataSize;
00428 <span class="comment">// Allocate the sample buffer</span>
00429 <a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr0">_Data</a> = <span class="keyword">new</span> <a class="code" href="a04558.html#a7">uint8</a> [<a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr4">_Size</a>];
00430
00431 <span class="comment">// read in the format data</span>
00432 memcpy(_Data, rawData, dataSize);
00433
00434 <a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr2">_Freq</a> = frequency;
00435
00436
00437 <span class="comment">// Allocate the sample buffer</span>
00438
00439 <span class="keyword">static</span> NLMISC::TStringId empty(CSoundDriverDSound::instance()->getStringMapper()->map(<span class="stringliteral">""</span>));
00440 NLMISC::TStringId nameId = CSoundDriverDSound::instance()->getStringMapper()->map(CFile::getFilenameWithoutExtension(name));
00441 <span class="comment">// if name is preseted, the name must match.</span>
00442 <span class="keywordflow">if</span> (<a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr3">_Name</a> != empty)
00443 {
00444 <a class="code" href="a04199.html#a8">nlassertex</a>(nameId == _Name, (<span class="stringliteral">"The preseted name and buffer name doen't match !"</span>));
00445 }
00446 <a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr3">_Name</a> = nameId;
00447
00448 <span class="keywordflow">return</span> <span class="keyword">true</span>;
00449 }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBufferDSounda15" doxytag="NLSOUND::CBufferDSound::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"> bool NLSOUND::CBufferDSound::readWavBuffer </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">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> [virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Load a sound file in the buffer. Throws an exception is an error occurs.
<p>
Fill the buffer partially (if <a class="el" href="a02299.html#NLSOUND_1_1CBufferDSounda11">isFillMoreSupported()</a> only), beginning at the pos changed by a previous call to <a class="el" href="a02298.html#NLSOUND_1_1IBuffera1">fillMore()</a>. If the pos+srcsize exceeds the buffer size, the exceeding data is put at the beginning of the buffer. srcsize must be smaller than the buffer size.
<p>
Definition at line <a class="el" href="a05520.html#l00196">196</a> of file <a class="el" href="a05520.html">buffer_dsound.cpp</a>.
<p>
References <a class="el" href="a05521.html#l00118">_Format</a>, <a class="el" href="a05521.html#l00120">_Freq</a>, <a class="el" href="a05646.html#l00649">buffer</a>, <a class="el" href="a05646.html#l01016">format</a>, <a class="el" href="a05381.html#a80a19">NLSOUND::Mono16</a>, <a class="el" href="a05381.html#a80a17">NLSOUND::Mono8</a>, <a class="el" href="a05622.html#l00333">nlassertex</a>, <a class="el" href="a05646.html#l01124">num</a>, <a class="el" href="a05981.html#l00104">sint</a>, <a class="el" href="a05981.html#l00099">sint32</a>, <a class="el" href="a05646.html#l00645">size</a>, <a class="el" href="a05381.html#a80a21">NLSOUND::Stereo16</a>, <a class="el" href="a05381.html#a80a20">NLSOUND::Stereo8</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00100">uint32</a>, and <a class="el" href="a05981.html#l00096">uint8</a>.
<p>
<div class="fragment"><pre>00197 {
00198 NL_ALLOC_CONTEXT(NLSOUND_CBufferDSound);
00199 <a class="code" href="a04558.html#a14">sint</a> error;
00200 <a class="code" href="a04558.html#a10">sint32</a> <a class="code" href="a04223.html#a653">num</a>;
00201 HMMIO hmmio;
00202 WAVEFORMATEX <a class="code" href="a04223.html#a641">format</a>;
00203 MMCKINFO riff_chunk;
00204 MMCKINFO data_chunk;
00205 MMCKINFO chunk;
00206
00207
00208 <span class="keywordflow">if</span> (<a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr0">_Data</a> != NULL)
00209 {
00210 <span class="keyword">delete</span> [] <a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr0">_Data</a>;
00211 <a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr0">_Data</a> = NULL;
00212 }
00213
00214 <span class="comment">/* NLMISC::CIFile ifile(file);</span>
00215 <span class="comment"> uint size = ifile.getFileSize();</span>
00216 <span class="comment"> uint8 *buffer = new uint8[ifile.getFileSize()];</span>
00217 <span class="comment"> ifile.serialBuffer(buffer, size);</span>
00218 <span class="comment">*/</span>
00219 <a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a587">size</a> = dataSize;
00220 <a class="code" href="a04558.html#a7">uint8</a> *<a class="code" href="a04223.html#a589">buffer</a> = wavData;
00221
00222 MMIOINFO mmioInfo;
00223 memset(&mmioInfo, 0, <span class="keyword">sizeof</span>(mmioInfo));
00224 mmioInfo.pchBuffer = (<span class="keywordtype">char</span>*)<a class="code" href="a04223.html#a589">buffer</a>;
00225 mmioInfo.fccIOProc = FOURCC_MEM;
00226 mmioInfo.cchBuffer = <a class="code" href="a04223.html#a587">size</a>;
00227
00228
00229 hmmio = mmioOpen(NULL, &mmioInfo, MMIO_READ | MMIO_DENYWRITE);
00230
00231 <span class="keywordflow">if</span> (hmmio == NULL)
00232 {
00233 <span class="keyword">delete</span> [] <a class="code" href="a04223.html#a589">buffer</a>;
00234 <span class="keywordflow">throw</span> ESoundDriver(<span class="stringliteral">"Failed to open the file"</span>);
00235 }
00236
00237
00238 <span class="comment">// Check it's a WAVE file </span>
00239 riff_chunk.ckid = FOURCC_RIFF;
00240
00241 error = (<a class="code" href="a04558.html#a14">sint</a>) mmioDescend(hmmio, &riff_chunk, NULL, 0);
00242
00243 <span class="keywordflow">if</span> ((error != 0) || (riff_chunk.ckid != FOURCC_RIFF) || (riff_chunk.fccType != mmioFOURCC(<span class="charliteral">'W'</span>, <span class="charliteral">'A'</span>, <span class="charliteral">'V'</span>, <span class="charliteral">'E'</span>)))
00244 {
00245 mmioClose(hmmio, 0);
00246 <span class="keyword">delete</span> <a class="code" href="a04223.html#a589">buffer</a>;
00247 <span class="keywordflow">throw</span> ESoundDriver(<span class="stringliteral">"Not a WAVE file"</span>);
00248 }
00249
00250
00251 <span class="comment">// Search the format chunk </span>
00252 chunk.ckid = mmioFOURCC(<span class="charliteral">'f'</span>, <span class="charliteral">'m'</span>, <span class="charliteral">'t'</span>, <span class="charliteral">' '</span>);
00253
00254 error = (<a class="code" href="a04558.html#a14">sint</a>) mmioDescend(hmmio, &chunk, &riff_chunk, MMIO_FINDCHUNK);
00255
00256 <span class="keywordflow">if</span> (error != 0)
00257 {
00258 mmioClose(hmmio, 0);
00259
00260 <span class="keyword">delete</span> [] <a class="code" href="a04223.html#a589">buffer</a>;
00261 <span class="keywordflow">throw</span> ESoundDriver(<span class="stringliteral">"Couldn't find the format chunk"</span>);
00262 }
00263
00264 <span class="keywordflow">if</span> (chunk.cksize < (<span class="keywordtype">long</span>) <span class="keyword">sizeof</span>(PCMWAVEFORMAT))
00265 {
00266 mmioClose(hmmio, 0);
00267 <span class="keyword">delete</span> [] <a class="code" href="a04223.html#a589">buffer</a>;
00268 <span class="keywordflow">throw</span> ESoundDriver(<span class="stringliteral">"Invalid format chunk size"</span>);
00269 }
00270
00271
00272 <span class="comment">// read in the format data</span>
00273
00274 <a class="code" href="a04223.html#a653">num</a> = mmioRead(hmmio, (HPSTR) &format, (<span class="keywordtype">long</span>) <span class="keyword">sizeof</span>(format));
00275 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a653">num</a> != (<span class="keywordtype">long</span>) <span class="keyword">sizeof</span>(<a class="code" href="a04223.html#a641">format</a>))
00276 {
00277 mmioClose(hmmio, 0);
00278 <span class="keyword">delete</span> [] <a class="code" href="a04223.html#a589">buffer</a>;
00279 <span class="keywordflow">throw</span> ESoundDriver(<span class="stringliteral">"Read failed"</span>);
00280 }
00281
00282 <a class="code" href="a04223.html#a641">format</a>.cbSize = 0;
00283
00284 <span class="comment">// Get out of the format chunk</span>
00285
00286 <span class="keywordflow">if</span> (mmioAscend(hmmio, &chunk, 0) != 0)
00287 {
00288 mmioClose(hmmio, 0);
00289 <span class="keyword">delete</span> [] <a class="code" href="a04223.html#a589">buffer</a>;
00290 <span class="keywordflow">throw</span> ESoundDriver(<span class="stringliteral">"Read failed"</span>);
00291 }
00292
00293
00294 <span class="comment">// copy the format data </span>
00295
00296 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a641">format</a>.wFormatTag != WAVE_FORMAT_PCM)
00297 {
00298 mmioClose(hmmio, 0);
00299 <span class="keyword">delete</span> [] <a class="code" href="a04223.html#a589">buffer</a>;
00300 <span class="keywordflow">throw</span> ESoundDriver(<span class="stringliteral">"Unsupported sample format"</span>);
00301 }
00302
00303 <a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr2">_Freq</a> = <a class="code" href="a04223.html#a641">format</a>.nSamplesPerSec;
00304
00305 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a641">format</a>.nChannels == 1)
00306 {
00307 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a641">format</a>.wBitsPerSample == 8)
00308 {
00309 <a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr1">_Format</a> = <a class="code" href="a05381.html#a80a17">Mono8</a>;
00310 }
00311 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a641">format</a>.wBitsPerSample == 16)
00312 {
00313 <a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr1">_Format</a> = <a class="code" href="a05381.html#a80a19">Mono16</a>;
00314 }
00315 <span class="keywordflow">else</span>
00316 {
00317 mmioClose(hmmio, 0);
00318 <span class="keyword">delete</span> [] <a class="code" href="a04223.html#a589">buffer</a>;
00319 <span class="keywordflow">throw</span> ESoundDriver(<span class="stringliteral">"Unsupported sample size"</span>);
00320 }
00321 }
00322 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a641">format</a>.nChannels == 2)
00323 {
00324 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a641">format</a>.wBitsPerSample == 8)
00325 {
00326 <a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr1">_Format</a> = <a class="code" href="a05381.html#a80a20">Stereo8</a>;
00327 }
00328 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a641">format</a>.wBitsPerSample == 16)
00329 {
00330 <a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr1">_Format</a> = <a class="code" href="a05381.html#a80a21">Stereo16</a>;
00331 }
00332 <span class="keywordflow">else</span>
00333 {
00334 mmioClose(hmmio, 0);
00335 <span class="keyword">delete</span> [] <a class="code" href="a04223.html#a589">buffer</a>;
00336 <span class="keywordflow">throw</span> ESoundDriver(<span class="stringliteral">"Unsupported sample size"</span>);
00337 }
00338 }
00339 <span class="keywordflow">else</span> <span class="comment">// Shouldn't normally happen</span>
00340 {
00341 mmioClose(hmmio, 0);
00342 <span class="keyword">delete</span> [] <a class="code" href="a04223.html#a589">buffer</a>;
00343 <span class="keywordflow">throw</span> ESoundDriver(<span class="stringliteral">"Unsupported number of channels"</span>);
00344 }
00345
00346
00347 <span class="comment">// Set the file position to the beginning of the data chunk */</span>
00348
00349 <a class="code" href="a04558.html#a10">sint32</a> pos = mmioSeek(hmmio, riff_chunk.dwDataOffset + <span class="keyword">sizeof</span>(FOURCC), SEEK_SET);
00350
00351 <span class="keywordflow">if</span> (pos < 0)
00352 {
00353 mmioClose(hmmio, 0);
00354 <span class="keyword">delete</span> [] <a class="code" href="a04223.html#a589">buffer</a>;
00355 <span class="keywordflow">throw</span> ESoundDriver(<span class="stringliteral">"Read to set the read position"</span>);
00356 }
00357
00358 data_chunk.ckid = mmioFOURCC(<span class="charliteral">'d'</span>, <span class="charliteral">'a'</span>, <span class="charliteral">'t'</span>, <span class="charliteral">'a'</span>);
00359
00360 <span class="keywordflow">if</span> (mmioDescend(hmmio, &data_chunk, &riff_chunk, MMIO_FINDCHUNK) != 0)
00361 {
00362 mmioClose(hmmio, 0);
00363 <span class="keyword">delete</span> [] <a class="code" href="a04223.html#a589">buffer</a>;
00364 <span class="keywordflow">throw</span> ESoundDriver(<span class="stringliteral">"Read to set the read position"</span>);
00365 }
00366
00367
00368 <span class="comment">// Allocate the sample buffer</span>
00369 <a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr4">_Size</a> = data_chunk.cksize;
00370
00371 <a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr0">_Data</a> = <span class="keyword">new</span> <a class="code" href="a04558.html#a7">uint8</a>[<a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr4">_Size</a>];
00372
00373 <span class="keywordflow">if</span> (<a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr0">_Data</a> == NULL)
00374 {
00375 mmioClose(hmmio, 0);
00376 <span class="keyword">delete</span> [] <a class="code" href="a04223.html#a589">buffer</a>;
00377 <span class="keywordflow">throw</span> ESoundDriver(<span class="stringliteral">"Out of memory"</span>);
00378 }
00379
00380
00381 <span class="comment">// Read the sample data</span>
00382
00383 <a class="code" href="a04223.html#a653">num</a> = mmioRead(hmmio, (HPSTR) _Data, _Size);
00384
00385 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a653">num</a> < 0)
00386 {
00387 <span class="keyword">delete</span> [] <a class="code" href="a04223.html#a589">buffer</a>;
00388 <span class="keywordflow">throw</span> ESoundDriver(<span class="stringliteral">"Failed to read the samples"</span>);
00389 }
00390 <span class="keywordflow">else</span> <span class="keywordflow">if</span> ((<a class="code" href="a04558.html#a11">uint32</a>) <a class="code" href="a04223.html#a653">num</a> < <a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr4">_Size</a>)
00391 {
00392 <span class="comment">// FIXME: print warning or throw exception ???</span>
00393 <span class="keywordtype">char</span>* p = (<span class="keywordtype">char</span>*) <a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr0">_Data</a>;
00394 ZeroMemory(p + num, _Size - num);
00395 }
00396
00397
00398 mmioClose(hmmio, 0);
00399
00400 <span class="comment">// delete [] buffer;</span>
00401
00402 <span class="keyword">static</span> NLMISC::TStringId empty(CSoundDriverDSound::instance()->getStringMapper()->map(<span class="stringliteral">""</span>));
00403 <span class="comment">// NLMISC::TStringId name = CSoundDriverDSound::instance()->getStringMapper()->map(CFile::getFilenameWithoutExtension(file));</span>
00404 NLMISC::TStringId nameId = CSoundDriverDSound::instance()->getStringMapper()->map(CFile::getFilenameWithoutExtension(name));
00405 <span class="comment">// if name is preseted, the name must match.</span>
00406 <span class="keywordflow">if</span> (<a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr3">_Name</a> != empty)
00407 {
00408 <a class="code" href="a04199.html#a8">nlassertex</a>(nameId == _Name, (<span class="stringliteral">"The preseted name and buffer name doen't match !"</span>));
00409 }
00410 <a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr3">_Name</a> = nameId;
00411
00412 <span class="keywordflow">return</span> <span class="keyword">true</span>;
00413 }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBufferDSounda16" doxytag="NLSOUND::CBufferDSound::setFormat" ></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"> void NLSOUND::CBufferDSound::setFormat </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><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#a15">uint</a> </td>
<td class="mdname" nowrap> <em>freq</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Set the sample format. Example: freq=44100.
<p>
<p>
Implements <a class="el" href="a02298.html#NLSOUND_1_1IBuffera10">NLSOUND::IBuffer</a>.
<p>
Definition at line <a class="el" href="a05520.html#l00156">156</a> of file <a class="el" href="a05520.html">buffer_dsound.cpp</a>.
<p>
References <a class="el" href="a05521.html#l00118">_Format</a>, <a class="el" href="a05521.html#l00120">_Freq</a>, <a class="el" href="a05646.html#l01016">format</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
<div class="fragment"><pre>00157 {
00158 <a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr1">_Format</a> = <a class="code" href="a04223.html#a641">format</a>;
00159 <a class="code" href="a02299.html#NLSOUND_1_1CBufferDSoundr2">_Freq</a> = freq;
00160 }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1IBuffera11" doxytag="NLSOUND::CBufferDSound::setSize" ></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::IBuffer::setSize </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="a04558.html#a11">uint32</a> </td>
<td class="mdname1" valign="top" nowrap> <em>size</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [inline, virtual, inherited]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Force the buffer size without filling data (if <a class="el" href="a02298.html#NLSOUND_1_1IBuffera7">isFillMoreSupported()</a> only).
<p>
<p>
Reimplemented in <a class="el" href="a02297.html#NLSOUND_1_1CBufferALa16">NLSOUND::CBufferAL</a>.
<p>
Definition at line <a class="el" href="a05517.html#l00073">73</a> of file <a class="el" href="a05517.html">buffer.h</a>.
<p>
References <a class="el" href="a05646.html#l00645">size</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
<p>
<div class="fragment"><pre>00073 { <span class="keywordflow">throw</span> ESoundDriverNotSupp(); }
</pre></div> </td>
</tr>
</table>
<hr><h2>Field Documentation</h2>
<a class="anchor" name="NLSOUND_1_1CBufferDSoundr0" doxytag="NLSOUND::CBufferDSound::_Data" ></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="a04558.html#a7">uint8</a>* <a class="el" href="a02299.html#NLSOUND_1_1CBufferDSoundr0">NLSOUND::CBufferDSound::_Data</a><code> [private]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="a05521.html#l00114">114</a> of file <a class="el" href="a05521.html">buffer_dsound.h</a>. </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBufferDSoundr1" doxytag="NLSOUND::CBufferDSound::_Format" ></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="a05381.html#a80">TSampleFormat</a> <a class="el" href="a02299.html#NLSOUND_1_1CBufferDSoundr1">NLSOUND::CBufferDSound::_Format</a><code> [private]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="a05521.html#l00118">118</a> of file <a class="el" href="a05521.html">buffer_dsound.h</a>.
<p>
Referenced by <a class="el" href="a05520.html#l00131">CBufferDSound()</a>, <a class="el" href="a05520.html#l00451">getBufferADPCMEncoded()</a>, <a class="el" href="a05520.html#l00474">getBufferMono16()</a>, <a class="el" href="a05520.html#l00169">getDuration()</a>, <a class="el" href="a05521.html#l00072">getFormat()</a>, <a class="el" href="a05521.html#l00069">isStereo()</a>, <a class="el" href="a05520.html#l00416">readRawBuffer()</a>, <a class="el" href="a05520.html#l00196">readWavBuffer()</a>, and <a class="el" href="a05520.html#l00156">setFormat()</a>. </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBufferDSoundr2" doxytag="NLSOUND::CBufferDSound::_Freq" ></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="a04558.html#a15">uint</a> <a class="el" href="a02299.html#NLSOUND_1_1CBufferDSoundr2">NLSOUND::CBufferDSound::_Freq</a><code> [private]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="a05521.html#l00120">120</a> of file <a class="el" href="a05521.html">buffer_dsound.h</a>.
<p>
Referenced by <a class="el" href="a05520.html#l00131">CBufferDSound()</a>, <a class="el" href="a05520.html#l00169">getDuration()</a>, <a class="el" href="a05521.html#l00072">getFormat()</a>, <a class="el" href="a05520.html#l00416">readRawBuffer()</a>, <a class="el" href="a05520.html#l00196">readWavBuffer()</a>, and <a class="el" href="a05520.html#l00156">setFormat()</a>. </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBufferDSoundr3" doxytag="NLSOUND::CBufferDSound::_Name" ></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="a05378.html#a236">NLMISC::TStringId</a> <a class="el" href="a02299.html#NLSOUND_1_1CBufferDSoundr3">NLSOUND::CBufferDSound::_Name</a><code> [private]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="a05521.html#l00112">112</a> of file <a class="el" href="a05521.html">buffer_dsound.h</a>. </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBufferDSoundr4" doxytag="NLSOUND::CBufferDSound::_Size" ></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="a04558.html#a11">uint32</a> <a class="el" href="a02299.html#NLSOUND_1_1CBufferDSoundr4">NLSOUND::CBufferDSound::_Size</a><code> [private]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="a05521.html#l00116">116</a> of file <a class="el" href="a05521.html">buffer_dsound.h</a>. </td>
</tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="a05521.html">buffer_dsound.h</a><li><a class="el" href="a05520.html">buffer_dsound.cpp</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 14:34:08 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>
|