aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a02248.html
blob: 397f25582d3e934c4b7be9ea1fb0dab51365acee (plain)
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
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
<!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::CBackgroundSoundManager 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&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a>  | <span class="search"><u>S</u>earch&nbsp;for&nbsp;<input class="search" type="text" name="query" value="" size="20" accesskey="s"/></span></form></div>
<h1>NLSOUND::CBackgroundSoundManager Class Reference</h1><code>#include &lt;<a class="el" href="a05472.html">background_sound_manager.h</a>&gt;</code>
<p>
<p>Inheritance diagram for NLSOUND::CBackgroundSoundManager:
<p><center><img src="a02248.png" usemap="#NLSOUND::CBackgroundSoundManager_map" border="0" alt=""></center>
<map name="NLSOUND::CBackgroundSoundManager_map">
<area href="a02239.html" alt="NLSOUND::CAudioMixerUser::IMixerUpdate" shape="rect" coords="0,0,258,24">
</map>
<hr><a name="_details"></a><h2>Detailed Description</h2>
This manager handle the background sound :<ul>
<li>primitive positioned sound (point, path and patatoid supported)</li><li>primitive positioned effect (patatoid only)</li><li>primitive positioned sample bank (patatoid only)</li><li>A set of 32 application definable flag that can be used in background sound to filter the sub sounds of a background sound. Each filter can be assigned at run time a fade in and fade out delay that is used when sound are muted/unmuted according to filter status.</li></ul>
<p>
Sounds can be put in three separate layer (named a, b and c). In each layer, sounds patatoid are concurent and the smaller in surface muffle the other sounds.<p>
Effets are managed according to the EAX capacity of the driver.<p>
Sample bank patatoid are used to dynamicaly load/unload the sample banks will the player walk the univers.<p>
<dl compact><dt><b>Author:</b></dt><dd>Boris Boucher <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="a05472.html#l00079">79</a> of file <a class="el" href="a05472.html">background_sound_manager.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>const <a class="el" href="a03920.html">UAudioMixer::TBackgroundFilterFades</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagera0">getBackgroundFilterFades</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="a03921.html">UAudioMixer::TBackgroundFlags</a> &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagera1">getBackgroundFlags</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the background flags.  <a href="#NLSOUND_1_1CBackgroundSoundManagera1"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>const float *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagera2">getFilterValues</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>const std::vector&lt; <a class="el" href="a03128.html">NLMISC::CVector</a> &gt; &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagera3">getZone</a> (<a class="el" href="a04558.html#a11">uint32</a> zone, bool *isPath=0)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return a patatoid. If isPath is not null, set it.  <a href="#NLSOUND_1_1CBackgroundSoundManagera3"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03128.html">NLMISC::CVector</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagera4">getZoneSourcePos</a> (<a class="el" href="a04558.html#a11">uint32</a> zone)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the position of the 3d source for a zone.  <a href="#NLSOUND_1_1CBackgroundSoundManagera4"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagera5">load</a> (const std::string &amp;continent, <a class="el" href="a02756.html">NLLIGO::CLigoConfig</a> &amp;config)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagera6">loadAudioFromPrimitives</a> (const <a class="el" href="a03123.html">NLLIGO::IPrimitive</a> &amp;audioRoot)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagera7">loadEffecsFromRegion</a> (const <a class="el" href="a03126.html">NLLIGO::CPrimRegion</a> &amp;region)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagera8">loadSamplesFromRegion</a> (const <a class="el" href="a03126.html">NLLIGO::CPrimRegion</a> &amp;region)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagera9">loadSoundsFromRegion</a> (const <a class="el" href="a03126.html">NLLIGO::CPrimRegion</a> &amp;region)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagera10">play</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Start to play the background sound.  <a href="#NLSOUND_1_1CBackgroundSoundManagera10"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagera11">setBackgroundFilterFades</a> (const <a class="el" href="a03920.html">UAudioMixer::TBackgroundFilterFades</a> &amp;backgroundFilterFades)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagera12">setBackgroundFlags</a> (const <a class="el" href="a03921.html">UAudioMixer::TBackgroundFlags</a> &amp;backgroundFlags)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the background flags.  <a href="#NLSOUND_1_1CBackgroundSoundManagera12"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagera13">setListenerPosition</a> (const <a class="el" href="a03128.html">NLMISC::CVector</a> &amp;listenerPosition)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Call this method when the listener position change.  <a href="#NLSOUND_1_1CBackgroundSoundManagera13"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagera14">stop</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Stop the background sound.  <a href="#NLSOUND_1_1CBackgroundSoundManagera14"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagera15">unload</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagera16">updateBackgroundStatus</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Call this method to update the background sound (sub method of setListenerPosition).  <a href="#NLSOUND_1_1CBackgroundSoundManagera16"></a><br><br></td></tr>
<tr><td colspan=2><br><h2>Private Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerd0">addFxZone</a> (const std::string &amp;fxName, const std::vector&lt; <a class="el" href="a03127.html">NLLIGO::CPrimVector</a> &gt; &amp;points)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">add a fx zone  <a href="#NLSOUND_1_1CBackgroundSoundManagerd0"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerd1">addSampleBank</a> (const std::vector&lt; std::string &gt; &amp;bankNames, const std::vector&lt; <a class="el" href="a03127.html">NLLIGO::CPrimVector</a> &gt; &amp;points)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">add a sample bank zone  <a href="#NLSOUND_1_1CBackgroundSoundManagerd1"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerd2">addSound</a> (const std::string &amp;rawSoundName, const std::vector&lt; <a class="el" href="a03127.html">NLLIGO::CPrimVector</a> &gt; &amp;points, bool isPath)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">deprecated, Internal use only for loading.  <a href="#NLSOUND_1_1CBackgroundSoundManagerd2"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerd3">addSound</a> (const std::string &amp;soundName, <a class="el" href="a04558.html#a15">uint</a> layerId, const std::vector&lt; <a class="el" href="a03127.html">NLLIGO::CPrimVector</a> &gt; &amp;points, bool isPath)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerd4">CBackgroundSoundManager</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor.  <a href="#NLSOUND_1_1CBackgroundSoundManagerd4"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerd5">loadEffectsFromPrimitives</a> (const <a class="el" href="a03123.html">NLLIGO::IPrimitive</a> &amp;fxRoot)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerd6">loadSamplesFromPrimitives</a> (const <a class="el" href="a03123.html">NLLIGO::IPrimitive</a> &amp;sampleRoot)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerd7">loadSoundsFromPrimitives</a> (const <a class="el" href="a03123.html">NLLIGO::IPrimitive</a> &amp;soundRoot)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerd8">onUpdate</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>template&lt;class CharType&gt; std::vector&lt; std::basic_string&lt;<br>
 CharType &gt; &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerd9">split</a> (const std::basic_string&lt; CharType &gt; &amp;str, CharType splitTag)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">TODO : Utility... should be in <a class="el" href="a05378.html">NLMISC</a> ?  <a href="#NLSOUND_1_1CBackgroundSoundManagerd9"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerd10">~CBackgroundSoundManager</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor.  <a href="#NLSOUND_1_1CBackgroundSoundManagerd10"></a><br><br></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="a03920.html">UAudioMixer::TBackgroundFilterFades</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr0">_BackgroundFilterFades</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Background filters fades.  <a href="#NLSOUND_1_1CBackgroundSoundManagerr0"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03921.html">UAudioMixer::TBackgroundFlags</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr1">_BackgroundFlags</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Background flags.  <a href="#NLSOUND_1_1CBackgroundSoundManagerr1"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr2">_DoFade</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Is some fade in/out running?  <a href="#NLSOUND_1_1CBackgroundSoundManagerr2"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a05378.html#a242">NLMISC::TTime</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr3">_FilterFadesStart</a> [UAudioMixer::TBackgroundFlags::NB_BACKGROUND_FLAGS]</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The date of last fade in or out started for each filter.  <a href="#NLSOUND_1_1CBackgroundSoundManagerr3"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>float&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr4">_FilterFadeValues</a> [UAudioMixer::TBackgroundFlags::NB_BACKGROUND_FLAGS]</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The filter fade values.  <a href="#NLSOUND_1_1CBackgroundSoundManagerr4"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="a02250.html">TFxZone</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr5">_FxZones</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Container for the fx primitive.  <a href="#NLSOUND_1_1CBackgroundSoundManagerr5"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a05378.html#a236">NLMISC::TStringId</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr6">_LastEnv</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Last setted env fx. Used when clustered sound is not active.  <a href="#NLSOUND_1_1CBackgroundSoundManagerr6"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03128.html">NLMISC::CVector</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr7">_LastPosition</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The last position of the listener.  <a href="#NLSOUND_1_1CBackgroundSoundManagerr7"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr8">_Playing</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Flag for playing background sounds.  <a href="#NLSOUND_1_1CBackgroundSoundManagerr8"></a><br><br></td></tr>
<tr><td colspan="2"><div class="groupHeader"></div></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="a02249.html">TBanksData</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerz1295_0">_Banks</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Container for the banks primitive.  <a href="#NLSOUND_1_1CBackgroundSoundManagerz1295_0"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>std::set&lt; std::string &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerz1295_1">_LoadedBanks</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Container for the list of currently loaded banks.  <a href="#NLSOUND_1_1CBackgroundSoundManagerz1295_1"></a><br><br></td></tr>
<tr><td colspan="2"><div class="groupHeader"></div></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector&lt; <a class="el" href="a02251.html">TSoundData</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerz1296_0">_Layers</a> [<a class="el" href="a05381.html#a4">BACKGROUND_LAYER</a>]</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Array of vector of sound data.  <a href="#NLSOUND_1_1CBackgroundSoundManagerz1296_0"></a><br><br></td></tr>
<tr><td colspan=2><br><h2>Friends</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>class&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagern0">CAudioMixerUser</a></td></tr>

</table>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="NLSOUND_1_1CBackgroundSoundManagerd4" doxytag="NLSOUND::CBackgroundSoundManager::CBackgroundSoundManager" ></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::CBackgroundSoundManager::CBackgroundSoundManager </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [private]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Constructor. 
<p>

<p>
Definition at line <a class="el" href="a05471.html#l00060">60</a> of file <a class="el" href="a05471.html">background_sound_manager.cpp</a>.
<p>
References <a class="el" href="a05472.html#l00198">_BackgroundFlags</a>, <a class="el" href="a05472.html#l00202">_FilterFadesStart</a>, <a class="el" href="a05472.html#l00204">_FilterFadeValues</a>, <a class="el" href="a06594.html#l00097">NLSOUND::UAudioMixer::TBackgroundFlags::Flags</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
<div class="fragment"><pre>00061 : <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr7">_LastPosition</a>(0,0,0), <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr8">_Playing</a>(<span class="keyword">false</span>), <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr2">_DoFade</a>(<span class="keyword">false</span>)
00062 {
00063         <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;UAudioMixer::TBackgroundFlags::NB_BACKGROUND_FLAGS; ++i)
00064         {
00065                 <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr1">_BackgroundFlags</a>.Flags[i] = <span class="keyword">false</span>;
00066                 <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr3">_FilterFadesStart</a>[i] = 0;
00067                 <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr4">_FilterFadeValues</a>[i] = 1.0f;
00068         }
00069 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBackgroundSoundManagerd10" doxytag="NLSOUND::CBackgroundSoundManager::~CBackgroundSoundManager" ></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::CBackgroundSoundManager::~<a class="el" href="a02248.html">CBackgroundSoundManager</a> </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [private, virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Destructor. 
<p>

<p>
Definition at line <a class="el" href="a05471.html#l00071">71</a> of file <a class="el" href="a05471.html">background_sound_manager.cpp</a>.
<p>
References <a class="el" href="a05471.html#l00823">unload()</a>.
<p>
<div class="fragment"><pre>00072 {
00073         <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagera15">unload</a>();
00074 }
</pre></div>    </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="NLSOUND_1_1CBackgroundSoundManagerd0" doxytag="NLSOUND::CBackgroundSoundManager::addFxZone" ></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::CBackgroundSoundManager::addFxZone </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const std::string &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>fxName</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const std::vector&lt; <a class="el" href="a03127.html">NLLIGO::CPrimVector</a> &gt; &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>points</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [private]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
add a fx zone 
<p>

<p>
Definition at line <a class="el" href="a05471.html#l00473">473</a> of file <a class="el" href="a05471.html">background_sound_manager.cpp</a>.
<p>
References <a class="el" href="a05472.html#l00305">_FxZones</a>, <a class="el" href="a05472.html#l00294">NLSOUND::CBackgroundSoundManager::TFxZone::FxName</a>, <a class="el" href="a05472.html#l00300">NLSOUND::CBackgroundSoundManager::TFxZone::MaxBox</a>, <a class="el" href="a05484.html#l00038">min</a>, <a class="el" href="a05472.html#l00298">NLSOUND::CBackgroundSoundManager::TFxZone::MinBox</a>, <a class="el" href="a05472.html#l00296">NLSOUND::CBackgroundSoundManager::TFxZone::Points</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::x</a>, and <a class="el" href="a06673.html#l00051">NLMISC::CVector::y</a>.
<p>
Referenced by <a class="el" href="a05471.html#l00441">loadEffectsFromPrimitives()</a>.
<p>
<div class="fragment"><pre>00474 {
00475         TFxZone fxZone;
00476 
00477         fxZone.FxName = CStringMapper::map(fxName);
00478         fxZone.Points.resize (points.size());
00479         <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> j=0; j&lt;points.size(); j++)
00480         {
00481                 fxZone.Points[j] = points[j];
00482         }
00483 
00484         <span class="comment">// compute bouding box.</span>
00485         CVector vmin(FLT_MAX, FLT_MAX, 0), vmax(-FLT_MAX, -FLT_MAX, 0);
00486 
00487         vector&lt;CVector&gt;::iterator first(fxZone.Points.begin()), last(fxZone.Points.end());
00488         <span class="keywordflow">for</span> (; first != last; ++first)
00489         {
00490                 vmin.x = <a class="code" href="a04061.html#a0">min</a>(first-&gt;x, vmin.x);
00491                 vmin.y = <a class="code" href="a04061.html#a0">min</a>(first-&gt;y, vmin.y);
00492                 vmax.x = max(first-&gt;x, vmax.x);
00493                 vmax.y = max(first-&gt;y, vmax.y);
00494         }
00495         fxZone.MaxBox = vmax;
00496         fxZone.MinBox = vmin;
00497 
00498         <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr5">_FxZones</a>.push_back(fxZone);
00499 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBackgroundSoundManagerd1" doxytag="NLSOUND::CBackgroundSoundManager::addSampleBank" ></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::CBackgroundSoundManager::addSampleBank </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const std::vector&lt; std::string &gt; &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>bankNames</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const std::vector&lt; <a class="el" href="a03127.html">NLLIGO::CPrimVector</a> &gt; &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>points</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [private]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
add a sample bank zone 
<p>

<p>
Definition at line <a class="el" href="a05471.html#l00502">502</a> of file <a class="el" href="a05471.html">background_sound_manager.cpp</a>.
<p>
References <a class="el" href="a05472.html#l00218">NLSOUND::CBackgroundSoundManager::TBanksData::Banks</a>, <a class="el" href="a05472.html#l00222">NLSOUND::CBackgroundSoundManager::TBanksData::MaxBox</a>, <a class="el" href="a05484.html#l00038">min</a>, <a class="el" href="a05472.html#l00220">NLSOUND::CBackgroundSoundManager::TBanksData::MinBox</a>, <a class="el" href="a05472.html#l00224">NLSOUND::CBackgroundSoundManager::TBanksData::Points</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::x</a>, and <a class="el" href="a06673.html#l00051">NLMISC::CVector::y</a>.
<p>
Referenced by <a class="el" href="a05471.html#l00410">loadSamplesFromPrimitives()</a>, and <a class="el" href="a05471.html#l00537">loadSamplesFromRegion()</a>.
<p>
<div class="fragment"><pre>00503 {
00504         TBanksData      bd;
00505 <span class="comment">//      uint pointCount = points.size ();</span>
00506         bd.Points.resize (points.size());
00507         <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> j=0; j&lt;points.size(); j++)
00508         {
00509                 bd.Points[j] = points[j];
00510         }
00511 
00512         <span class="comment">// compute bouding box.</span>
00513         CVector vmin(FLT_MAX, FLT_MAX, 0), vmax(-FLT_MAX, -FLT_MAX, 0);
00514 
00515         vector&lt;CVector&gt;::iterator first(bd.Points.begin()), last(bd.Points.end());
00516         <span class="keywordflow">for</span> (; first != last; ++first)
00517         {
00518                 vmin.x = <a class="code" href="a04061.html#a0">min</a>(first-&gt;x, vmin.x);
00519                 vmin.y = <a class="code" href="a04061.html#a0">min</a>(first-&gt;y, vmin.y);
00520                 vmax.x = max(first-&gt;x, vmax.x);
00521                 vmax.y = max(first-&gt;y, vmax.y);
00522         }
00523         bd.MaxBox = vmax;
00524         bd.MinBox = vmin;
00525 
00526         <span class="keywordflow">for</span>(<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;bankNames.size(); ++i)
00527         {
00528                 <span class="keywordflow">if</span> (!bankNames[i].empty())
00529                         bd.Banks.push_back(bankNames[i]);
00530         }
00531 
00532         <span class="comment">// ok, store it in the container.</span>
00533         <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerz1295_0">_Banks</a>.push_back(bd);
00534 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBackgroundSoundManagerd2" doxytag="NLSOUND::CBackgroundSoundManager::addSound" ></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::CBackgroundSoundManager::addSound </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const std::string &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>rawSoundName</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const std::vector&lt; <a class="el" href="a03127.html">NLLIGO::CPrimVector</a> &gt; &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>points</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>isPath</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [private]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
deprecated, Internal use only for loading. 
<p>

<p>
Definition at line <a class="el" href="a05471.html#l00149">149</a> of file <a class="el" href="a05471.html">background_sound_manager.cpp</a>.
<p>
References <a class="el" href="a05471.html#l00093">addSound()</a>, <a class="el" href="a05472.html#l00051">NLSOUND::BACKGROUND_LAYER</a>, <a class="el" href="a05587.html#l00115">NLMISC::clamp()</a>, <a class="el" href="a05536.html#l00448">count</a>, <a class="el" href="a05622.html#l00135">nlwarning</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>00150 {
00151         <a class="code" href="a04558.html#a15">uint</a> layerId = 0;
00152         <a class="code" href="a04558.html#a15">uint</a> n = 0;
00153         string name;
00154         <span class="comment">// count the number of '-' in the string.</span>
00155         n = <a class="code" href="a04113.html#a71">std::count</a>(rawSoundName.begin(), rawSoundName.end(), <span class="charliteral">'-'</span>);
00156 
00157         <span class="keywordflow">if</span> (n == 2)
00158         {
00159                 <span class="comment">// no layer spec, default to layer A</span>
00160                 <a class="code" href="a04558.html#a11">uint32</a> pos1 = rawSoundName.find (<span class="stringliteral">"-"</span>);
00161                 <span class="keywordflow">if</span>(pos1 == string::npos)
00162                 {
00163                         <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"zone have the malformated name '%s' missing -name-"</span>, rawSoundName.c_str());
00164                         <span class="keywordflow">return</span>;
00165                 }
00166                 pos1++;
00167 
00168                 <a class="code" href="a04558.html#a11">uint32</a> pos2 = rawSoundName.find (<span class="stringliteral">"-"</span>, pos1);
00169                 <span class="keywordflow">if</span>(pos2 == string::npos)
00170                 {
00171                         <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"zone have the malformated name '%s' missing -name-"</span>, rawSoundName.c_str());
00172                         <span class="keywordflow">return</span>;
00173                 }
00174 
00175                 name = rawSoundName.substr(pos1, pos2-pos1);
00176         }
00177         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (n == 3)
00178         {
00179                 <span class="comment">// layer spec !</span>
00180                 <a class="code" href="a04558.html#a11">uint32</a> pos1 = rawSoundName.find (<span class="stringliteral">"-"</span>);
00181                 <a class="code" href="a04558.html#a11">uint32</a> pos2 = rawSoundName.find (<span class="stringliteral">"-"</span>, pos1+1);
00182                 <span class="keywordflow">if</span>(pos1 == string::npos || pos2 == string::npos)
00183                 {
00184                         <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"zone have the malformated name '%s' missing -layerId- or -name-"</span>, rawSoundName.c_str());
00185                         <span class="keywordflow">return</span>;
00186                 }
00187                 pos1++;
00188 
00189                 <a class="code" href="a04558.html#a11">uint32</a> pos3 = rawSoundName.find (<span class="stringliteral">"-"</span>, pos2+1);
00190                 <span class="keywordflow">if</span>(pos3 == string::npos)
00191                 {
00192                         <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"zone have the malformated name '%s' missing -name-"</span>, rawSoundName.c_str());
00193                         <span class="keywordflow">return</span>;
00194                 }
00195 
00196                 <span class="keywordtype">char</span> <span class="keywordtype">id</span> = rawSoundName[pos1];
00197 
00198                 <span class="comment">// check caps</span>
00199                 <span class="keywordflow">if</span> (<span class="keywordtype">id</span> &lt; <span class="charliteral">'a'</span>)
00200                         <span class="keywordtype">id</span> = <span class="keywordtype">id</span> + (<span class="charliteral">'a'</span> - <span class="charliteral">'A'</span>);
00201 
00202                 layerId = <span class="keywordtype">id</span> - <span class="charliteral">'a'</span>;
00203 
00204                 <a class="code" href="a05378.html#a374">NLMISC::clamp</a>(layerId, 0u, BACKGROUND_LAYER-1);
00205                 pos2++;
00206 
00207                 name = rawSoundName.substr(pos2, pos3-pos2);
00208         }
00209         <span class="keywordflow">else</span>
00210         {
00211                 <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"zone have the malformated name '%s"</span>,  rawSoundName.c_str());
00212                 <span class="keywordflow">return</span>;
00213         }
00214                 
00215         <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerd3">addSound</a>(name, layerId, points, isPath);
00216 <span class="comment">/*</span>
00217 <span class="comment">        TSoundData      sd;</span>
00218 <span class="comment"></span>
00219 <span class="comment">        sd.SoundName = name;</span>
00220 <span class="comment">        sd.Sound = mixer-&gt;getSoundId(sd.SoundName);</span>
00221 <span class="comment">        sd.Source = 0;</span>
00222 <span class="comment"></span>
00223 <span class="comment">        // Copy the points</span>
00224 <span class="comment">        sd.Points.resize (points.size ());</span>
00225 <span class="comment">        for (uint i=0; i&lt;points.size (); i++)</span>
00226 <span class="comment">                sd.Points[i] = points[i];</span>
00227 <span class="comment"></span>
00228 <span class="comment">        sd.Selected = false;</span>
00229 <span class="comment">        sd.IsPath = isPath;</span>
00230 <span class="comment"></span>
00231 <span class="comment">        if (sd.Sound != 0)</span>
00232 <span class="comment">        {</span>
00233 <span class="comment">                // the sound is available !</span>
00234 <span class="comment">                // compute bouding box/</span>
00235 <span class="comment">                CVector vmin(FLT_MAX, FLT_MAX, 0), vmax(-FLT_MAX, -FLT_MAX, 0);</span>
00236 <span class="comment"></span>
00237 <span class="comment">                vector&lt;CVector&gt;::iterator first(sd.Points.begin()), last(sd.Points.end());</span>
00238 <span class="comment">                for (; first != last; ++first)</span>
00239 <span class="comment">                {</span>
00240 <span class="comment">                        vmin.x = min(first-&gt;x, vmin.x);</span>
00241 <span class="comment">                        vmin.y = min(first-&gt;y, vmin.y);</span>
00242 <span class="comment">                        vmax.x = max(first-&gt;x, vmax.x);</span>
00243 <span class="comment">                        vmax.y = max(first-&gt;y, vmax.y);</span>
00244 <span class="comment">                }</span>
00245 <span class="comment">                sd.MaxBox = vmax;</span>
00246 <span class="comment">                sd.MinBox = vmin;</span>
00247 <span class="comment"></span>
00248 <span class="comment">                // compute the surface without the sound distance</span>
00249 <span class="comment">                sd.Surface = (vmax.x - vmin.x) * (vmax.y - vmin.y);</span>
00250 <span class="comment"></span>
00251 <span class="comment">                // add the eard distance of the sound.</span>
00252 <span class="comment">                float   dist = sd.Sound-&gt;getMaxDistance();</span>
00253 <span class="comment">                sd.MaxBox.x += dist;</span>
00254 <span class="comment">                sd.MaxBox.y += dist;</span>
00255 <span class="comment">                sd.MinBox.x -= dist;</span>
00256 <span class="comment">                sd.MinBox.y -= dist;</span>
00257 <span class="comment"></span>
00258 <span class="comment">                sd.MaxDist = dist;</span>
00259 <span class="comment"></span>
00260 <span class="comment">                // store the sound. </span>
00261 <span class="comment">                // TODO : handle the three layer.</span>
00262 <span class="comment">                _Layers[layerId].push_back(sd);</span>
00263 <span class="comment">        }</span>
00264 <span class="comment">        else</span>
00265 <span class="comment">        {</span>
00266 <span class="comment">                nlwarning ("The sound '%s' can't be loaded", sd.SoundName.c_str());</span>
00267 <span class="comment">        }</span>
00268 <span class="comment">*/</span>
00269 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBackgroundSoundManagerd3" doxytag="NLSOUND::CBackgroundSoundManager::addSound" ></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::CBackgroundSoundManager::addSound </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const std::string &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>soundName</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>&nbsp;</td>
          <td class="mdname" nowrap> <em>layerId</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const std::vector&lt; <a class="el" href="a03127.html">NLLIGO::CPrimVector</a> &gt; &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>points</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool&nbsp;</td>
          <td class="mdname" nowrap> <em>isPath</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [private]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05471.html#l00093">93</a> of file <a class="el" href="a05471.html">background_sound_manager.cpp</a>.
<p>
References <a class="el" href="a05472.html#l00265">_Layers</a>, <a class="el" href="a06407.html#l00110">NLSOUND::CSound::getMaxDistance()</a>, <a class="el" href="a05465.html#l01510">NLSOUND::CAudioMixerUser::getSoundId()</a>, <a class="el" href="a05472.html#l00256">NLSOUND::CBackgroundSoundManager::TSoundData::IsPath</a>, <a class="el" href="a05472.html#l00250">NLSOUND::CBackgroundSoundManager::TSoundData::MaxBox</a>, <a class="el" href="a05472.html#l00254">NLSOUND::CBackgroundSoundManager::TSoundData::MaxDist</a>, <a class="el" href="a05484.html#l00038">min</a>, <a class="el" href="a05472.html#l00248">NLSOUND::CBackgroundSoundManager::TSoundData::MinBox</a>, <a class="el" href="a05622.html#l00135">nlwarning</a>, <a class="el" href="a05472.html#l00258">NLSOUND::CBackgroundSoundManager::TSoundData::Points</a>, <a class="el" href="a05472.html#l00260">NLSOUND::CBackgroundSoundManager::TSoundData::Selected</a>, <a class="el" href="a05472.html#l00243">NLSOUND::CBackgroundSoundManager::TSoundData::Sound</a>, <a class="el" href="a05472.html#l00241">NLSOUND::CBackgroundSoundManager::TSoundData::SoundName</a>, <a class="el" href="a05472.html#l00245">NLSOUND::CBackgroundSoundManager::TSoundData::Source</a>, <a class="el" href="a05472.html#l00252">NLSOUND::CBackgroundSoundManager::TSoundData::Surface</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::x</a>, and <a class="el" href="a06673.html#l00051">NLMISC::CVector::y</a>.
<p>
Referenced by <a class="el" href="a05471.html#l00149">addSound()</a>, <a class="el" href="a05471.html#l00334">loadSoundsFromPrimitives()</a>, and <a class="el" href="a05471.html#l00574">loadSoundsFromRegion()</a>.
<p>
<div class="fragment"><pre>00094 {
00095         <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagern0">CAudioMixerUser</a> *mixer = CAudioMixerUser::instance();
00096         TSoundData      sd;
00097 
00098         sd.SoundName = CStringMapper::map(soundName);
00099         sd.Sound = mixer-&gt;getSoundId(sd.SoundName);
00100         sd.Source = 0;
00101 
00102         <span class="comment">// Copy the points</span>
00103         sd.Points.resize (points.size ());
00104         <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;points.size (); i++)
00105                 sd.Points[i] = points[i];
00106 
00107         sd.Selected = <span class="keyword">false</span>;
00108         sd.IsPath = isPath;
00109 
00110         <span class="keywordflow">if</span> (sd.Sound != 0)
00111         {
00112                 <span class="comment">// the sound is available !</span>
00113                 <span class="comment">// compute bouding box/</span>
00114                 CVector vmin(FLT_MAX, FLT_MAX, 0), vmax(-FLT_MAX, -FLT_MAX, 0);
00115 
00116                 vector&lt;CVector&gt;::iterator first(sd.Points.begin()), last(sd.Points.end());
00117                 <span class="keywordflow">for</span> (; first != last; ++first)
00118                 {
00119                         vmin.x = <a class="code" href="a04061.html#a0">min</a>(first-&gt;x, vmin.x);
00120                         vmin.y = <a class="code" href="a04061.html#a0">min</a>(first-&gt;y, vmin.y);
00121                         vmax.x = max(first-&gt;x, vmax.x);
00122                         vmax.y = max(first-&gt;y, vmax.y);
00123                 }
00124                 sd.MaxBox = vmax;
00125                 sd.MinBox = vmin;
00126 
00127                 <span class="comment">// compute the surface without the sound distance</span>
00128                 sd.Surface = (vmax.x - vmin.x) * (vmax.y - vmin.y);
00129 
00130                 <span class="comment">// add the eard distance of the sound.</span>
00131                 <span class="keywordtype">float</span>   dist = sd.Sound-&gt;getMaxDistance();
00132                 sd.MaxBox.x += dist;
00133                 sd.MaxBox.y += dist;
00134                 sd.MinBox.x -= dist;
00135                 sd.MinBox.y -= dist;
00136 
00137                 sd.MaxDist = dist;
00138 
00139                 <span class="comment">// store the sound. </span>
00140                 <span class="comment">// TODO : handle the three layer.</span>
00141                 <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerz1296_0">_Layers</a>[layerId].push_back(sd);
00142         }
00143         <span class="keywordflow">else</span>
00144         {
00145                 <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"The sound '%s' can't be loaded"</span>, CStringMapper::unmap(sd.SoundName).c_str());
00146         }
00147 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBackgroundSoundManagera0" doxytag="NLSOUND::CBackgroundSoundManager::getBackgroundFilterFades" ></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="a03920.html">UAudioMixer::TBackgroundFilterFades</a> &amp; NLSOUND::CBackgroundSoundManager::getBackgroundFilterFades </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05471.html#l00087">87</a> of file <a class="el" href="a05471.html">background_sound_manager.cpp</a>.
<p>
References <a class="el" href="a05472.html#l00200">_BackgroundFilterFades</a>.
<p>
Referenced by <a class="el" href="a05465.html#l00829">NLSOUND::CAudioMixerUser::getBackgroundFilterFades()</a>.
<p>
<div class="fragment"><pre>00088 {
00089         <span class="keywordflow">return</span> <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr0">_BackgroundFilterFades</a>;
00090 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBackgroundSoundManagera1" doxytag="NLSOUND::CBackgroundSoundManager::getBackgroundFlags" ></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="a03921.html">UAudioMixer::TBackgroundFlags</a> &amp; NLSOUND::CBackgroundSoundManager::getBackgroundFlags </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Get the background flags. 
<p>

<p>
Definition at line <a class="el" href="a05471.html#l00076">76</a> of file <a class="el" href="a05471.html">background_sound_manager.cpp</a>.
<p>
References <a class="el" href="a05472.html#l00198">_BackgroundFlags</a>.
<p>
Referenced by <a class="el" href="a05465.html#l00825">NLSOUND::CAudioMixerUser::getBackgroundFlags()</a>.
<p>
<div class="fragment"><pre>00077 {
00078         <span class="keywordflow">return</span>  <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr1">_BackgroundFlags</a>;
00079 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBackgroundSoundManagera2" doxytag="NLSOUND::CBackgroundSoundManager::getFilterValues" ></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 float* NLSOUND::CBackgroundSoundManager::getFilterValues </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05472.html#l00139">139</a> of file <a class="el" href="a05472.html">background_sound_manager.h</a>.
<p>
References <a class="el" href="a05472.html#l00204">_FilterFadeValues</a>.
<p>
Referenced by <a class="el" href="a05473.html#l00119">NLSOUND::CBackgroundSource::play()</a>.
<p>
<div class="fragment"><pre>00139 { <span class="keywordflow">return</span> <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr4">_FilterFadeValues</a>;}
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBackgroundSoundManagera3" doxytag="NLSOUND::CBackgroundSoundManager::getZone" ></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 std::vector&lt;<a class="el" href="a03128.html">NLMISC::CVector</a>&gt;&amp; NLSOUND::CBackgroundSoundManager::getZone </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td>
          <td class="mdname" nowrap> <em>zone</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>bool *&nbsp;</td>
          <td class="mdname" nowrap> <em>isPath</em> = 0</td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Return a patatoid. If isPath is not null, set it. 
<p>
    </td>
  </tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBackgroundSoundManagera4" doxytag="NLSOUND::CBackgroundSoundManager::getZoneSourcePos" ></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"> CVector NLSOUND::CBackgroundSoundManager::getZoneSourcePos </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>zone</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Return the position of the 3d source for a zone. 
<p>

<p>
Definition at line <a class="el" href="a05471.html#l01369">1369</a> of file <a class="el" href="a05471.html">background_sound_manager.cpp</a>.
<p>
References <a class="el" href="a05981.html#l00100">uint32</a>.
<p>
<div class="fragment"><pre>01370 {
01371 <span class="comment">/*      nlassert (zone&lt; BackgroundSounds.size());</span>
01372 <span class="comment">        CVector pos;</span>
01373 <span class="comment">        if (BackgroundSounds[zone].SourceDay != NULL)</span>
01374 <span class="comment">                BackgroundSounds[zone].SourceDay-&gt;getPos(pos);</span>
01375 <span class="comment">        return pos;</span>
01376 <span class="comment">*/</span>
01377         <span class="keywordflow">return</span> CVector();
01378 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBackgroundSoundManagera5" doxytag="NLSOUND::CBackgroundSoundManager::load" ></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::CBackgroundSoundManager::load </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const std::string &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>continent</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="a02756.html">NLLIGO::CLigoConfig</a> &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>config</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Load background sound for a continent. It'll automatically unload the old continent before loading the new one. This method load the 'audio' regions (specifying the sounds), the 'effect' regions and the 'sample' regions. Continent is for example "matis" or "fyros". It'll add .prim to the continent name and lookup() to find zones. So, don't forget to add sound .prim in the CPath system for the lookup With the new primitive file, this method will try to load the .primitive file before attempting to load any .prim file. If the .primitive is found, then no .prim are loaded.
<p>
Definition at line <a class="el" href="a05471.html#l00618">618</a> of file <a class="el" href="a05471.html">background_sound_manager.cpp</a>.
<p>
References <a class="el" href="a05472.html#l00305">_FxZones</a>, <a class="el" href="a05472.html#l00265">_Layers</a>, <a class="el" href="a05472.html#l00051">NLSOUND::BACKGROUND_LAYER</a>, <a class="el" href="a05538.html#l02654">file</a>, <a class="el" href="a05466.html#l00275">NLSOUND::CAudioMixerUser::getPackedSheetPath()</a>, <a class="el" href="a05466.html#l00276">NLSOUND::CAudioMixerUser::getPackedSheetUpdate()</a>, <a class="el" href="a05788.html#l00056">H_AUTO</a>, <a class="el" href="a05471.html#l00272">loadAudioFromPrimitives()</a>, <a class="el" href="a05471.html#l00570">loadEffecsFromRegion()</a>, <a class="el" href="a05471.html#l00537">loadSamplesFromRegion()</a>, <a class="el" href="a05471.html#l00574">loadSoundsFromRegion()</a>, <a class="el" href="a05622.html#l00111">nlinfo</a>, <a class="el" href="a06195.html#l01759">NLLIGO::CPrimitives::read()</a>, <a class="el" href="a06196.html#l00535">NLLIGO::CPrimitives::RootNode</a>, <a class="el" href="a06195.html#l00928">NLLIGO::CPrimRegion::serial()</a>, <a class="el" href="a06462.html#l00232">NLMISC::IStream::serial()</a>, <a class="el" href="a06462.html#l00324">NLMISC::IStream::serialCont()</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05981.html#l00100">uint32</a>, and <a class="el" href="a06196.html#l00503">NLLIGO::CPrimRegion::VZones</a>.
<p>
Referenced by <a class="el" href="a05465.html#l02131">NLSOUND::CAudioMixerUser::loadBackgroundSound()</a>.
<p>
<div class="fragment"><pre>00619 {
00620         NL_ALLOC_CONTEXT(NLSOUND_CBackgroundSoundManager);
00621         <a class="code" href="a04558.html#a11">uint32</a>  PACKED_VERSION = 1;
00622         <span class="comment">// First, try to load from a .primitive file (contain everythink)</span>
00623         {
00624                 <a class="code" href="a02653.html">CIFile</a> <a class="code" href="a04115.html#a95">file</a>;
00625 <span class="comment">//              CPrimRegion region;</span>
00626                 <a class="code" href="a03117.html">CPrimitives</a> primitives;
00627                 primitives.<a class="code" href="a03117.html#NLLIGO_1_1CPrimitiveso0">RootNode</a> = <span class="keyword">new</span> <a class="code" href="a03122.html">CPrimNode</a>;
00628                 string fn = continent+<span class="stringliteral">"_audio.primitive"</span>;
00629 
00630                 string path = CPath::lookup(fn, <span class="keyword">false</span>);
00631 
00632                 <span class="keywordflow">if</span>(!path.empty() &amp;&amp; <a class="code" href="a04115.html#a95">file</a>.open (path))
00633                 {
00634                         <span class="comment">// first, try to load the binary version (if up to date)</span>
00635                         {
00636                                 <a class="code" href="a04558.html#a11">uint32</a> version;
00637                                 string <a class="code" href="a05377.html#a2">filename</a> = continent+<span class="stringliteral">".background_primitive"</span>;
00638                                 string binPath = CPath::lookup(filename, <span class="keyword">false</span>, <span class="keyword">false</span>, <span class="keyword">false</span>);
00639                                 <span class="keywordflow">if</span> (!binPath.empty() 
00640                                         &amp;&amp; (CFile::getFileModificationDate(binPath) &gt; CFile::getFileModificationDate(path)))
00641                                 {
00642                                         <a class="code" href="a02653.html">CIFile</a> binFile(binPath);
00643                                         binFile.<a class="code" href="a02270.html#NLMISC_1_1IStreama5">serial</a>(version);
00644 
00645                                         <span class="keywordflow">if</span> (version == PACKED_VERSION)
00646                                         {
00647                                                 <a class="code" href="a04199.html#a1">nlinfo</a> (<span class="stringliteral">"loading '%s'"</span>, <a class="code" href="a05377.html#a2">filename</a>.c_str());
00648                                                 <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerz1295_0">_Banks</a>.clear();
00649                                                 binFile.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2033_9">serialCont</a>(_Banks);
00650                                                 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;<a class="code" href="a05381.html#a4">BACKGROUND_LAYER</a>; ++i)
00651                                                 {
00652                                                         <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerz1296_0">_Layers</a>[i].clear();
00653                                                         binFile.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2033_9">serialCont</a>(_Layers[i]);
00654                                                 }
00655                                                 <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr5">_FxZones</a>.clear();
00656                                                 binFile.<a class="code" href="a02270.html#NLMISC_1_1IStreamz2033_9">serialCont</a>(_FxZones);
00657 
00658                                                 <span class="comment">// jobs done !</span>
00659                                                 <span class="keywordflow">return</span>;
00660                                         }
00661                                 }
00662                         }
00663                         
00664                         <a class="code" href="a04199.html#a1">nlinfo</a> (<span class="stringliteral">"loading '%s'"</span>, fn.c_str());
00665 
00666                         CIXml xml;
00667                         {
00668                                 <a class="code" href="a04365.html#a4">H_AUTO</a>(BackgroundSoundMangerLoad_xml_init);
00669                                 xml.init (file);
00670                         }
00671 
00672                         {
00673                                 <a class="code" href="a04365.html#a4">H_AUTO</a>(BackgroundSoundMangerLoad_primitive_read);
00674                                 primitives.<a class="code" href="a03117.html#NLLIGO_1_1CPrimitivesa4">read</a>(xml.getRootNode(), fn.c_str(), config);
00675                         }
00676 <span class="comment">//                      region.serial(xml);</span>
00677                         <a class="code" href="a04115.html#a95">file</a>.close ();
00678 
00679                         {
00680                                 <a class="code" href="a04365.html#a4">H_AUTO</a>(BackgroundSoundMangerLoad_loadAudioFromPrimitive);
00681                                 <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagera6">loadAudioFromPrimitives</a>(*primitives.<a class="code" href="a03117.html#NLLIGO_1_1CPrimitiveso0">RootNode</a>);
00682                         }
00683 
00684                         <span class="comment">// store the binary version of the audio primitive for later use</span>
00685                         <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagern0">CAudioMixerUser</a> *mixer = CAudioMixerUser::instance();
00686                         <span class="keywordflow">if</span> (mixer-&gt;getPackedSheetUpdate())
00687                         {
00688                                 <span class="comment">// need to update packed sheet, so write the binary primitive version</span>
00689                                 string <a class="code" href="a05377.html#a2">filename</a> = mixer-&gt;getPackedSheetPath()+<span class="stringliteral">"/"</span>+continent+<span class="stringliteral">".background_primitive"</span>;
00690                                 <a class="code" href="a03011.html">COFile</a> <a class="code" href="a04115.html#a95">file</a>(filename);
00691 
00692                                 <a class="code" href="a04115.html#a95">file</a>.serial(PACKED_VERSION);
00693                                 <a class="code" href="a04115.html#a95">file</a>.serialCont(_Banks);
00694                                 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;<a class="code" href="a05381.html#a4">BACKGROUND_LAYER</a>; ++i)
00695                                         <a class="code" href="a04115.html#a95">file</a>.serialCont(_Layers[i]);
00696                                 <a class="code" href="a04115.html#a95">file</a>.serialCont(_FxZones);
00697                         }
00698 
00700                         <span class="comment">// Jobs done !</span>
00701                         <span class="keywordflow">return</span>;
00702                 }
00703 
00704         }
00705 
00706         <span class="comment">// We reach this only if the new .primitive file format is not found</span>
00707         <span class="comment">// then, we try to load separate .prim file for sound, samples and fx</span>
00708 
00709         <span class="comment">// load the sound.</span>
00710         {
00711                 <a class="code" href="a02653.html">CIFile</a> <a class="code" href="a04115.html#a95">file</a>;
00712                 <a class="code" href="a03126.html">CPrimRegion</a> region;
00713                 string fn = continent+<span class="stringliteral">"_audio.prim"</span>;
00714 
00715                 <a class="code" href="a04199.html#a1">nlinfo</a> (<span class="stringliteral">"loading '%s'"</span>, fn.c_str());
00716 
00717                 string path = CPath::lookup(fn, <span class="keyword">false</span>);
00718 
00719                 <span class="keywordflow">if</span>(!path.empty() &amp;&amp; <a class="code" href="a04115.html#a95">file</a>.open (path))
00720                 {
00721                         CIXml xml;
00722                         xml.init (file);
00723                         region.<a class="code" href="a03126.html#NLLIGO_1_1CPrimRegiona0">serial</a>(xml);
00724                         <a class="code" href="a04115.html#a95">file</a>.close ();
00725 
00726                         <a class="code" href="a04199.html#a1">nlinfo</a> (<span class="stringliteral">"Region '%s' contains %d zones for the background sounds"</span>, continent.c_str(), region.<a class="code" href="a03126.html#NLLIGO_1_1CPrimRegiono6">VZones</a>.size());
00727 
00728                         <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagera9">loadSoundsFromRegion</a>(region);
00729                 }
00730         }
00731         <span class="comment">// load the effect.</span>
00732         {
00733                 <a class="code" href="a02653.html">CIFile</a> <a class="code" href="a04115.html#a95">file</a>;
00734                 <a class="code" href="a03126.html">CPrimRegion</a> region;
00735                 string fn = continent+<span class="stringliteral">"_effects.prim"</span>;
00736 
00737                 <a class="code" href="a04199.html#a1">nlinfo</a> (<span class="stringliteral">"loading '%s'"</span>, fn.c_str());
00738 
00739                 string path = CPath::lookup(fn, <span class="keyword">false</span>);
00740 
00741                 <span class="keywordflow">if</span>(!path.empty() &amp;&amp; <a class="code" href="a04115.html#a95">file</a>.open (path))
00742                 {
00743                         CIXml xml;
00744                         xml.init (file);
00745                         region.<a class="code" href="a03126.html#NLLIGO_1_1CPrimRegiona0">serial</a>(xml);
00746                         <a class="code" href="a04115.html#a95">file</a>.close ();
00747 
00748                         <a class="code" href="a04199.html#a1">nlinfo</a> (<span class="stringliteral">"Region '%s' contains %d zones for the background effetcs"</span>, continent.c_str(), region.<a class="code" href="a03126.html#NLLIGO_1_1CPrimRegiono6">VZones</a>.size());
00749 
00750                         <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagera7">loadEffecsFromRegion</a>(region);
00751                 }
00752         }
00753         <span class="comment">// load the samples banks.</span>
00754         {
00755                 <a class="code" href="a02653.html">CIFile</a> <a class="code" href="a04115.html#a95">file</a>;
00756                 <a class="code" href="a03126.html">CPrimRegion</a> region;
00757                 string fn = continent+<span class="stringliteral">"_samples.prim"</span>;
00758 
00759                 <a class="code" href="a04199.html#a1">nlinfo</a> (<span class="stringliteral">"loading '%s'"</span>, fn.c_str());
00760 
00761                 string path = CPath::lookup(fn, <span class="keyword">false</span>);
00762 
00763                 <span class="keywordflow">if</span>(!path.empty() &amp;&amp; <a class="code" href="a04115.html#a95">file</a>.open (path))
00764                 {
00765                         CIXml xml;
00766                         xml.init (file);
00767                         region.<a class="code" href="a03126.html#NLLIGO_1_1CPrimRegiona0">serial</a>(xml);
00768                         <a class="code" href="a04115.html#a95">file</a>.close ();
00769 
00770                         <a class="code" href="a04199.html#a1">nlinfo</a> (<span class="stringliteral">"Region '%s' contains %d zones for the background samples banks"</span>, continent.c_str(), region.<a class="code" href="a03126.html#NLLIGO_1_1CPrimRegiono6">VZones</a>.size());
00771 
00772                         <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagera8">loadSamplesFromRegion</a>(region);
00773                 }
00774         }
00775 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBackgroundSoundManagera6" doxytag="NLSOUND::CBackgroundSoundManager::loadAudioFromPrimitives" ></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::CBackgroundSoundManager::loadAudioFromPrimitives </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="a03123.html">NLLIGO::IPrimitive</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>audioRoot</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Load the sounds, effects and sample banks from a region class.
<p>
Definition at line <a class="el" href="a05471.html#l00272">272</a> of file <a class="el" href="a05471.html">background_sound_manager.cpp</a>.
<p>
References <a class="el" href="a05472.html#l00195">_Playing</a>, <a class="el" href="a06195.html#l01287">NLLIGO::IPrimitive::getChild()</a>, <a class="el" href="a06196.html#l00183">NLLIGO::IPrimitive::getNumChildren()</a>, <a class="el" href="a06195.html#l01102">NLLIGO::IPrimitive::getPropertyByName()</a>, <a class="el" href="a05471.html#l00441">loadEffectsFromPrimitives()</a>, <a class="el" href="a05471.html#l00410">loadSamplesFromPrimitives()</a>, <a class="el" href="a05471.html#l00334">loadSoundsFromPrimitives()</a>, <a class="el" href="a05471.html#l00778">play()</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05471.html#l00823">unload()</a>.
<p>
Referenced by <a class="el" href="a05471.html#l00618">load()</a>, and <a class="el" href="a05465.html#l02116">NLSOUND::CAudioMixerUser::loadBackgroundAudioFromPrimitives()</a>.
<p>
<div class="fragment"><pre>00273 {
00274         std::string className;
00275         <span class="keywordflow">if</span>(audioRoot.<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_14">getPropertyByName</a>(<span class="stringliteral">"class"</span>, className))
00276         {
00277                 <span class="keywordflow">if</span> (className == <span class="stringliteral">"audio"</span>)
00278                 {
00279                         <span class="comment">// ok, it a root of the audio primitives</span>
00280                         
00281                         <span class="comment">// remember playing state</span>
00282                         <span class="keywordtype">bool</span> oldState = <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr8">_Playing</a>;
00283                         <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagera15">unload</a>();
00284 
00285                         <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;audioRoot.<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1899_3">getNumChildren</a>(); ++i)
00286                         {
00287                                 <span class="keyword">const</span> <a class="code" href="a03123.html">NLLIGO::IPrimitive</a> *child;
00288 
00289                                 audioRoot.<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1899_1">getChild</a>(child, i);
00290 
00291                                 <span class="keywordflow">if</span> (child-&gt;<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_14">getPropertyByName</a>(<span class="stringliteral">"class"</span>, className))
00292                                 {
00293                                         <span class="keywordflow">if</span> (className == <span class="stringliteral">"sounds"</span>)
00294                                         {
00295                                                 <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerd7">loadSoundsFromPrimitives</a>(*child);
00296                                         }
00297                                         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (className == <span class="stringliteral">"sample_banks"</span>)
00298                                         {
00299                                                 <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerd6">loadSamplesFromPrimitives</a>(*child);
00300                                         }
00301                                         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (className == <span class="stringliteral">"env_fx"</span>)
00302                                         {
00303                                                 <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerd5">loadEffectsFromPrimitives</a>(*child);
00304                                         }
00305                                 }
00306                         }
00307 
00308                         <span class="keywordflow">if</span> (oldState)
00309                                 <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagera10">play</a>();
00310                 }
00311         }
00312         <span class="keywordflow">else</span>
00313         {
00314                 <span class="comment">// try to look in the first child level</span>
00315                 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;audioRoot.<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1899_3">getNumChildren</a>(); ++i)
00316                 {
00317                         <span class="keyword">const</span> <a class="code" href="a03123.html">NLLIGO::IPrimitive</a> *child;
00318                         audioRoot.<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1899_1">getChild</a>(child, i);
00319 
00320                         <span class="keywordflow">if</span> (child-&gt;<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_14">getPropertyByName</a>(<span class="stringliteral">"class"</span>, className))
00321                         {
00322                                 <span class="keywordflow">if</span> (className == <span class="stringliteral">"audio"</span>)
00323                                 {
00324                                         <span class="comment">// recurse in this node</span>
00325                                         <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagera6">loadAudioFromPrimitives</a>(*child);
00326                                         <span class="comment">// don't look any other primitives</span>
00327                                         <span class="keywordflow">break</span>;
00328                                 }
00329                         }
00330                 }
00331         }
00332 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBackgroundSoundManagera7" doxytag="NLSOUND::CBackgroundSoundManager::loadEffecsFromRegion" ></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::CBackgroundSoundManager::loadEffecsFromRegion </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="a03126.html">NLLIGO::CPrimRegion</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>region</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Load the effects from a CPrimRegion class. deprecated
<p>
Definition at line <a class="el" href="a05471.html#l00570">570</a> of file <a class="el" href="a05471.html">background_sound_manager.cpp</a>.
<p>
Referenced by <a class="el" href="a05471.html#l00618">load()</a>, and <a class="el" href="a05465.html#l02107">NLSOUND::CAudioMixerUser::loadBackgroundEffectsFromRegion()</a>.
<p>
<div class="fragment"><pre>00571 {
00572 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBackgroundSoundManagerd5" doxytag="NLSOUND::CBackgroundSoundManager::loadEffectsFromPrimitives" ></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::CBackgroundSoundManager::loadEffectsFromPrimitives </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="a03123.html">NLLIGO::IPrimitive</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>fxRoot</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [private]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Load the sounds from primitive 
<p>
Definition at line <a class="el" href="a05471.html#l00441">441</a> of file <a class="el" href="a05471.html">background_sound_manager.cpp</a>.
<p>
References <a class="el" href="a05472.html#l00305">_FxZones</a>, <a class="el" href="a05471.html#l00473">addFxZone()</a>, <a class="el" href="a06195.html#l01287">NLLIGO::IPrimitive::getChild()</a>, <a class="el" href="a06196.html#l00183">NLLIGO::IPrimitive::getNumChildren()</a>, <a class="el" href="a06195.html#l01102">NLLIGO::IPrimitive::getPropertyByName()</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a05471.html#l00272">loadAudioFromPrimitives()</a>.
<p>
<div class="fragment"><pre>00442 {
00443         std::string className;
00444         <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr5">_FxZones</a>.clear();
00445 
00446         <span class="keywordflow">if</span> (fxRoot.<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_14">getPropertyByName</a>(<span class="stringliteral">"class"</span>, className))
00447         {
00448                 <span class="keywordflow">if</span> (className == <span class="stringliteral">"env_fx"</span>)
00449                 {
00450                         <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;fxRoot.<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1899_3">getNumChildren</a>(); ++i)
00451                         {
00452                                 <span class="keyword">const</span> <a class="code" href="a03123.html">NLLIGO::IPrimitive</a> *child;
00453                                 std::string primName;
00454                                 fxRoot.<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1899_1">getChild</a>(child, i);
00455 
00456                                 <span class="keywordflow">if</span> (child-&gt;<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_14">getPropertyByName</a>(<span class="stringliteral">"class"</span>, className))
00457                                 {
00458                                         child-&gt;<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_14">getPropertyByName</a>(<span class="stringliteral">"name"</span>, primName);
00459                                         <span class="keywordflow">if</span> (className == <span class="stringliteral">"env_fx_zone"</span>)
00460                                         {
00461                                                 std::string fxName;
00462                                                 <span class="keywordflow">if</span> (child-&gt;<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_14">getPropertyByName</a>(<span class="stringliteral">"fx_name"</span>, fxName))
00463                                                 {
00464                                                         <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerd0">addFxZone</a>(fxName, static_cast&lt;const CPrimZone*&gt;(child)-&gt;VPoints);
00465                                                 }
00466                                         }
00467                                 }
00468                         }
00469                 }
00470         }
00471 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBackgroundSoundManagerd6" doxytag="NLSOUND::CBackgroundSoundManager::loadSamplesFromPrimitives" ></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::CBackgroundSoundManager::loadSamplesFromPrimitives </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="a03123.html">NLLIGO::IPrimitive</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>sampleRoot</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [private]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Load the sample banks from primitive 
<p>
Definition at line <a class="el" href="a05471.html#l00410">410</a> of file <a class="el" href="a05471.html">background_sound_manager.cpp</a>.
<p>
References <a class="el" href="a05471.html#l00502">addSampleBank()</a>, <a class="el" href="a06195.html#l01287">NLLIGO::IPrimitive::getChild()</a>, <a class="el" href="a06196.html#l00183">NLLIGO::IPrimitive::getNumChildren()</a>, <a class="el" href="a06195.html#l01102">NLLIGO::IPrimitive::getPropertyByName()</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a05471.html#l00272">loadAudioFromPrimitives()</a>.
<p>
<div class="fragment"><pre>00411 {
00412         std::string className;
00413         <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerz1295_0">_Banks</a>.clear();
00414         <span class="keywordflow">if</span> (sampleRoot.<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_14">getPropertyByName</a>(<span class="stringliteral">"class"</span>, className))
00415         {
00416                 <span class="keywordflow">if</span> (className == <span class="stringliteral">"sample_banks"</span>)
00417                 {
00418                         <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;sampleRoot.<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1899_3">getNumChildren</a>(); ++i)
00419                         {
00420                                 <span class="keyword">const</span> <a class="code" href="a03123.html">NLLIGO::IPrimitive</a> *child;
00421                                 std::string primName;
00422                                 sampleRoot.<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1899_1">getChild</a>(child, i);
00423 
00424                                 <span class="keywordflow">if</span> (child-&gt;<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_14">getPropertyByName</a>(<span class="stringliteral">"class"</span>, className))
00425                                 {
00426                                         child-&gt;<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_14">getPropertyByName</a>(<span class="stringliteral">"name"</span>, primName);
00427                                         <span class="keywordflow">if</span> (className == <span class="stringliteral">"sample_bank_zone"</span>)
00428                                         {
00429                                                 <span class="keyword">const</span> std::vector&lt;std::string&gt; *names;
00430                                                 <span class="keywordflow">if</span> (child-&gt;<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_14">getPropertyByName</a>(<span class="stringliteral">"bank_names"</span>, names))
00431                                                 {
00432                                                         <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerd1">addSampleBank</a>(*names, static_cast&lt;const CPrimZone*&gt;(child)-&gt;VPoints);
00433                                                 }
00434                                         }
00435                                 }
00436                         }
00437                 }
00438         }
00439 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBackgroundSoundManagera8" doxytag="NLSOUND::CBackgroundSoundManager::loadSamplesFromRegion" ></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::CBackgroundSoundManager::loadSamplesFromRegion </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="a03126.html">NLLIGO::CPrimRegion</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>region</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Load the samples banks from a CPrimRegion class. deprecated
<p>
Definition at line <a class="el" href="a05471.html#l00537">537</a> of file <a class="el" href="a05471.html">background_sound_manager.cpp</a>.
<p>
References <a class="el" href="a05471.html#l00502">addSampleBank()</a>, <a class="el" href="a05622.html#l00135">nlwarning</a>, <a class="el" href="a05472.html#l00171">split()</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a06196.html#l00503">NLLIGO::CPrimRegion::VZones</a>.
<p>
Referenced by <a class="el" href="a05471.html#l00618">load()</a>, and <a class="el" href="a05465.html#l02111">NLSOUND::CAudioMixerUser::loadBackgroundSamplesFromRegion()</a>.
<p>
<div class="fragment"><pre>00538 {
00539         <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerz1295_0">_Banks</a>.clear();
00540 
00541         <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt; region.<a class="code" href="a03126.html#NLLIGO_1_1CPrimRegiono6">VZones</a>.size(); ++i)
00542         {
00543                 <span class="keywordflow">if</span> (region.<a class="code" href="a03126.html#NLLIGO_1_1CPrimRegiono6">VZones</a>[i].VPoints.size() &gt; 2)
00544                 {
00545                         <span class="comment">// parse the zone name to find the samples name.</span>
00546                         std::vector&lt;std::string&gt;        splitted = <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerd9">split</a>(region.<a class="code" href="a03126.html#NLLIGO_1_1CPrimRegiono6">VZones</a>[i].Name, <span class="charliteral">'-'</span>);
00547                         std::vector&lt;std::string&gt;        bankNames;
00548 
00549                         <span class="keywordflow">if</span> (splitted.size() &gt; 2)
00550                         {
00551                                 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> j=1; j&lt;splitted.size()-1; ++j)
00552                                 {
00553                                         bankNames.push_back(splitted[j]);
00554                                 }
00555 
00556                                 <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerd1">addSampleBank</a>(bankNames, region.<a class="code" href="a03126.html#NLLIGO_1_1CPrimRegiono6">VZones</a>[i].VPoints);
00557                         }
00558                         <span class="keywordflow">else</span>
00559                         {
00560                                 <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"A sample bank patatoid name did'nt contains banks name '%s'"</span>, region.<a class="code" href="a03126.html#NLLIGO_1_1CPrimRegiono6">VZones</a>[i].Name.c_str());
00561                         }
00562                 }
00563                 <span class="keywordflow">else</span>
00564                 {
00565                         <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"A sample bank patatoid have less than 3 points '%s'"</span>, region.<a class="code" href="a03126.html#NLLIGO_1_1CPrimRegiono6">VZones</a>[i].Name.c_str());
00566                 }
00567         }
00568 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBackgroundSoundManagerd7" doxytag="NLSOUND::CBackgroundSoundManager::loadSoundsFromPrimitives" ></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::CBackgroundSoundManager::loadSoundsFromPrimitives </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="a03123.html">NLLIGO::IPrimitive</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>soundRoot</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [private]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Load the sounds from primitive 
<p>
Definition at line <a class="el" href="a05471.html#l00334">334</a> of file <a class="el" href="a05471.html">background_sound_manager.cpp</a>.
<p>
References <a class="el" href="a05471.html#l00093">addSound()</a>, <a class="el" href="a05472.html#l00051">NLSOUND::BACKGROUND_LAYER</a>, <a class="el" href="a05587.html#l00115">NLMISC::clamp()</a>, <a class="el" href="a06195.html#l01287">NLLIGO::IPrimitive::getChild()</a>, <a class="el" href="a06196.html#l00183">NLLIGO::IPrimitive::getNumChildren()</a>, <a class="el" href="a03123.html#NLLIGO_1_1IPrimitivez1900_3">NLLIGO::IPrimitive::getNumVector()</a>, <a class="el" href="a06195.html#l01102">NLLIGO::IPrimitive::getPropertyByName()</a>, <a class="el" href="a05622.html#l00135">nlwarning</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a05471.html#l00272">loadAudioFromPrimitives()</a>.
<p>
<div class="fragment"><pre>00335 {
00336         std::string className;
00337         <span class="keywordflow">if</span> (soundRoot.<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_14">getPropertyByName</a>(<span class="stringliteral">"class"</span>, className))
00338         {
00339                 <span class="keywordflow">if</span> (className == <span class="stringliteral">"sounds"</span> || className == <span class="stringliteral">"sound_folder"</span>)
00340                 {
00341                         <span class="comment">// ok, it sounds or a sounds foilder</span>
00342                         <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;soundRoot.<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1899_3">getNumChildren</a>(); ++i)
00343                         {
00344                                 <span class="keyword">const</span> <a class="code" href="a03123.html">NLLIGO::IPrimitive</a> *child;
00345                                 std::string primName;
00346                                 soundRoot.<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1899_1">getChild</a>(child, i);
00347 
00348 
00349                                 <span class="keywordflow">if</span> (child-&gt;<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_14">getPropertyByName</a>(<span class="stringliteral">"class"</span>, className))
00350                                 {
00351                                         <a class="code" href="a04558.html#a15">uint</a> layerId = 0;
00352                                         std::string layerString;
00353                                         std::string soundName;
00354                                         <span class="keywordflow">if</span> (child-&gt;<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_14">getPropertyByName</a>(<span class="stringliteral">"layer"</span>, layerString))
00355                                         {
00356                                                 <span class="comment">// extract layer number.</span>
00357                                                 <span class="keywordflow">if</span> (!layerString.empty())
00358                                                 {
00359                                                         <span class="comment">// TODO : handle special case for weather layer</span>
00360                                                         layerId = layerString[layerString.size()-1] - <span class="charliteral">'0'</span>;
00361                                                 }
00362                                                 <a class="code" href="a05378.html#a374">clamp</a>(layerId, 0u, BACKGROUND_LAYER-1);
00363                                         }
00364 
00365                                         child-&gt;<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_14">getPropertyByName</a>(<span class="stringliteral">"name"</span>, primName);
00366                                         child-&gt;<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_14">getPropertyByName</a>(<span class="stringliteral">"sound"</span>, soundName);
00367                                         <span class="comment">// compatibility with older primitive</span>
00368                                         <span class="keywordflow">if</span> (soundName.empty())
00369                                                 soundName = primName;
00370 
00371                                         <span class="keywordflow">if</span> (className == <span class="stringliteral">"sound_zone"</span>)
00372                                         {
00373                                                 <span class="keywordflow">if</span>(child-&gt;<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_3">getNumVector</a>()&gt;2)
00374                                                 {
00375                                                         <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerd3">addSound</a>(soundName, layerId, static_cast&lt;const CPrimZone*&gt;(child)-&gt;VPoints, <span class="keyword">false</span>);
00376                                                 }
00377                                                 <span class="keywordflow">else</span>
00378                                                 {
00379                                                         <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"A background sound patatoid have less than 3 points '%s'"</span>, primName.c_str());
00380                                                 }
00381                                         }
00382                                         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (className == <span class="stringliteral">"sound_path"</span>)
00383                                         {
00384                                                 <span class="keywordflow">if</span>(child-&gt;<a class="code" href="a03123.html#NLLIGO_1_1IPrimitivez1900_3">getNumVector</a>() &gt; 1)
00385                                                 {
00386                                                         <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerd3">addSound</a>(soundName, layerId, static_cast&lt;const CPrimPath*&gt;(child)-&gt;VPoints, <span class="keyword">true</span>);
00387                                                 }
00388                                                 <span class="keywordflow">else</span>
00389                                                 {
00390                                                         <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"A background sound path have less than 2 points '%s'"</span>, primName.c_str());
00391                                                 }
00392                                         }
00393                                         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (className == <span class="stringliteral">"sound_point"</span>)
00394                                         {
00395                                                 std::vector&lt;NLLIGO::CPrimVector&gt;        points;
00396                                                 points.push_back(static_cast&lt;const CPrimPoint*&gt;(child)-&gt;Point);
00397 
00398                                                 <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerd3">addSound</a>(soundName, layerId, points, <span class="keyword">false</span>);
00399                                         }
00400                                         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (className == <span class="stringliteral">"sound_folder"</span>)
00401                                         {
00402                                                 <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerd7">loadSoundsFromPrimitives</a>(*child);
00403                                         }
00404                                 }
00405                         }
00406                 }
00407         }
00408 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBackgroundSoundManagera9" doxytag="NLSOUND::CBackgroundSoundManager::loadSoundsFromRegion" ></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::CBackgroundSoundManager::loadSoundsFromRegion </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="a03126.html">NLLIGO::CPrimRegion</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>region</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Load the background sounds from a CPrimRegion class. deprecated
<p>
Definition at line <a class="el" href="a05471.html#l00574">574</a> of file <a class="el" href="a05471.html">background_sound_manager.cpp</a>.
<p>
References <a class="el" href="a05472.html#l00195">_Playing</a>, <a class="el" href="a05471.html#l00093">addSound()</a>, <a class="el" href="a05622.html#l00135">nlwarning</a>, <a class="el" href="a05471.html#l00778">play()</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05471.html#l00823">unload()</a>, <a class="el" href="a06196.html#l00504">NLLIGO::CPrimRegion::VPaths</a>, <a class="el" href="a06196.html#l00502">NLLIGO::CPrimRegion::VPoints</a>, and <a class="el" href="a06196.html#l00503">NLLIGO::CPrimRegion::VZones</a>.
<p>
Referenced by <a class="el" href="a05471.html#l00618">load()</a>, and <a class="el" href="a05465.html#l02102">NLSOUND::CAudioMixerUser::loadBackgroundSoundFromRegion()</a>.
<p>
<div class="fragment"><pre>00575 {
00576         <a class="code" href="a04558.html#a15">uint</a> i;
00577         <span class="comment">// remember playing state</span>
00578         <span class="keywordtype">bool</span> oldState = <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr8">_Playing</a>;
00579         <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagera15">unload</a>();
00580 
00581         <span class="keywordflow">for</span> (i = 0; i &lt; region.<a class="code" href="a03126.html#NLLIGO_1_1CPrimRegiono6">VZones</a>.size(); i++)
00582         {
00583                 <span class="keywordflow">if</span>(region.<a class="code" href="a03126.html#NLLIGO_1_1CPrimRegiono6">VZones</a>[i].VPoints.size()&gt;2)
00584                 {
00585                         <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerd3">addSound</a>(region.<a class="code" href="a03126.html#NLLIGO_1_1CPrimRegiono6">VZones</a>[i].Name, region.<a class="code" href="a03126.html#NLLIGO_1_1CPrimRegiono6">VZones</a>[i].VPoints, <span class="keyword">false</span>);
00586                 }
00587                 <span class="keywordflow">else</span>
00588                 {
00589                         <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"A background sound patatoid have less than 3 points '%s'"</span>, region.<a class="code" href="a03126.html#NLLIGO_1_1CPrimRegiono6">VZones</a>[i].Name.c_str());
00590                 }
00591         }
00592 
00593         <span class="keywordflow">for</span> (i = 0; i &lt; region.<a class="code" href="a03126.html#NLLIGO_1_1CPrimRegiono4">VPaths</a>.size(); i++)
00594         {
00595                 <span class="keywordflow">if</span>(region.<a class="code" href="a03126.html#NLLIGO_1_1CPrimRegiono4">VPaths</a>[i].VPoints.size() &gt; 1)
00596                 {
00597                         <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerd3">addSound</a>(region.<a class="code" href="a03126.html#NLLIGO_1_1CPrimRegiono4">VPaths</a>[i].Name, region.<a class="code" href="a03126.html#NLLIGO_1_1CPrimRegiono4">VPaths</a>[i].VPoints, <span class="keyword">true</span>);
00598                 }
00599                 <span class="keywordflow">else</span>
00600                 {
00601                         <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"A background sound path have less than 2 points '%s'"</span>, region.<a class="code" href="a03126.html#NLLIGO_1_1CPrimRegiono4">VPaths</a>[i].Name.c_str());
00602                 }
00603         }
00604         <span class="keywordflow">for</span> (i = 0; i &lt; region.<a class="code" href="a03126.html#NLLIGO_1_1CPrimRegiono5">VPoints</a>.size(); i++)
00605         {
00606                 std::vector&lt;CPrimVector&gt;        points;
00607                 points.push_back(region.<a class="code" href="a03126.html#NLLIGO_1_1CPrimRegiono5">VPoints</a>[i].Point);
00608 
00609                 <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerd3">addSound</a>(region.<a class="code" href="a03126.html#NLLIGO_1_1CPrimRegiono5">VPoints</a>[i].Name, points, <span class="keyword">false</span>);
00610         }
00611 
00612 
00613         <span class="comment">// restart playing ?</span>
00614         <span class="keywordflow">if</span> (oldState)
00615                 <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagera10">play</a>();
00616 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBackgroundSoundManagerd8" doxytag="NLSOUND::CBackgroundSoundManager::onUpdate" ></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::CBackgroundSoundManager::onUpdate </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [private, virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Implements <a class="el" href="a02239.html#NLSOUND_1_1CAudioMixerUser_1_1IMixerUpdatea0">NLSOUND::CAudioMixerUser::IMixerUpdate</a>.
<p>
Definition at line <a class="el" href="a05471.html#l01341">1341</a> of file <a class="el" href="a05471.html">background_sound_manager.cpp</a>.
<p>
References <a class="el" href="a05471.html#l00861">updateBackgroundStatus()</a>.
<p>
<div class="fragment"><pre>01342 {
01343         <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagera16">updateBackgroundStatus</a>();
01344 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBackgroundSoundManagera10" doxytag="NLSOUND::CBackgroundSoundManager::play" ></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::CBackgroundSoundManager::play </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Start to play the background sound. 
<p>

<p>
Definition at line <a class="el" href="a05471.html#l00778">778</a> of file <a class="el" href="a05471.html">background_sound_manager.cpp</a>.
<p>
References <a class="el" href="a05472.html#l00198">_BackgroundFlags</a>, <a class="el" href="a05472.html#l00206">_DoFade</a>, <a class="el" href="a05472.html#l00202">_FilterFadesStart</a>, <a class="el" href="a05472.html#l00204">_FilterFadeValues</a>, <a class="el" href="a05472.html#l00195">_Playing</a>, <a class="el" href="a06594.html#l00097">NLSOUND::UAudioMixer::TBackgroundFlags::Flags</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05471.html#l00861">updateBackgroundStatus()</a>.
<p>
Referenced by <a class="el" href="a05471.html#l00272">loadAudioFromPrimitives()</a>, <a class="el" href="a05471.html#l00574">loadSoundsFromRegion()</a>, and <a class="el" href="a05465.html#l02121">NLSOUND::CAudioMixerUser::playBackgroundSound()</a>.
<p>
<div class="fragment"><pre>00779 {
00780         <span class="keywordflow">if</span> (<a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr8">_Playing</a>)
00781                 <span class="keywordflow">return</span>;
00782 
00783         <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr8">_Playing</a> = <span class="keyword">true</span>;
00784 
00785         CAudioMixerUser::instance()-&gt;registerUpdate(<span class="keyword">this</span>);
00786 
00787         <span class="comment">// init the filter value and filter start time</span>
00788         <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> i =0; i&lt;UAudioMixer::TBackgroundFlags::NB_BACKGROUND_FLAGS; ++i)
00789         {
00790                 <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr3">_FilterFadesStart</a>[i] = 0;
00791                 <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr4">_FilterFadeValues</a>[i] = 1.0f * !<a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr1">_BackgroundFlags</a>.Flags[i];
00792         }
00793         <span class="comment">// force an initial filtering </span>
00794         <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr2">_DoFade</a> = <span class="keyword">true</span>;
00795         <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagera16">updateBackgroundStatus</a>();
00796 
00797         
00798 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBackgroundSoundManagera11" doxytag="NLSOUND::CBackgroundSoundManager::setBackgroundFilterFades" ></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::CBackgroundSoundManager::setBackgroundFilterFades </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="a03920.html">UAudioMixer::TBackgroundFilterFades</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>backgroundFilterFades</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05471.html#l00082">82</a> of file <a class="el" href="a05471.html">background_sound_manager.cpp</a>.
<p>
References <a class="el" href="a05472.html#l00200">_BackgroundFilterFades</a>.
<p>
Referenced by <a class="el" href="a05465.html#l02096">NLSOUND::CAudioMixerUser::setBackgroundFilterFades()</a>.
<p>
<div class="fragment"><pre>00083 {
00084         <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr0">_BackgroundFilterFades</a> = backgroundFilterFades;
00085 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBackgroundSoundManagera12" doxytag="NLSOUND::CBackgroundSoundManager::setBackgroundFlags" ></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::CBackgroundSoundManager::setBackgroundFlags </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="a03921.html">UAudioMixer::TBackgroundFlags</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>backgroundFlags</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Set the background flags. 
<p>

<p>
Definition at line <a class="el" href="a05471.html#l01312">1312</a> of file <a class="el" href="a05471.html">background_sound_manager.cpp</a>.
<p>
References <a class="el" href="a05472.html#l00200">_BackgroundFilterFades</a>, <a class="el" href="a05472.html#l00198">_BackgroundFlags</a>, <a class="el" href="a05472.html#l00206">_DoFade</a>, <a class="el" href="a05472.html#l00202">_FilterFadesStart</a>, <a class="el" href="a05472.html#l00204">_FilterFadeValues</a>, <a class="el" href="a06594.html#l00111">NLSOUND::UAudioMixer::TBackgroundFilterFades::FadeIns</a>, <a class="el" href="a06594.html#l00112">NLSOUND::UAudioMixer::TBackgroundFilterFades::FadeOuts</a>, <a class="el" href="a06594.html#l00097">NLSOUND::UAudioMixer::TBackgroundFlags::Flags</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a06590.html#l00221">uint64</a>.
<p>
Referenced by <a class="el" href="a05465.html#l02091">NLSOUND::CAudioMixerUser::setBackgroundFlags()</a>.
<p>
<div class="fragment"><pre>01313 {
01314         <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;UAudioMixer::TBackgroundFlags::NB_BACKGROUND_FLAGS; ++i)
01315         {
01316                 <span class="keywordflow">if</span> (<a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr1">_BackgroundFlags</a>.Flags[i] != backgroundFlags.Flags[i])
01317                 {
01318                         <span class="comment">// the filter flags has changed ! </span>
01319                         <span class="keywordflow">if</span> (backgroundFlags.Flags[i])
01320                         {
01321                                 <span class="comment">// the filter is activated, to a fade out</span>
01322                                 <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr3">_FilterFadesStart</a>[i] = <a class="code" href="a05167.html#a15">uint64</a>(NLMISC::CTime::getLocalTime() - (1-_FilterFadeValues[i]) * <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr0">_BackgroundFilterFades</a>.FadeOuts[i]);
01323                                 <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr2">_DoFade</a> = <span class="keyword">true</span>;
01324                         }
01325                         <span class="keywordflow">else</span>
01326                         {
01327                                 <span class="comment">// the filter is cleared, do a fade in</span>
01328                                 <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr3">_FilterFadesStart</a>[i] = <a class="code" href="a05167.html#a15">uint64</a>(NLMISC::CTime::getLocalTime() - (_FilterFadeValues[i]) * <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr0">_BackgroundFilterFades</a>.FadeIns[i]);
01329                                 <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr2">_DoFade</a> = <span class="keyword">true</span>;
01330                         }
01331                 }
01332 
01333                 <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr1">_BackgroundFlags</a>.Flags[i] = backgroundFlags.Flags[i];
01334         }
01335 
01336         <span class="keywordflow">if</span> (<a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr2">_DoFade</a>)
01337                 CAudioMixerUser::instance()-&gt;registerUpdate(<span class="keyword">this</span>);
01338 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBackgroundSoundManagera13" doxytag="NLSOUND::CBackgroundSoundManager::setListenerPosition" ></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::CBackgroundSoundManager::setListenerPosition </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const <a class="el" href="a03128.html">NLMISC::CVector</a> &amp;&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>listenerPosition</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Call this method when the listener position change. 
<p>

<p>
Definition at line <a class="el" href="a05471.html#l00850">850</a> of file <a class="el" href="a05471.html">background_sound_manager.cpp</a>.
<p>
References <a class="el" href="a05472.html#l00209">_LastPosition</a>, and <a class="el" href="a05471.html#l00861">updateBackgroundStatus()</a>.
<p>
Referenced by <a class="el" href="a05465.html#l01983">NLSOUND::CAudioMixerUser::setListenerPos()</a>.
<p>
<div class="fragment"><pre>00851 {
00852         <span class="keywordflow">if</span> (<a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr7">_LastPosition</a> == listenerPosition)
00853         {
00854                 <span class="keywordflow">return</span>;
00855         }
00856         <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr7">_LastPosition</a> = listenerPosition;
00857 
00858         <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagera16">updateBackgroundStatus</a>();
00859 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBackgroundSoundManagerd9" doxytag="NLSOUND::CBackgroundSoundManager::split" ></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" colspan="4">
template&lt;class CharType&gt; </td>
        </tr>
        <tr>
          <td class="md" nowrap valign="top"> std::vector&lt;std::basic_string&lt;CharType&gt; &gt; NLSOUND::CBackgroundSoundManager::split </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const std::basic_string&lt; CharType &gt; &amp;&nbsp;</td>
          <td class="mdname" nowrap> <em>str</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>CharType&nbsp;</td>
          <td class="mdname" nowrap> <em>splitTag</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [inline, private]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
TODO : Utility... should be in <a class="el" href="a05378.html">NLMISC</a> ? 
<p>

<p>
Definition at line <a class="el" href="a05472.html#l00171">171</a> of file <a class="el" href="a05472.html">background_sound_manager.h</a>.
<p>
References <a class="el" href="a05646.html#l00645">size</a>.
<p>
Referenced by <a class="el" href="a05471.html#l00537">loadSamplesFromRegion()</a>.
<p>
<div class="fragment"><pre>00172         {
00173                 std::vector&lt;std::basic_string&lt;CharType&gt; &gt;       splitted;
00174                 std::basic_string&lt;CharType&gt;::size_type pos = 0, nextPos = 0, <a class="code" href="a04223.html#a587">size</a> = 0;
00175 
00176                 <span class="keywordflow">while</span> ((nextPos = str.find(splitTag, nextPos)) != std::basic_string&lt;CharType&gt;::npos)
00177                 {
00178                         <a class="code" href="a04223.html#a587">size</a> = nextPos - pos;
00179                         <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a587">size</a> &gt; 0)
00180                                 splitted.push_back(std::basic_string&lt;CharType&gt;(str, pos, nextPos - pos));
00181                         <span class="comment">// skip the tag</span>
00182                         nextPos += 1;
00183                         pos = nextPos;
00184                 }
00185                 <span class="comment">// is there a last part ?</span>
00186                 <a class="code" href="a04223.html#a587">size</a> = nextPos - pos;
00187                 <span class="keywordflow">if</span> (pos != str.size())
00188                         splitted.push_back(std::basic_string&lt;CharType&gt;(str, pos, str.size() - pos));
00189 
00190                 <span class="keywordflow">return</span> splitted;
00191         }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBackgroundSoundManagera14" doxytag="NLSOUND::CBackgroundSoundManager::stop" ></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::CBackgroundSoundManager::stop </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Stop the background sound. 
<p>

<p>
Definition at line <a class="el" href="a05471.html#l00801">801</a> of file <a class="el" href="a05471.html">background_sound_manager.cpp</a>.
<p>
References <a class="el" href="a05472.html#l00265">_Layers</a>, <a class="el" href="a05472.html#l00195">_Playing</a>, <a class="el" href="a05472.html#l00051">NLSOUND::BACKGROUND_LAYER</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05465.html#l02060">NLSOUND::CAudioMixerUser::unregisterUpdate()</a>.
<p>
Referenced by <a class="el" href="a05465.html#l02126">NLSOUND::CAudioMixerUser::stopBackgroundSound()</a>, and <a class="el" href="a05471.html#l00823">unload()</a>.
<p>
<div class="fragment"><pre>00802 {
00803         <span class="keywordflow">if</span>(!<a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr8">_Playing</a>)
00804                 <span class="keywordflow">return</span>;
00805         <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagern0">CAudioMixerUser</a> *mixer = CAudioMixerUser::instance();
00806         
00807         <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;<a class="code" href="a05381.html#a4">BACKGROUND_LAYER</a>; ++i)
00808         {
00809                 <span class="comment">// stop all playing source</span>
00810                 std::vector&lt;TSoundData&gt;::iterator first(_Layers[i].begin()), last(_Layers[i].end());
00811                 <span class="keywordflow">for</span> (; first != last; ++first)
00812                 {
00813                         <span class="keywordflow">if</span> (first-&gt;Source != 0 &amp;&amp; first-&gt;Source-&gt;isPlaying())
00814                                 first-&gt;Source-&gt;stop();
00815                 }
00816         }
00817 
00818         CAudioMixerUser::instance()-&gt;unregisterUpdate(<span class="keyword">this</span>);
00819 
00820         <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr8">_Playing</a> = <span class="keyword">false</span>;
00821 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBackgroundSoundManagera15" doxytag="NLSOUND::CBackgroundSoundManager::unload" ></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::CBackgroundSoundManager::unload </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Remove all data about the current continents
<p>
Definition at line <a class="el" href="a05471.html#l00823">823</a> of file <a class="el" href="a05471.html">background_sound_manager.cpp</a>.
<p>
References <a class="el" href="a05472.html#l00265">_Layers</a>, <a class="el" href="a05472.html#l00051">NLSOUND::BACKGROUND_LAYER</a>, <a class="el" href="a05471.html#l00801">stop()</a>, and <a class="el" href="a05981.html#l00105">uint</a>.
<p>
Referenced by <a class="el" href="a05471.html#l00272">loadAudioFromPrimitives()</a>, <a class="el" href="a05471.html#l00574">loadSoundsFromRegion()</a>, and <a class="el" href="a05471.html#l00071">~CBackgroundSoundManager()</a>.
<p>
<div class="fragment"><pre>00824 {
00825         <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagera14">stop</a>();
00826 
00827         <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagern0">CAudioMixerUser</a> *mixer = CAudioMixerUser::instance();
00828         
00829         <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;<a class="code" href="a05381.html#a4">BACKGROUND_LAYER</a>; ++i)
00830         {
00831                 <span class="comment">// delete all created source</span>
00832                 std::vector&lt;TSoundData&gt;::iterator first(_Layers[i].begin()), last(_Layers[i].end());
00833                 <span class="keywordflow">for</span> (; first != last; ++first)
00834                 {
00835                         <span class="keywordflow">if</span> (first-&gt;Source)
00836 <span class="comment">//                              mixer-&gt;removeSource(first-&gt;Source);</span>
00837                                 <span class="keyword">delete</span> first-&gt;Source;
00838                 }
00839 
00840                 <span class="comment">// and free the layer.</span>
00841                 <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerz1296_0">_Layers</a>[i].clear();
00842         }
00843 
00844         <span class="comment">// erase the sample banks zone</span>
00845         <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerz1295_0">_Banks</a>.clear();
00846 
00847         <span class="comment">// TODO : erase the fx zones</span>
00848 }
</pre></div>    </td>
  </tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBackgroundSoundManagera16" doxytag="NLSOUND::CBackgroundSoundManager::updateBackgroundStatus" ></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::CBackgroundSoundManager::updateBackgroundStatus </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Call this method to update the background sound (sub method of setListenerPosition). 
<p>
Status of all selected sound ordered by surface. 
<p>
Definition at line <a class="el" href="a05471.html#l00861">861</a> of file <a class="el" href="a05471.html">background_sound_manager.cpp</a>.
<p>
References <a class="el" href="a05472.html#l00200">_BackgroundFilterFades</a>, <a class="el" href="a05472.html#l00198">_BackgroundFlags</a>, <a class="el" href="a05472.html#l00206">_DoFade</a>, <a class="el" href="a05472.html#l00202">_FilterFadesStart</a>, <a class="el" href="a05472.html#l00204">_FilterFadeValues</a>, <a class="el" href="a05472.html#l00305">_FxZones</a>, <a class="el" href="a05472.html#l00307">_LastEnv</a>, <a class="el" href="a05472.html#l00209">_LastPosition</a>, <a class="el" href="a05472.html#l00265">_Layers</a>, <a class="el" href="a05472.html#l00231">_LoadedBanks</a>, <a class="el" href="a05472.html#l00195">_Playing</a>, <a class="el" href="a05472.html#l00051">NLSOUND::BACKGROUND_LAYER</a>, <a class="el" href="a05471.html#l00056">NLSOUND::BACKGROUND_SOUND_ALTITUDE</a>, <a class="el" href="a06428.html#l00103">NLSOUND::CSourceCommon::checkup()</a>, <a class="el" href="a05587.html#l00115">NLMISC::clamp()</a>, <a class="el" href="a05646.html#l00240">count</a>, <a class="el" href="a05465.html#l01732">NLSOUND::CAudioMixerUser::createSource()</a>, <a class="el" href="a06594.html#l00111">NLSOUND::UAudioMixer::TBackgroundFilterFades::FadeIns</a>, <a class="el" href="a06594.html#l00112">NLSOUND::UAudioMixer::TBackgroundFilterFades::FadeOuts</a>, <a class="el" href="a06594.html#l00097">NLSOUND::UAudioMixer::TBackgroundFlags::Flags</a>, <a class="el" href="a05472.html#l00276">NLSOUND::CBackgroundSoundManager::TSoundStatus::Gain</a>, <a class="el" href="a05466.html#l00295">NLSOUND::CAudioMixerUser::getClusteredSound()</a>, <a class="el" href="a05565.html#l00459">NLSOUND::CClusteredSound::getClusterSoundStatus()</a>, <a class="el" href="a05466.html#l00229">NLSOUND::CAudioMixerUser::getListener()</a>, <a class="el" href="a06552.html#l00055">NLMISC::CTime::getLocalTime()</a>, <a class="el" href="a05565.html#l00472">NLSOUND::CClusteredSound::getRootCluster()</a>, <a class="el" href="a02254.html#NLSOUND_1_1CSourceCommona14">NLSOUND::CSourceCommon::getType()</a>, <a class="el" href="a05788.html#l00054">H_AFTER</a>, <a class="el" href="a05788.html#l00056">H_AUTO</a>, <a class="el" href="a05788.html#l00053">H_BEFORE</a>, <a class="el" href="a05472.html#l00280">NLSOUND::CBackgroundSoundManager::TSoundStatus::Inside</a>, <a class="el" href="a05471.html#l00055">NLSOUND::INSIDE_FALLOF</a>, <a class="el" href="a05472.html#l00256">NLSOUND::CBackgroundSoundManager::TSoundData::IsPath</a>, <a class="el" href="a06428.html#l00064">NLSOUND::CSourceCommon::isPlaying()</a>, <a class="el" href="a05465.html#l01803">NLSOUND::CAudioMixerUser::loadSampleBank()</a>, <a class="el" href="a05472.html#l00254">NLSOUND::CBackgroundSoundManager::TSoundData::MaxDist</a>, <a class="el" href="a06427.html#l00107">NLSOUND::CSourceCommon::play()</a>, <a class="el" href="a05472.html#l00258">NLSOUND::CBackgroundSoundManager::TSoundData::Points</a>, <a class="el" href="a05472.html#l00272">NLSOUND::CBackgroundSoundManager::TSoundStatus::Position</a>, <a class="el" href="a05566.html#l00071">NLSOUND::CClusteredSound::CClusterSoundStatus::Position</a>, <a class="el" href="a05472.html#l00260">NLSOUND::CBackgroundSoundManager::TSoundData::Selected</a>, <a class="el" href="a03861.html#NLSOUND_1_1IListenerz1318_2">NLSOUND::IListener::setEnvironment()</a>, <a class="el" href="a05563.html#l00093">NL3D::CCluster::setEnvironmentFx()</a>, <a class="el" href="a06427.html#l00133">NLSOUND::CSourceCommon::setPos()</a>, <a class="el" href="a06427.html#l00195">NLSOUND::CSourceCommon::setRelativeGain()</a>, <a class="el" href="a05472.html#l00243">NLSOUND::CBackgroundSoundManager::TSoundData::Sound</a>, <a class="el" href="a05472.html#l00270">NLSOUND::CBackgroundSoundManager::TSoundStatus::SoundData</a>, <a class="el" href="a05472.html#l00245">NLSOUND::CBackgroundSoundManager::TSoundData::Source</a>, <a class="el" href="a06427.html#l00120">NLSOUND::CSourceCommon::stop()</a>, <a class="el" href="a05472.html#l00252">NLSOUND::CBackgroundSoundManager::TSoundData::Surface</a>, <a class="el" href="a05981.html#l00105">uint</a>, <a class="el" href="a05465.html#l01838">NLSOUND::CAudioMixerUser::unloadSampleBank()</a>, <a class="el" href="a05465.html#l02060">NLSOUND::CAudioMixerUser::unregisterUpdate()</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::x</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::y</a>, and <a class="el" href="a06673.html#l00051">NLMISC::CVector::z</a>.
<p>
Referenced by <a class="el" href="a05465.html#l01122">NLSOUND::CAudioMixerUser::applyListenerMove()</a>, <a class="el" href="a05471.html#l01341">onUpdate()</a>, <a class="el" href="a05471.html#l00778">play()</a>, <a class="el" href="a05471.html#l00850">setListenerPosition()</a>, and <a class="el" href="a05465.html#l01268">NLSOUND::CAudioMixerUser::update()</a>.
<p>
<div class="fragment"><pre>00862 {
00863         <a class="code" href="a04365.html#a4">H_AUTO</a>(NLSOUND_UpdateBackgroundSound)
00864         <span class="keywordflow">if</span> (!<a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr8">_Playing</a>)
00865                 <span class="keywordflow">return</span>;
00866 
00867         <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagern0">CAudioMixerUser</a> *mixer = CAudioMixerUser::instance();
00868 
00869 
00870         <span class="comment">// it s on 2d so we don't have z</span>
00871         CVector listener = <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr7">_LastPosition</a>;
00872         listener.<a class="code" href="a03128.html#NLMISC_1_1CVectoro2">z</a> = 0.0f;
00873 
00874         <span class="comment">// special case for clustered sound management. If the listener is not</span>
00875         <span class="comment">// in the global cluster, it's background listening place could be different</span>
00876         CClusteredSound *clusteredSound = mixer-&gt;getClusteredSound();
00877         <span class="keywordflow">if</span> (clusteredSound != 0)
00878         {
00879                 <span class="keyword">const</span> CClusteredSound::CClusterSoundStatus *css = clusteredSound-&gt;getClusterSoundStatus(clusteredSound-&gt;getRootCluster());
00880                 <span class="keywordflow">if</span> (css != 0)
00881                 {
00882                         listener = css-&gt;Position;
00883                         listener.z = 0.0f;
00884                 }
00885         }
00886 
00887         <span class="comment">// evalutate the current env fx</span>
00888         {
00889                 <a class="code" href="a04365.html#a4">H_AUTO</a>(NLSOUND_EvaluateEnvFx)
00890                 <a class="code" href="a02362.html">NL3D::CCluster</a> *rootCluster = 0;
00891                 <span class="keywordflow">if</span> (mixer-&gt;getClusteredSound())
00892                         rootCluster = mixer-&gt;getClusteredSound()-&gt;getRootCluster();
00893 
00894                 std::vector&lt;TFxZone&gt;::iterator first(<a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr5">_FxZones</a>.begin()), last(<a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr5">_FxZones</a>.end());
00895                 <span class="keywordflow">for</span> (; first != last; ++first)
00896                 {
00897                         <span class="keywordflow">if</span> (listener.x &gt;= first-&gt;MinBox.x &amp;&amp; listener.x &lt;= first-&gt;MaxBox.x
00898                                 &amp;&amp; listener.y &gt;= first-&gt;MinBox.y &amp;&amp; listener.y &lt;= first-&gt;MaxBox.y
00899                                 )
00900                         {
00901                                 <span class="comment">// bounding box ok, </span>
00902                                 <span class="keywordflow">if</span> (CPrimZone::contains(listener, first-&gt;Points))
00903                                 {
00904                                         <span class="comment">// stop at the first zone !</span>
00905                                         <span class="keywordflow">if</span> (rootCluster)
00906                                         {
00907                                                 <span class="comment">// use the cluster system</span>
00908                                                 rootCluster-&gt;<a class="code" href="a02362.html#NL3D_1_1CClusterz68_5">setEnvironmentFx</a>(first-&gt;FxName);
00909                                         }
00910                                         <span class="keywordflow">else</span>
00911                                         {
00912                                                 <span class="comment">// no cluster system, set the env 'manualy'</span>
00913                                                 IListener *drvListener = static_cast&lt;CListenerUser*&gt;(mixer-&gt;getListener())-&gt;getListener();
00914 
00915                                                 <span class="keywordflow">if</span> (<a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr6">_LastEnv</a> != first-&gt;FxName)
00916                                                 {
00917                                                         <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr6">_LastEnv</a> = first-&gt;FxName;
00918                                                         <a class="code" href="a04558.html#a15">uint</a> envNum;
00919                                                         <span class="keywordflow">if</span> (first-&gt;FxName == CStringMapper::map(<span class="stringliteral">"GENERIC"</span>))
00920                                                                 envNum = 0;
00921                                                         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (first-&gt;FxName == CStringMapper::map(<span class="stringliteral">"PADDEDCELL"</span>))
00922                                                                 envNum = 1;
00923                                                         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (first-&gt;FxName == CStringMapper::map(<span class="stringliteral">"ROOM"</span>))
00924                                                                 envNum = 2;
00925                                                         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (first-&gt;FxName == CStringMapper::map(<span class="stringliteral">"BATHROOM"</span>))
00926                                                                 envNum = 3;
00927                                                         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (first-&gt;FxName == CStringMapper::map(<span class="stringliteral">"LIVINGROOM"</span>))
00928                                                                 envNum = 4;
00929                                                         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (first-&gt;FxName == CStringMapper::map(<span class="stringliteral">"STONEROOM"</span>))
00930                                                                 envNum = 5;
00931                                                         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (first-&gt;FxName == CStringMapper::map(<span class="stringliteral">"AUDITORIUM"</span>))
00932                                                                 envNum = 6;
00933                                                         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (first-&gt;FxName == CStringMapper::map(<span class="stringliteral">"CONCERTHALL"</span>))
00934                                                                 envNum = 7;
00935                                                         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (first-&gt;FxName == CStringMapper::map(<span class="stringliteral">"CAVE"</span>))
00936                                                                 envNum = 8;
00937                                                         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (first-&gt;FxName == CStringMapper::map(<span class="stringliteral">"ARENA"</span>))
00938                                                                 envNum = 9;
00939                                                         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (first-&gt;FxName == CStringMapper::map(<span class="stringliteral">"HANGAR"</span>))
00940                                                                 envNum = 10;
00941                                                         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (first-&gt;FxName == CStringMapper::map(<span class="stringliteral">"CARPETEDHALLWAY"</span>))
00942                                                                 envNum = 11;
00943                                                         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (first-&gt;FxName == CStringMapper::map(<span class="stringliteral">"HALLWAY"</span>))
00944                                                                 envNum = 12;
00945                                                         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (first-&gt;FxName == CStringMapper::map(<span class="stringliteral">"STONECORRIDOR"</span>))
00946                                                                 envNum = 13;
00947                                                         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (first-&gt;FxName == CStringMapper::map(<span class="stringliteral">"ALLEY"</span>))
00948                                                                 envNum = 14;
00949                                                         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (first-&gt;FxName == CStringMapper::map(<span class="stringliteral">"FOREST"</span>))
00950                                                                 envNum = 15;
00951                                                         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (first-&gt;FxName == CStringMapper::map(<span class="stringliteral">"CITY"</span>))
00952                                                                 envNum = 16;
00953                                                         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (first-&gt;FxName == CStringMapper::map(<span class="stringliteral">"MOUNTAINS"</span>))
00954                                                                 envNum = 16;
00955                                                         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (first-&gt;FxName == CStringMapper::map(<span class="stringliteral">"QUARRY"</span>))
00956                                                                 envNum = 17;
00957                                                         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (first-&gt;FxName == CStringMapper::map(<span class="stringliteral">"PLAIN"</span>))
00958                                                                 envNum = 18;
00959                                                         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (first-&gt;FxName == CStringMapper::map(<span class="stringliteral">"PARKINGLOT"</span>))
00960                                                                 envNum = 19;
00961                                                         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (first-&gt;FxName == CStringMapper::map(<span class="stringliteral">"SEWERPIPE"</span>))
00962                                                                 envNum = 20;
00963                                                         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (first-&gt;FxName == CStringMapper::map(<span class="stringliteral">"UNDERWATER"</span>))
00964                                                                 envNum = 21;
00965                                                         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (first-&gt;FxName == CStringMapper::map(<span class="stringliteral">"DRUGGED"</span>))
00966                                                                 envNum = 22;
00967                                                         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (first-&gt;FxName == CStringMapper::map(<span class="stringliteral">"DIZZY"</span>))
00968                                                                 envNum = 23;
00969                                                         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (first-&gt;FxName == CStringMapper::map(<span class="stringliteral">"PSYCHOTIC"</span>))
00970                                                                 envNum = 24;
00971                                                         <span class="keywordflow">else</span>
00972                                                                 envNum = 18;
00973 
00974                                                         drvListener-&gt;setEnvironment(envNum, 10);
00975                                                 }
00976                                         }
00977                                         <span class="keywordflow">break</span>;
00978                                 }
00979                         }
00980                 }
00981         }
00982 
00983 
00984         <span class="comment">// compute the list of load/unload banks.</span>
00985         {
00986                 <a class="code" href="a04365.html#a4">H_AUTO</a>(NLSOUND_LoadUnloadSampleBank)
00987                 <span class="comment">// set of bank that must be in ram.</span>
00988                 std::set&lt;std::string&gt;   newBanks;
00989 
00990                 std::vector&lt;TBanksData&gt;::iterator first(<a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerz1295_0">_Banks</a>.begin()), last(<a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerz1295_0">_Banks</a>.end());
00991                 <span class="keywordflow">for</span> (; first != last; ++first)
00992                 {
00993                         <span class="keywordflow">if</span> (listener.x &gt;= first-&gt;MinBox.x &amp;&amp; listener.x &lt;= first-&gt;MaxBox.x
00994                                 &amp;&amp; listener.y &gt;= first-&gt;MinBox.y &amp;&amp; listener.y &lt;= first-&gt;MaxBox.y
00995                                 )
00996                         {
00997                                 <span class="comment">// bounding box ok, </span>
00998                                 <span class="keywordflow">if</span> (CPrimZone::contains(listener, first-&gt;Points))
00999                                 {
01000                                         <span class="comment">// add the banks of this zone in the n</span>
01001                                         newBanks.insert(first-&gt;Banks.begin(), first-&gt;Banks.end());
01002                                 }
01003                         }
01004                 }
01005 
01006 <span class="comment">/*              {</span>
01007 <span class="comment">                        nldebug("-----------------------------");</span>
01008 <span class="comment">                        nldebug("Loaded sample banks (%u elements):", _LoadedBanks.size());</span>
01009 <span class="comment">                        set&lt;string&gt;::iterator first(_LoadedBanks.begin()), last(_LoadedBanks.end());</span>
01010 <span class="comment">                        for (; first != last; ++first)</span>
01011 <span class="comment">                        {</span>
01012 <span class="comment">                                const string &amp;str = *first;</span>
01013 <span class="comment">                                nldebug("  %s", first-&gt;c_str());</span>
01014 <span class="comment">                        }</span>
01015 <span class="comment">                }</span>
01016 <span class="comment">                {</span>
01017 <span class="comment">                        nldebug("New Sample bank list (%u elements):", newBanks.size());</span>
01018 <span class="comment">                        set&lt;string&gt;::iterator first(newBanks.begin()), last(newBanks.end());</span>
01019 <span class="comment">                        for (; first != last; ++first)</span>
01020 <span class="comment">                        {</span>
01021 <span class="comment">                                const string &amp;str = *first;</span>
01022 <span class="comment">                                nldebug("  %s", first-&gt;c_str());</span>
01023 <span class="comment">                        }</span>
01024 <span class="comment">                }</span>
01025 <span class="comment">*/</span>
01026                 <span class="comment">// ok, now compute to set : the set of bank to load, and the set of banks to unload.</span>
01027                 std::set&lt;std::string&gt;   noChange;
01028                 std::set_intersection(<a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerz1295_1">_LoadedBanks</a>.begin(), <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerz1295_1">_LoadedBanks</a>.end(), newBanks.begin(), newBanks.end(), std::inserter(noChange, noChange.end()));
01029 
01030                 std::set&lt;std::string&gt;   loadList; 
01031                 std::set_difference(newBanks.begin(), newBanks.end(), noChange.begin(), noChange.end(), std::inserter(loadList, loadList.end()));
01032 
01033                 std::set&lt;std::string&gt;   unloadList;
01034                 std::set_difference(<a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerz1295_1">_LoadedBanks</a>.begin(), <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerz1295_1">_LoadedBanks</a>.end(), newBanks.begin(), newBanks.end(), std::inserter(unloadList, unloadList.end()));
01035 
01036                 <span class="comment">// and now, load and unload....</span>
01037                 {
01038                         std::set&lt;std::string&gt;::iterator first(loadList.begin()), last(loadList.end());
01039                         <span class="keywordflow">for</span> (; first != last; ++first)
01040                         {
01041 <span class="comment">//                              nldebug("Trying to load sample bank %s", first-&gt;c_str());</span>
01042                                 mixer-&gt;loadSampleBank(<span class="keyword">true</span>, *first);
01043                         }
01044                         <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerz1295_1">_LoadedBanks</a>.insert(loadList.begin(), loadList.end());
01045                 }
01046                 {
01047                         std::set&lt;std::string&gt;::iterator first(unloadList.begin()), last(unloadList.end());
01048                         <span class="keywordflow">for</span> (; first != last; ++first)
01049                         {
01050 <span class="comment">//                              nldebug("Trying to unload sample bank %s", first-&gt;c_str());</span>
01051                                 <span class="keywordflow">if</span> (mixer-&gt;unloadSampleBank(*first))
01052                                 {
01053                                         <span class="comment">// ok, the bank is unloaded</span>
01054                                         <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerz1295_1">_LoadedBanks</a>.erase(*first);
01055                                 }
01056                                 <span class="keywordflow">else</span> <span class="keywordflow">if</span> (CSampleBank::findSampleBank(CStringMapper::map(*first)) == 0)
01057                                 {
01058                                         <span class="comment">// ok, the bank is unavailable !</span>
01059                                         <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerz1295_1">_LoadedBanks</a>.erase(*first);
01060                                 }
01061                         }
01062                 }
01063         }
01064 
01065         <a class="code" href="a04365.html#a2">H_BEFORE</a>(NLSOUND_UpdateSoundLayer)
01066         <span class="comment">// retreive the root cluster...</span>
01067         <a class="code" href="a02362.html">NL3D::CCluster</a> *rootCluster = 0;
01068         <span class="keywordflow">if</span> (mixer-&gt;getClusteredSound() != 0)
01069                 rootCluster = mixer-&gt;getClusteredSound()-&gt;getRootCluster();
01070 
01071         <span class="comment">// Apply the same algo for each sound layer.</span>
01072         <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> i=0; i&lt;<a class="code" href="a05381.html#a4">BACKGROUND_LAYER</a>; ++i)
01073         {
01074                 vector&lt;TSoundData&gt; &amp;layer = <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerz1296_0">_Layers</a>[i];
01075                 vector&lt;uint&gt; selectedIndex;
01076                 vector&lt;uint&gt; leaveIndex;
01077 
01078                 selectedIndex.reserve(layer.size());
01079                 leaveIndex.reserve(layer.size());
01080 
01081                 <span class="comment">// extract the list of selected/unselected box</span>
01082                 vector&lt;TSoundData&gt;::iterator first(layer.begin()), last(layer.end());
01083                 <span class="keywordflow">for</span> (<a class="code" href="a04558.html#a15">uint</a> <a class="code" href="a04223.html#a577">count</a> = 0; first != last; ++first, ++<a class="code" href="a04223.html#a577">count</a>)
01084                 {
01085                         <span class="keywordflow">if</span> (listener.x &gt;= first-&gt;MinBox.x &amp;&amp; listener.x &lt;= first-&gt;MaxBox.x
01086                                 &amp;&amp; listener.y &gt;= first-&gt;MinBox.y &amp;&amp; listener.y &lt;= first-&gt;MaxBox.y
01087 <span class="comment">//                              &amp;&amp; listener.z &gt;= first-&gt;MinBox.z &amp;&amp; listener.z &lt;= first-&gt;MaxBox.z</span>
01088                                 )
01089                         {
01090 <span class="comment">//                              nldebug("patat %u is selected by box (%s)", count, first-&gt;SoundName.c_str());</span>
01091                                 selectedIndex.push_back(count);
01092                         }
01093                         <span class="keywordflow">else</span>
01094                         {
01095 <span class="comment">//                              nldebug("patat %u is rejected  by box (%s)", count, first-&gt;SoundName.c_str());</span>
01096                                 <span class="comment">// listener out of this box.</span>
01097                                 <span class="keywordflow">if</span> (first-&gt;Selected &amp;&amp; first-&gt;Source != 0)
01098                                 {
01099                                         <span class="comment">// we leave this box.</span>
01100                                         leaveIndex.push_back(count);
01101                                 }
01102                         }
01103                 }
01104 
01105                 <span class="comment">// stop all the sound that are leaved.</span>
01106                 {
01107                         vector&lt;uint&gt;::iterator first(leaveIndex.begin()), last(leaveIndex.end());
01108                         <span class="keywordflow">for</span> (; first != last; ++first)
01109                         {
01110                                 TSoundData &amp;sd = layer[*first];
01111                                 sd.Selected = <span class="keyword">false</span>;
01112                                 <span class="keywordflow">if</span> (sd.Source-&gt;isPlaying())
01113                                         sd.Source-&gt;stop();
01114                         }
01115                 }
01116                 <span class="comment">// Compute new source mixing in this layer</span>
01117                 {
01119                         multimap&lt;float, TSoundStatus&gt;   status;
01120 
01121                         <span class="comment">// first loop to compute selected sound gain and position and order the result by surface..</span>
01122                         {
01123                                 vector&lt;uint&gt;::iterator first(selectedIndex.begin()), last(selectedIndex.end());
01124                                 <span class="keywordflow">for</span> (; first != last; ++first)
01125                                 {
01126                                         TSoundData &amp;sd = layer[*first];
01127                                         CVector pos;
01128                                         <span class="keywordtype">float</span>   gain = 1.0f;
01129                                         <span class="keywordtype">float</span>   distance;
01130                                         <span class="keywordtype">bool</span>    inside = <span class="keyword">false</span>;
01131 
01132                                         <span class="comment">// inside the patat ?</span>
01133                                         
01134                                         <span class="keywordflow">if</span>(CPrimZone::contains(listener, sd.Points, distance, pos, sd.IsPath))
01135                                         {
01136                                                 inside = <span class="keyword">true</span>;
01137                                                 pos = _LastPosition;    <span class="comment">// use the real listener position, not the 0 z centered</span>
01138                                                 gain = 1.0f;
01139 <span class="comment">//                                              nlinfo ("inside patate %d name '%s' ", *first, sd.SoundName.c_str());</span>
01140                                         }
01141                                         <span class="keywordflow">else</span>
01142                                         {
01143                                                 <span class="keywordflow">if</span> (distance &lt; sd.MaxDist)
01144                                                 {
01145                                                         <span class="comment">// compute the gain.</span>
01146 <span class="comment">//                                                      gain = (sd.MaxDist - distance) / sd.MaxDist;</span>
01147                                                 }
01148                                                 <span class="keywordflow">else</span>
01149                                                 {
01150                                                         <span class="comment">// too far</span>
01151                                                         gain = 0;
01152                                                 }
01153                                                 <span class="comment">//nlinfo ("near patate %d name '%s' from %f ", *first, sd.SoundName.c_str(), distance);</span>
01154                                         }
01155 
01156                                         <span class="comment">// store the status.</span>
01157                                         status.insert(make_pair(sd.Surface, TSoundStatus(sd, pos, gain, distance, inside)));
01158                                 }
01159                         }
01160                         <span class="comment">// second loop thrue the surface ordered selected sound.</span>
01161                         {
01162                                 <span class="comment">// Sound mixing strategie :</span>
01163                                 <span class="comment">// The smallest zone sound mask bigger one</span>
01164 
01165                                 <span class="keywordtype">float</span>   maskFactor = 1.0f;
01166 
01167                                 multimap&lt;float, TSoundStatus&gt;::iterator first(status.begin()), last(status.end());
01168                                 <span class="keywordflow">for</span> (; first != last; ++first)
01169                                 {
01170                                         TSoundStatus &amp;ss = first-&gt;second;
01171 
01172                                         <span class="keywordflow">if</span> (maskFactor &gt; 0.0f &amp;&amp; ss.Gain &gt; 0)
01173                                         {
01174                                                 <span class="keywordtype">float</span> gain;
01175                                                 
01176                                                 <span class="keywordflow">if</span> (!ss.SoundData.IsPath &amp;&amp; ss.SoundData.Points.size() &gt; 1)
01177                                                         gain = maskFactor * ss.Gain;
01178                                                 <span class="keywordflow">else</span>
01179                                                         gain = ss.Gain;
01180 
01181 <span class="comment">//                                              maskFactor -= ss.Gain;</span>
01182 
01183                                                 ss.SoundData.Selected = <span class="keyword">true</span>;
01184 
01185 <span class="comment">//                                              if (ss.Gain == 1)</span>
01186 <span class="comment">//                                              if (ss.Distance == 0)</span>
01187                                                 <span class="keywordflow">if</span> (ss.Inside)
01188                                                 {
01189                                                         <span class="comment">// inside a pattate, then decrease the mask factor will we are more inside the patate</span>
01190                                                         maskFactor -= first-&gt;second.Distance / <a class="code" href="a05381.html#a2">INSIDE_FALLOF</a>;
01191                                                         <a class="code" href="a05378.html#a374">clamp</a>(maskFactor, 0.0f, 1.0f);
01192                                                 }
01193 
01194                                                 <span class="comment">// start the soond (if needed) and update the volume.</span>
01195 
01196                                                 <span class="keywordflow">if</span> (ss.SoundData.Source == 0)
01197                                                 {
01198                                                         <span class="comment">// try to create the source.</span>
01199                                                         ss.SoundData.Source = static_cast&lt;CSourceCommon*&gt;(mixer-&gt;createSource(ss.SoundData.Sound, <span class="keyword">false</span>, 0, 0, rootCluster));
01200                                                 }
01201                                                 <span class="keywordflow">if</span> (ss.SoundData.Source != 0)
01202                                                 {
01203                                                         <span class="comment">// set the volume</span>
01204                                                         ss.SoundData.Source-&gt;setRelativeGain(gain);
01205                                                         <span class="comment">// and the position</span>
01206                                                         ss.Position.z = _LastPosition.z + <a class="code" href="a05381.html#a3">BACKGROUND_SOUND_ALTITUDE</a>;
01207                                                         ss.SoundData.Source-&gt;setPos(ss.Position);
01208 
01209 <span class="comment">//                                                      nldebug("Setting source %s at %f", ss.SoundData.SoundName.c_str(), gain);</span>
01210                                                         <span class="keywordflow">if</span> (!ss.SoundData.Source-&gt;isPlaying())
01211                                                         {
01212                                                                 <span class="comment">// start the sound is needed.</span>
01213                                                                 ss.SoundData.Source-&gt;play();
01214                                                         }
01215                                                         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (ss.SoundData.Source-&gt;getType() != CSourceCommon::SOURCE_SIMPLE)
01216                                                                 ss.SoundData.Source-&gt;checkup();
01217                                                 }
01218                                         }
01219                                         <span class="keywordflow">else</span> <span class="keywordflow">if</span> (ss.SoundData.Source != 0 &amp;&amp; ss.SoundData.Source-&gt;isPlaying())
01220                                         {
01221                                                 <span class="comment">// stop this too far source.</span>
01222                                                 ss.SoundData.Source-&gt;stop();
01223                                         }
01224                                 }
01225                         } 
01226                 } <span class="comment">// compute source mixing</span>
01227         } <span class="comment">// for each layer</span>
01228 
01229         <a class="code" href="a04365.html#a3">H_AFTER</a>(NLSOUND_UpdateSoundLayer)
01230 
01231 
01232         <a class="code" href="a04365.html#a2">H_BEFORE</a>(NLSOUND_DoFadeInOut)
01233         <span class="comment">// update the fade in / out</span>
01234         <span class="keywordflow">if</span> (<a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr2">_DoFade</a>)
01235         {
01236                 <a class="code" href="a05378.html#a242">TTime</a> now = <a class="code" href="a02142.html#NLMISC_1_1CTimee0">NLMISC::CTime::getLocalTime</a>();
01237                 <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr2">_DoFade</a> = <span class="keyword">false</span>;
01238                 <a class="code" href="a04558.html#a15">uint</a> i;
01239 
01240                 <span class="comment">//for each filter</span>
01241                 <span class="keywordflow">for</span> (i=0; i&lt; UAudioMixer::TBackgroundFlags::NB_BACKGROUND_FLAGS; ++i)
01242                 {
01243                         <span class="keywordflow">if</span> (<a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr3">_FilterFadesStart</a>[i] != 0)
01244                         {
01245                                 <span class="comment">// this filter is fading</span>
01246                                 <span class="keywordflow">if</span> (<a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr1">_BackgroundFlags</a>.Flags[i])
01247                                 {
01248                                         <span class="comment">// fading out</span>
01249                                         <a class="code" href="a05378.html#a242">TTime</a> delta = now - <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr3">_FilterFadesStart</a>[i];
01250                                         <span class="keywordflow">if</span> (delta &gt; <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr0">_BackgroundFilterFades</a>.FadeOuts[i])
01251                                         {
01252                                                 <span class="comment">// the fade is terminated</span>
01253                                                 <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr4">_FilterFadeValues</a>[i] = 0;
01254                                                 <span class="comment">// stop the fade for this filter</span>
01255                                                 <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr3">_FilterFadesStart</a>[i] = 0;
01256                                         }
01257                                         <span class="keywordflow">else</span>
01258                                         {
01259                                                 <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr4">_FilterFadeValues</a>[i] = 1 - (float(delta) / <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr0">_BackgroundFilterFades</a>.FadeOuts[i]);
01260                                                 <span class="comment">// continue to fade (at least for this filter.</span>
01261                                                 <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr2">_DoFade</a> |= <span class="keyword">true</span>;
01262                                         }
01263                                 }
01264                                 <span class="keywordflow">else</span>
01265                                 {
01266                                         <span class="comment">// fading in</span>
01267                                         <a class="code" href="a05378.html#a242">TTime</a> delta = now - <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr3">_FilterFadesStart</a>[i];
01268                                         <span class="keywordflow">if</span> (delta &gt; <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr0">_BackgroundFilterFades</a>.FadeIns[i])
01269                                         {
01270                                                 <span class="comment">// the fade is terminated</span>
01271                                                 <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr4">_FilterFadeValues</a>[i] = 1;
01272                                                 <span class="comment">// stop the fade for this filter</span>
01273                                                 <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr3">_FilterFadesStart</a>[i] = 0;
01274                                         }
01275                                         <span class="keywordflow">else</span>
01276                                         {
01277                                                 <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr4">_FilterFadeValues</a>[i] = float(delta) / <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr0">_BackgroundFilterFades</a>.FadeIns[i];
01278                                                 <span class="comment">// continue to fade (at least for this filter.</span>
01279                                                 <a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr2">_DoFade</a> |= <span class="keyword">true</span>;
01280                                         }
01281                                 }
01282                         }
01283                 }
01284 
01285                 <span class="comment">// update all playing background source that filter value has changed</span>
01286                 <span class="comment">// for each layer</span>
01287                 <span class="keywordflow">for</span> (i=0; i&lt;<a class="code" href="a05381.html#a4">BACKGROUND_LAYER</a>; ++i)
01288                 {
01289                         <span class="comment">// for each patat</span>
01290                         std::vector&lt;TSoundData&gt;::iterator first(_Layers[i].begin()), last(_Layers[i].end());
01291                         <span class="keywordflow">for</span> (; first != last; ++first)
01292                         {
01293                                 <span class="keywordflow">if</span> (first-&gt;Selected)
01294                                 {
01295                                         <span class="comment">// update this playing sound</span>
01296                                         <span class="keywordflow">if</span> (first-&gt;Source != 0 &amp;&amp; first-&gt;Source-&gt;getType() == CSourceCommon::SOURCE_BACKGROUND)
01297                                                 static_cast&lt;CBackgroundSource*&gt;(first-&gt;Source)-&gt;updateFilterValues(_FilterFadeValues);
01298                                 }
01299                         }
01300 
01301                 }
01302 
01303                 <span class="keywordflow">if</span> (!<a class="code" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr2">_DoFade</a>)
01304                 {
01305                         <span class="comment">// we can remove the update.</span>
01306                         mixer-&gt;unregisterUpdate(<span class="keyword">this</span>);
01307                 }
01308         }
01309         <a class="code" href="a04365.html#a3">H_AFTER</a>(NLSOUND_DoFadeInOut)
01310 }
</pre></div>    </td>
  </tr>
</table>
<hr><h2>Friends And Related Function Documentation</h2>
<a class="anchor" name="NLSOUND_1_1CBackgroundSoundManagern0" doxytag="NLSOUND::CBackgroundSoundManager::CAudioMixerUser" ></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"> friend class <a class="el" href="a02235.html">CAudioMixerUser</a><code> [friend]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="a05472.html#l00147">147</a> of file <a class="el" href="a05472.html">background_sound_manager.h</a>.    </td>
  </tr>
</table>
<hr><h2>Field Documentation</h2>
<a class="anchor" name="NLSOUND_1_1CBackgroundSoundManagerr0" doxytag="NLSOUND::CBackgroundSoundManager::_BackgroundFilterFades" ></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="a03920.html">UAudioMixer::TBackgroundFilterFades</a> <a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr0">NLSOUND::CBackgroundSoundManager::_BackgroundFilterFades</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Background filters fades. 
<p>

<p>
Definition at line <a class="el" href="a05472.html#l00200">200</a> of file <a class="el" href="a05472.html">background_sound_manager.h</a>.
<p>
Referenced by <a class="el" href="a05471.html#l00087">getBackgroundFilterFades()</a>, <a class="el" href="a05471.html#l00082">setBackgroundFilterFades()</a>, <a class="el" href="a05471.html#l01312">setBackgroundFlags()</a>, and <a class="el" href="a05471.html#l00861">updateBackgroundStatus()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBackgroundSoundManagerr1" doxytag="NLSOUND::CBackgroundSoundManager::_BackgroundFlags" ></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="a03921.html">UAudioMixer::TBackgroundFlags</a> <a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr1">NLSOUND::CBackgroundSoundManager::_BackgroundFlags</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Background flags. 
<p>

<p>
Definition at line <a class="el" href="a05472.html#l00198">198</a> of file <a class="el" href="a05472.html">background_sound_manager.h</a>.
<p>
Referenced by <a class="el" href="a05471.html#l00060">CBackgroundSoundManager()</a>, <a class="el" href="a05471.html#l00076">getBackgroundFlags()</a>, <a class="el" href="a05471.html#l00778">play()</a>, <a class="el" href="a05471.html#l01312">setBackgroundFlags()</a>, and <a class="el" href="a05471.html#l00861">updateBackgroundStatus()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBackgroundSoundManagerz1295_0" doxytag="NLSOUND::CBackgroundSoundManager::_Banks" ></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"> std::vector&lt;<a class="el" href="a02249.html">TBanksData</a>&gt; <a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerz1295_0">NLSOUND::CBackgroundSoundManager::_Banks</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Container for the banks primitive. 
<p>

<p>
Definition at line <a class="el" href="a05472.html#l00229">229</a> of file <a class="el" href="a05472.html">background_sound_manager.h</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBackgroundSoundManagerr2" doxytag="NLSOUND::CBackgroundSoundManager::_DoFade" ></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 <a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr2">NLSOUND::CBackgroundSoundManager::_DoFade</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Is some fade in/out running? 
<p>

<p>
Definition at line <a class="el" href="a05472.html#l00206">206</a> of file <a class="el" href="a05472.html">background_sound_manager.h</a>.
<p>
Referenced by <a class="el" href="a05471.html#l00778">play()</a>, <a class="el" href="a05471.html#l01312">setBackgroundFlags()</a>, and <a class="el" href="a05471.html#l00861">updateBackgroundStatus()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBackgroundSoundManagerr3" doxytag="NLSOUND::CBackgroundSoundManager::_FilterFadesStart" ></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#a242">NLMISC::TTime</a> <a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr3">NLSOUND::CBackgroundSoundManager::_FilterFadesStart</a>[UAudioMixer::TBackgroundFlags::NB_BACKGROUND_FLAGS]<code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
The date of last fade in or out started for each filter. 
<p>

<p>
Definition at line <a class="el" href="a05472.html#l00202">202</a> of file <a class="el" href="a05472.html">background_sound_manager.h</a>.
<p>
Referenced by <a class="el" href="a05471.html#l00060">CBackgroundSoundManager()</a>, <a class="el" href="a05471.html#l00778">play()</a>, <a class="el" href="a05471.html#l01312">setBackgroundFlags()</a>, and <a class="el" href="a05471.html#l00861">updateBackgroundStatus()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBackgroundSoundManagerr4" doxytag="NLSOUND::CBackgroundSoundManager::_FilterFadeValues" ></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 <a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr4">NLSOUND::CBackgroundSoundManager::_FilterFadeValues</a>[UAudioMixer::TBackgroundFlags::NB_BACKGROUND_FLAGS]<code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
The filter fade values. 
<p>

<p>
Definition at line <a class="el" href="a05472.html#l00204">204</a> of file <a class="el" href="a05472.html">background_sound_manager.h</a>.
<p>
Referenced by <a class="el" href="a05471.html#l00060">CBackgroundSoundManager()</a>, <a class="el" href="a05472.html#l00139">getFilterValues()</a>, <a class="el" href="a05471.html#l00778">play()</a>, <a class="el" href="a05471.html#l01312">setBackgroundFlags()</a>, and <a class="el" href="a05471.html#l00861">updateBackgroundStatus()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBackgroundSoundManagerr5" doxytag="NLSOUND::CBackgroundSoundManager::_FxZones" ></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"> std::vector&lt;<a class="el" href="a02250.html">TFxZone</a>&gt; <a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr5">NLSOUND::CBackgroundSoundManager::_FxZones</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Container for the fx primitive. 
<p>

<p>
Definition at line <a class="el" href="a05472.html#l00305">305</a> of file <a class="el" href="a05472.html">background_sound_manager.h</a>.
<p>
Referenced by <a class="el" href="a05471.html#l00473">addFxZone()</a>, <a class="el" href="a05471.html#l00618">load()</a>, <a class="el" href="a05471.html#l00441">loadEffectsFromPrimitives()</a>, and <a class="el" href="a05471.html#l00861">updateBackgroundStatus()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBackgroundSoundManagerr6" doxytag="NLSOUND::CBackgroundSoundManager::_LastEnv" ></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="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr6">NLSOUND::CBackgroundSoundManager::_LastEnv</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Last setted env fx. Used when clustered sound is not active. 
<p>

<p>
Definition at line <a class="el" href="a05472.html#l00307">307</a> of file <a class="el" href="a05472.html">background_sound_manager.h</a>.
<p>
Referenced by <a class="el" href="a05471.html#l00861">updateBackgroundStatus()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBackgroundSoundManagerr7" doxytag="NLSOUND::CBackgroundSoundManager::_LastPosition" ></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="a03128.html">NLMISC::CVector</a> <a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr7">NLSOUND::CBackgroundSoundManager::_LastPosition</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
The last position of the listener. 
<p>

<p>
Definition at line <a class="el" href="a05472.html#l00209">209</a> of file <a class="el" href="a05472.html">background_sound_manager.h</a>.
<p>
Referenced by <a class="el" href="a05471.html#l00850">setListenerPosition()</a>, and <a class="el" href="a05471.html#l00861">updateBackgroundStatus()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBackgroundSoundManagerz1296_0" doxytag="NLSOUND::CBackgroundSoundManager::_Layers" ></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"> std::vector&lt;<a class="el" href="a02251.html">TSoundData</a>&gt; <a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerz1296_0">NLSOUND::CBackgroundSoundManager::_Layers</a>[<a class="el" href="a05381.html#a4">BACKGROUND_LAYER</a>]<code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Array of vector of sound data. 
<p>

<p>
Definition at line <a class="el" href="a05472.html#l00265">265</a> of file <a class="el" href="a05472.html">background_sound_manager.h</a>.
<p>
Referenced by <a class="el" href="a05471.html#l00093">addSound()</a>, <a class="el" href="a05471.html#l00618">load()</a>, <a class="el" href="a05471.html#l00801">stop()</a>, <a class="el" href="a05471.html#l00823">unload()</a>, and <a class="el" href="a05471.html#l00861">updateBackgroundStatus()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBackgroundSoundManagerz1295_1" doxytag="NLSOUND::CBackgroundSoundManager::_LoadedBanks" ></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"> std::set&lt;std::string&gt; <a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerz1295_1">NLSOUND::CBackgroundSoundManager::_LoadedBanks</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Container for the list of currently loaded banks. 
<p>

<p>
Definition at line <a class="el" href="a05472.html#l00231">231</a> of file <a class="el" href="a05472.html">background_sound_manager.h</a>.
<p>
Referenced by <a class="el" href="a05471.html#l00861">updateBackgroundStatus()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="NLSOUND_1_1CBackgroundSoundManagerr8" doxytag="NLSOUND::CBackgroundSoundManager::_Playing" ></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 <a class="el" href="a02248.html#NLSOUND_1_1CBackgroundSoundManagerr8">NLSOUND::CBackgroundSoundManager::_Playing</a><code> [private]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Flag for playing background sounds. 
<p>

<p>
Definition at line <a class="el" href="a05472.html#l00195">195</a> of file <a class="el" href="a05472.html">background_sound_manager.h</a>.
<p>
Referenced by <a class="el" href="a05471.html#l00272">loadAudioFromPrimitives()</a>, <a class="el" href="a05471.html#l00574">loadSoundsFromRegion()</a>, <a class="el" href="a05471.html#l00778">play()</a>, <a class="el" href="a05471.html#l00801">stop()</a>, and <a class="el" href="a05471.html#l00861">updateBackgroundStatus()</a>.    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="a05472.html">background_sound_manager.h</a><li><a class="el" href="a05471.html">background_sound_manager.cpp</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 14:31:47 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>