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
|
<!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::CAmbiantSource class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.6 -->
<div class="qindex"> <form class="search" action="search.php" method="get">
<a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a> | <span class="search"><u>S</u>earch for <input class="search" type="text" name="query" value="" size="20" accesskey="s"/></span></form></div>
<h1>NLSOUND::CAmbiantSource Class Reference</h1><code>#include <<a class="el" href="a05428.html">ambiant_source.h</a>></code>
<p>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Stereo mix of a envsound, seen as a source (see <a class="el" href="a02457.html">CEnvSoundUser</a>)<p>
Plays a stereo mix made up of two channels for crossfading random ambiant sounds, plus a third channel for random sparse sounds.<p>
<dl compact><dt><b>Author:</b></dt><dd>Olivier Cado <p>
Nevrax France </dd></dl>
<dl compact><dt><b>Date:</b></dt><dd>2001 </dd></dl>
<p>
<p>
Definition at line <a class="el" href="a05428.html#l00050">50</a> of file <a class="el" href="a05428.html">ambiant_source.h</a>.<table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="a02194.html#NLSOUND_1_1CAmbiantSourcea0">CAmbiantSource</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <a href="#NLSOUND_1_1CAmbiantSourcea0"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="a02194.html#NLSOUND_1_1CAmbiantSourcea1">enable</a> (bool toplay, float gain)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Enable (play with high priority) and set general gain, or disable (stop and set low priority). <a href="#NLSOUND_1_1CAmbiantSourcea1"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03395.html">CSimpleSource</a> * </td><td class="memItemRight" valign=bottom><a class="el" href="a02194.html#NLSOUND_1_1CAmbiantSourcea2">getChannels</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the stereo channels (EDIT). <a href="#NLSOUND_1_1CAmbiantSourcea2"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="a02194.html#NLSOUND_1_1CAmbiantSourcea3">initPos</a> (const <a class="el" href="a03128.html">NLMISC::CVector</a> *posvector)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02194.html#NLSOUND_1_1CAmbiantSourcea4">setProperties</a> (std::vector< <a class="el" href="a02246.html">TSoundId</a> > &ambiantsounds, std::vector< <a class="el" href="a02246.html">TSoundId</a> > &sparsesounds, <a class="el" href="a04558.html#a11">uint32</a> crossfadeTimeMs=4000, <a class="el" href="a04558.html#a11">uint32</a> sustainTimeMs=16000, <a class="el" href="a04558.html#a11">uint32</a> sparseAvgPeriodMs=30000)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Set properties (EDIT). <a href="#NLSOUND_1_1CAmbiantSourcea4"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void </td><td class="memItemRight" valign=bottom><a class="el" href="a02194.html#NLSOUND_1_1CAmbiantSourcea5">update</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Update. <a href="#NLSOUND_1_1CAmbiantSourcea5"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual </td><td class="memItemRight" valign=bottom><a class="el" href="a02194.html#NLSOUND_1_1CAmbiantSourcea6">~CAmbiantSource</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="#NLSOUND_1_1CAmbiantSourcea6"></a><br><br></td></tr>
<tr><td colspan=2><br><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02194.html#NLSOUND_1_1CAmbiantSourcee0">init</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Static init (call at the very beginning). <a href="#NLSOUND_1_1CAmbiantSourcee0"></a><br><br></td></tr>
<tr><td colspan=2><br><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a05378.html#a242">NLMISC::TTime</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02194.html#NLSOUND_1_1CAmbiantSourceb0">calcPosInCycle</a> (bool &crossfade, <a class="el" href="a04558.html#a11">uint32</a> &leadchannel)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Calc pos in cycle. <a href="#NLSOUND_1_1CAmbiantSourceb0"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a02194.html#NLSOUND_1_1CAmbiantSourceb1">calcRandomSparseSoundTime</a> (<a class="el" href="a02246.html">TSoundId</a> currentsparesound)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Calculate the next time a sparse sound plays (set NULL for no current sound). <a href="#NLSOUND_1_1CAmbiantSourceb1"></a><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02246.html">TSoundId</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02194.html#NLSOUND_1_1CAmbiantSourceb2">getRandomSound</a> (const std::vector< <a class="el" href="a02246.html">CSound</a> * > &bank) const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Select a random sound in a bank. <a href="#NLSOUND_1_1CAmbiantSourceb2"></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>std::vector< <a class="el" href="a02246.html">CSound</a> * > </td><td class="memItemRight" valign=bottom><a class="el" href="a02194.html#NLSOUND_1_1CAmbiantSourcer0">_AmbiantSounds</a></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a11">uint32</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02194.html#NLSOUND_1_1CAmbiantSourcer1">_CrossfadeTime</a></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a05378.html#a242">NLMISC::TTime</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02194.html#NLSOUND_1_1CAmbiantSourcer2">_NextSparseSoundTime</a></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02194.html#NLSOUND_1_1CAmbiantSourcer3">_Play</a></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02194.html#NLSOUND_1_1CAmbiantSourcer4">_RandomSoundChosen</a></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a11">uint32</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02194.html#NLSOUND_1_1CAmbiantSourcer5">_SparseAvgPeriod</a></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>std::vector< <a class="el" href="a02246.html">CSound</a> * > </td><td class="memItemRight" valign=bottom><a class="el" href="a02194.html#NLSOUND_1_1CAmbiantSourcer6">_SparseSounds</a></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a05378.html#a242">NLMISC::TTime</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02194.html#NLSOUND_1_1CAmbiantSourcer7">_StartTime</a></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03395.html">CSimpleSource</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02194.html#NLSOUND_1_1CAmbiantSourcer8">_StereoChannels</a> [3]</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>float </td><td class="memItemRight" valign=bottom><a class="el" href="a02194.html#NLSOUND_1_1CAmbiantSourcer9">_StereoGain</a></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a02194.html#NLSOUND_1_1CAmbiantSourcer10">_Sustain</a></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a11">uint32</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a02194.html#NLSOUND_1_1CAmbiantSourcer11">_SustainTime</a></td></tr>
</table>
<hr><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" name="NLSOUND_1_1CAmbiantSourcea0" doxytag="NLSOUND::CAmbiantSource::CAmbiantSource" ></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::CAmbiantSource::CAmbiantSource </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Constructor.
<p>
<p>
Definition at line <a class="el" href="a05427.html#l00047">47</a> of file <a class="el" href="a05427.html">ambiant_source.cpp</a>.
<p>
References <a class="el" href="a05428.html#l00101">_StereoChannels</a>, <a class="el" href="a05677.html#l00045">AMBIANT_CH1</a>, <a class="el" href="a05677.html#l00046">AMBIANT_CH2</a>, <a class="el" href="a06390.html#l00093">NLSOUND::CSimpleSource::setLooping()</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
<p>
<div class="fragment"><pre>00047 : <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer3">_Play</a>(<span class="keyword">false</span>),
00048 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer9">_StereoGain</a>(0.0f),
00049 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer10">_Sustain</a>(<span class="keyword">false</span>),
00050 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer4">_RandomSoundChosen</a>(<span class="keyword">false</span>),
00051 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer2">_NextSparseSoundTime</a>(0),
00052 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer1">_CrossfadeTime</a>(4000),
00053 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer11">_SustainTime</a>(8000),
00054 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer5">_SparseAvgPeriod</a>(20000)
00055 {
00056 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer8">_StereoChannels</a>[<a class="code" href="a04254.html#a1">AMBIANT_CH1</a>].setLooping( <span class="keyword">true</span> );
00057 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer8">_StereoChannels</a>[<a class="code" href="a04254.html#a2">AMBIANT_CH2</a>].setLooping( <span class="keyword">true</span> );
00058 <span class="comment">//_StereoChannels[SPARSE_CH].setLooping( false );</span>
00059
00060 srand( (<a class="code" href="a04558.html#a11">uint32</a>)CTime::getLocalTime() );
00061 }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1CAmbiantSourcea6" doxytag="NLSOUND::CAmbiantSource::~CAmbiantSource" ></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::CAmbiantSource::~<a class="el" href="a02194.html">CAmbiantSource</a> </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Destructor.
<p>
<p>
Definition at line <a class="el" href="a05427.html#l00067">67</a> of file <a class="el" href="a05427.html">ambiant_source.cpp</a>.
<p>
References <a class="el" href="a05428.html#l00101">_StereoChannels</a>, <a class="el" href="a05677.html#l00045">AMBIANT_CH1</a>, <a class="el" href="a05677.html#l00046">AMBIANT_CH2</a>, and <a class="el" href="a05677.html#l00047">SPARSE_CH</a>.
<p>
<div class="fragment"><pre>00068 {
00069 CAudioMixerUser::instance()->removeMySource( &_StereoChannels[AMBIANT_CH1] );
00070 CAudioMixerUser::instance()->removeMySource( &_StereoChannels[AMBIANT_CH2] );
00071 CAudioMixerUser::instance()->removeMySource( &_StereoChannels[SPARSE_CH] );
00072
00073 <span class="comment">// Delete sounds: now done in CAudioMixerUser::~CAudioMixerUser()</span>
00074 <span class="comment">/*vector<CSound*>::iterator ipsnds;</span>
00075 <span class="comment"> for ( ipsnds=_AmbiantSounds.begin(); ipsnds!=_AmbiantSounds.end(); ++ipsnds )</span>
00076 <span class="comment"> {</span>
00077 <span class="comment"> nldebug( "Deleting ambiant sound" );</span>
00078 <span class="comment"> delete (*ipsnds);</span>
00079 <span class="comment"> }</span>
00080 <span class="comment"> for ( ipsnds=_SparseSounds.begin(); ipsnds!=_SparseSounds.end(); ++ipsnds )</span>
00081 <span class="comment"> {</span>
00082 <span class="comment"> nldebug( "Deleting sparse sound" );</span>
00083 <span class="comment"> delete (*ipsnds);</span>
00084 <span class="comment"> }</span>
00085 <span class="comment"> */</span>
00086 }
</pre></div> </td>
</tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="NLSOUND_1_1CAmbiantSourceb0" doxytag="NLSOUND::CAmbiantSource::calcPosInCycle" ></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"> TTime NLSOUND::CAmbiantSource::calcPosInCycle </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">bool & </td>
<td class="mdname" nowrap> <em>crossfade</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap><a class="el" href="a04558.html#a11">uint32</a> & </td>
<td class="mdname" nowrap> <em>leadchannel</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [protected]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Calc pos in cycle.
<p>
<p>
Definition at line <a class="el" href="a05427.html#l00212">212</a> of file <a class="el" href="a05427.html">ambiant_source.cpp</a>.
<p>
References <a class="el" href="a05428.html#l00114">_CrossfadeTime</a>, <a class="el" href="a05428.html#l00115">_SustainTime</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
<p>
Referenced by <a class="el" href="a05427.html#l00130">enable()</a>, and <a class="el" href="a05427.html#l00239">update()</a>.
<p>
<div class="fragment"><pre>00213 {
00214 <a class="code" href="a05378.html#a242">TTime</a> pos = CTime::getLocalTime();
00215 <a class="code" href="a04558.html#a11">uint32</a> cycletime = <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer1">_CrossfadeTime</a> + <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer11">_SustainTime</a>;
00216 pos = pos % (cycletime*2);
00217
00218 <span class="comment">// Calc which channel will be the lead one</span>
00219 <span class="keywordflow">if</span> ( pos < cycletime )
00220 {
00221 leadchannel = 0;
00222 }
00223 <span class="keywordflow">else</span>
00224 {
00225 leadchannel = 1;
00226 pos = pos - (cycletime);
00227 }
00228
00229 <span class="comment">// Calc if the pos is in the first part (crossfade) or in the other part (sustain)</span>
00230 crossfade = ( pos < <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer1">_CrossfadeTime</a> );
00231
00232 <span class="keywordflow">return</span> pos;
00233 }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1CAmbiantSourceb1" doxytag="NLSOUND::CAmbiantSource::calcRandomSparseSoundTime" ></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::CAmbiantSource::calcRandomSparseSoundTime </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="a02246.html">TSoundId</a> </td>
<td class="mdname1" valign="top" nowrap> <em>currentsparesound</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [protected]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Calculate the next time a sparse sound plays (set NULL for no current sound).
<p>
<p>
Definition at line <a class="el" href="a05427.html#l00353">353</a> of file <a class="el" href="a05427.html">ambiant_source.cpp</a>.
<p>
References <a class="el" href="a05428.html#l00111">_NextSparseSoundTime</a>, <a class="el" href="a05428.html#l00116">_SparseAvgPeriod</a>, <a class="el" href="a02246.html#NLSOUND_1_1CSounda5">NLSOUND::CSound::getDuration()</a>, <a class="el" href="a05622.html#l00101">nldebug</a>, <a class="el" href="a06630.html#l00069">NLSOUND::TSoundId</a>, <a class="el" href="a05981.html#l00105">uint</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
<p>
Referenced by <a class="el" href="a05427.html#l00130">enable()</a>, and <a class="el" href="a05427.html#l00239">update()</a>.
<p>
<div class="fragment"><pre>00354 {
00355 <a class="code" href="a04558.html#a11">uint32</a> delay = (<a class="code" href="a04558.html#a15">uint</a>)((<span class="keywordtype">float</span>)rand() * (<span class="keywordtype">float</span>)(<a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer5">_SparseAvgPeriod</a>*2) / (<span class="keywordtype">float</span>)RAND_MAX);
00356
00357 <span class="comment">// Check the next sound will play after the current one</span>
00358 <span class="keywordflow">if</span> ( currentsparesound != NULL )
00359 {
00360 <a class="code" href="a04558.html#a11">uint32</a> soundlength = currentsparesound->getDuration();
00361 <span class="keywordflow">if</span> ( delay <= soundlength )
00362 {
00363 delay = soundlength+1;
00364 }
00365 }
00366
00367 <a class="code" href="a04199.html#a0">nldebug</a>( <span class="stringliteral">"AM: EnvSound: Next sparse sound will play in %u ms"</span>, delay );
00368 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer2">_NextSparseSoundTime</a> = CTime::getLocalTime() + delay;
00369 }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1CAmbiantSourcea1" doxytag="NLSOUND::CAmbiantSource::enable" ></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::CAmbiantSource::enable </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">bool </td>
<td class="mdname" nowrap> <em>toplay</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>float </td>
<td class="mdname" nowrap> <em>gain</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Enable (play with high priority) and set general gain, or disable (stop and set low priority).
<p>
<p>
Definition at line <a class="el" href="a05427.html#l00130">130</a> of file <a class="el" href="a05427.html">ambiant_source.cpp</a>.
<p>
References <a class="el" href="a05428.html#l00105">_AmbiantSounds</a>, <a class="el" href="a05428.html#l00098">_Play</a>, <a class="el" href="a05428.html#l00101">_StereoChannels</a>, <a class="el" href="a05428.html#l00102">_StereoGain</a>, <a class="el" href="a05677.html#l00045">AMBIANT_CH1</a>, <a class="el" href="a05427.html#l00212">calcPosInCycle()</a>, <a class="el" href="a05427.html#l00353">calcRandomSparseSoundTime()</a>, <a class="el" href="a06391.html#l00069">NLSOUND::CSimpleSource::getSound()</a>, <a class="el" href="a05381.html#a82a65">NLSOUND::HighPri</a>, <a class="el" href="a05381.html#a82a67">NLSOUND::LowPri</a>, <a class="el" href="a05622.html#l00101">nldebug</a>, <a class="el" href="a06390.html#l00126">NLSOUND::CSimpleSource::play()</a>, <a class="el" href="a06427.html#l00076">NLSOUND::CSourceCommon::setPriority()</a>, <a class="el" href="a05677.html#l00047">SPARSE_CH</a>, <a class="el" href="a06390.html#l00217">NLSOUND::CSimpleSource::stop()</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
<p>
<div class="fragment"><pre>00131 {
00132 <span class="comment">// Calc position in cycle</span>
00133 <span class="keywordtype">bool</span> crossfade;
00134 <a class="code" href="a04558.html#a11">uint32</a> leadchannel;
00135 <span class="keywordflow">if</span> ( <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer0">_AmbiantSounds</a>.size() > 1 )
00136 {
00137 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourceb0">calcPosInCycle</a>( crossfade, leadchannel );
00138 }
00139 <span class="keywordflow">else</span>
00140 {
00141 crossfade = <span class="keyword">false</span>;
00142 leadchannel = <a class="code" href="a04254.html#a1">AMBIANT_CH1</a>;
00143 }
00144
00145 <span class="comment">// Enable/disable</span>
00146 <span class="keywordflow">if</span> ( toplay )
00147 {
00148 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer9">_StereoGain</a> = gain;
00149
00150 <span class="keywordflow">if</span> ( ! <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer3">_Play</a> )
00151 {
00152 <span class="comment">// Start lead channel</span>
00153 <span class="keywordflow">if</span> ( <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer8">_StereoChannels</a>[leadchannel].getSound() != NULL )
00154 {
00155 <a class="code" href="a04199.html#a0">nldebug</a>( <span class="stringliteral">"AM: Envsound: Switch on channel %u"</span>, leadchannel );
00156 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer8">_StereoChannels</a>[leadchannel].setPriority( HighPri ) ;
00157 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer8">_StereoChannels</a>[leadchannel].play();
00158 }
00159
00160 <span class="comment">// If crossfading, start back channel</span>
00161 <span class="keywordflow">if</span> ( crossfade && (<a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer8">_StereoChannels</a>[1-leadchannel].getSound() != NULL) )
00162 {
00163 <a class="code" href="a04199.html#a0">nldebug</a>( <span class="stringliteral">"AM: Envsound: Switch on channel %u"</span>, 1-leadchannel );
00164 _StereoChannels[1-leadchannel].setPriority( HighPri ) ;
00165 _StereoChannels[1-leadchannel].play();
00166 }
00167
00168 <span class="comment">// Calc when the next spare sound will play</span>
00169 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourceb1">calcRandomSparseSoundTime</a>( NULL );
00170
00171 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer3">_Play</a> = <span class="keyword">true</span>;
00172 }
00173 <span class="comment">// The SPARSE_CH is added only when needed</span>
00174 }
00175 <span class="keywordflow">else</span>
00176 {
00177 <span class="keywordflow">if</span> ( <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer3">_Play</a> )
00178 {
00179 <span class="comment">// Stop lead channel</span>
00180 <span class="keywordflow">if</span> ( <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer8">_StereoChannels</a>[leadchannel].getSound() != NULL )
00181 {
00182 <a class="code" href="a04199.html#a0">nldebug</a>( <span class="stringliteral">"AM: Envsound: Switch off channel %u"</span>, leadchannel );
00183 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer8">_StereoChannels</a>[leadchannel].stop();
00184 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer8">_StereoChannels</a>[leadchannel].setPriority( LowPri );
00185 }
00186
00187 <span class="comment">// If crossfading, stop back channel</span>
00188 <span class="keywordflow">if</span> ( crossfade && (<a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer8">_StereoChannels</a>[1-leadchannel].getSound() != NULL) )
00189 {
00190 <a class="code" href="a04199.html#a0">nldebug</a>( <span class="stringliteral">"AM: Envsound: Switch off channel %u"</span>, 1-leadchannel );
00191 _StereoChannels[1-leadchannel].stop();
00192 _StereoChannels[1-leadchannel].setPriority( LowPri );
00193 }
00194
00195 <span class="comment">// Stop spare channel, anyway</span>
00196 <span class="keywordflow">if</span> ( _StereoChannels[<a class="code" href="a04254.html#a3">SPARSE_CH</a>].getSound() != NULL )
00197 {
00198 <a class="code" href="a04199.html#a0">nldebug</a>( <span class="stringliteral">"AM: Envsound: Switch off sparse channel"</span> );
00199 _StereoChannels[<a class="code" href="a04254.html#a3">SPARSE_CH</a>].stop();
00200 _StereoChannels[<a class="code" href="a04254.html#a3">SPARSE_CH</a>].setPriority( LowPri );
00201 }
00202
00203 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer3">_Play</a> = <span class="keyword">false</span>;
00204 }
00205 }
00206 }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1CAmbiantSourcea2" doxytag="NLSOUND::CAmbiantSource::getChannels" ></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="a03395.html">CSimpleSource</a>* NLSOUND::CAmbiantSource::getChannels </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [inline]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Return the stereo channels (EDIT).
<p>
<p>
Definition at line <a class="el" href="a05428.html#l00079">79</a> of file <a class="el" href="a05428.html">ambiant_source.h</a>.
<p>
References <a class="el" href="a05428.html#l00101">_StereoChannels</a>.
<p>
<div class="fragment"><pre>00079 { <span class="keywordflow">return</span> <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer8">_StereoChannels</a>; }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1CAmbiantSourceb2" doxytag="NLSOUND::CAmbiantSource::getRandomSound" ></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="a02246.html">TSoundId</a> NLSOUND::CAmbiantSource::getRandomSound </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const std::vector< <a class="el" href="a02246.html">CSound</a> * > & </td>
<td class="mdname1" valign="top" nowrap> <em>bank</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap> const<code> [protected]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Select a random sound in a bank.
<p>
<p>
Definition at line <a class="el" href="a05427.html#l00336">336</a> of file <a class="el" href="a05427.html">ambiant_source.cpp</a>.
<p>
References <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05622.html#l00101">nldebug</a>, <a class="el" href="a05646.html#l00993">r</a>, <a class="el" href="a06630.html#l00069">NLSOUND::TSoundId</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
<p>
Referenced by <a class="el" href="a05427.html#l00092">initPos()</a>, and <a class="el" href="a05427.html#l00239">update()</a>.
<p>
<div class="fragment"><pre>00337 {
00338 <a class="code" href="a04199.html#a6">nlassert</a>( ! bank.empty() );
00339 <span class="comment">// Note: does not work with a very big size (rand()*bank.size() would overflow)</span>
00340 <a class="code" href="a04558.html#a11">uint32</a> <a class="code" href="a04223.html#a628">r</a> = rand()*bank.size()/(RAND_MAX+1);
00341 <a class="code" href="a04199.html#a6">nlassert</a>( r < bank.size() );
00342 <a class="code" href="a04199.html#a0">nldebug</a>( <span class="stringliteral">"AM: EnvSound: Prepared random sound number %u of %u"</span>, r, bank.size()-1 );
00343
00344 <span class="keywordflow">return</span> bank[<a class="code" href="a04223.html#a628">r</a>];
00345 }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1CAmbiantSourcee0" doxytag="NLSOUND::CAmbiantSource::init" ></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::CAmbiantSource::init </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">void </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [inline, static]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Static init (call at the very beginning).
<p>
<p>
Definition at line <a class="el" href="a05428.html#l00059">59</a> of file <a class="el" href="a05428.html">ambiant_source.h</a>.
<p>
<div class="fragment"><pre>00060 {
00061 <span class="comment">//NLMISC_REGISTER_CLASS(CAmbiantSource); </span>
00062 }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1CAmbiantSourcea3" doxytag="NLSOUND::CAmbiantSource::initPos" ></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::CAmbiantSource::initPos </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const <a class="el" href="a03128.html">NLMISC::CVector</a> * </td>
<td class="mdname1" valign="top" nowrap> <em>posvector</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Init. You can pass a position vector to link to (if the playable has stereo source(s)) When reading from a stream, call <a class="el" href="a02194.html#NLSOUND_1_1CAmbiantSourcee0">init()</a> *after* serial().
<p>
Definition at line <a class="el" href="a05427.html#l00092">92</a> of file <a class="el" href="a05427.html">ambiant_source.cpp</a>.
<p>
References <a class="el" href="a05428.html#l00105">_AmbiantSounds</a>, <a class="el" href="a05428.html#l00105">_SparseSounds</a>, <a class="el" href="a05428.html#l00101">_StereoChannels</a>, <a class="el" href="a05677.html#l00045">AMBIANT_CH1</a>, <a class="el" href="a05677.html#l00046">AMBIANT_CH2</a>, <a class="el" href="a05427.html#l00336">getRandomSound()</a>, <a class="el" href="a05381.html#a82a67">NLSOUND::LowPri</a>, <a class="el" href="a06428.html#l00088">NLSOUND::CSourceCommon::set3DPositionVector()</a>, <a class="el" href="a06390.html#l00326">NLSOUND::CSimpleSource::setGain()</a>, <a class="el" href="a06427.html#l00076">NLSOUND::CSourceCommon::setPriority()</a>, and <a class="el" href="a05677.html#l00047">SPARSE_CH</a>.
<p>
<div class="fragment"><pre>00093 {
00094 <span class="comment">// Initialize ambiant sound channels</span>
00095 <span class="keywordflow">if</span> ( ! <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer0">_AmbiantSounds</a>.empty() )
00096 {
00097 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer8">_StereoChannels</a>[<a class="code" href="a04254.html#a1">AMBIANT_CH1</a>].set3DPositionVector( posvector );
00098 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer8">_StereoChannels</a>[<a class="code" href="a04254.html#a1">AMBIANT_CH1</a>].setSound( <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourceb2">getRandomSound</a>( _AmbiantSounds ) );
00099 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer8">_StereoChannels</a>[<a class="code" href="a04254.html#a1">AMBIANT_CH1</a>].setGain( 0.0f );
00100 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer8">_StereoChannels</a>[<a class="code" href="a04254.html#a1">AMBIANT_CH1</a>].setPriority( LowPri);
00101 CAudioMixerUser::instance()->addSource( &_StereoChannels[AMBIANT_CH1] );
00102 CAudioMixerUser::instance()->giveTrack( &_StereoChannels[AMBIANT_CH1] );
00103
00104 <span class="keywordflow">if</span> ( <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer0">_AmbiantSounds</a>.size() > 1 )
00105 {
00106 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer8">_StereoChannels</a>[<a class="code" href="a04254.html#a2">AMBIANT_CH2</a>].set3DPositionVector( posvector );
00107 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer8">_StereoChannels</a>[<a class="code" href="a04254.html#a2">AMBIANT_CH2</a>].setSound( <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourceb2">getRandomSound</a>( _AmbiantSounds ) );
00108 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer8">_StereoChannels</a>[<a class="code" href="a04254.html#a2">AMBIANT_CH2</a>].setGain( 0.0f );
00109 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer8">_StereoChannels</a>[<a class="code" href="a04254.html#a2">AMBIANT_CH2</a>].setPriority( LowPri);
00110 CAudioMixerUser::instance()->addSource( &_StereoChannels[AMBIANT_CH2] );
00111 CAudioMixerUser::instance()->giveTrack( &_StereoChannels[AMBIANT_CH2] );
00112 }
00113 }
00114
00115 <span class="comment">// Initialize sparse sounds channel</span>
00116 <span class="keywordflow">if</span> ( ! <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer6">_SparseSounds</a>.empty() )
00117 {
00118 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer8">_StereoChannels</a>[<a class="code" href="a04254.html#a3">SPARSE_CH</a>].set3DPositionVector( posvector );
00119 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer8">_StereoChannels</a>[<a class="code" href="a04254.html#a3">SPARSE_CH</a>].setPriority( LowPri );
00120 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer8">_StereoChannels</a>[<a class="code" href="a04254.html#a3">SPARSE_CH</a>].setSound( <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourceb2">getRandomSound</a>( _SparseSounds ) );
00121 CAudioMixerUser::instance()->addSource( &_StereoChannels[SPARSE_CH] );
00122 CAudioMixerUser::instance()->giveTrack( &_StereoChannels[SPARSE_CH] );
00123 }
00124 }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1CAmbiantSourcea4" doxytag="NLSOUND::CAmbiantSource::setProperties" ></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::CAmbiantSource::setProperties </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">std::vector< <a class="el" href="a02246.html">TSoundId</a> > & </td>
<td class="mdname" nowrap> <em>ambiantsounds</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>std::vector< <a class="el" href="a02246.html">TSoundId</a> > & </td>
<td class="mdname" nowrap> <em>sparsesounds</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap><a class="el" href="a04558.html#a11">uint32</a> </td>
<td class="mdname" nowrap> <em>crossfadeTimeMs</em> = 4000, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap><a class="el" href="a04558.html#a11">uint32</a> </td>
<td class="mdname" nowrap> <em>sustainTimeMs</em> = 16000, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap><a class="el" href="a04558.html#a11">uint32</a> </td>
<td class="mdname" nowrap> <em>sparseAvgPeriodMs</em> = 30000</td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Set properties (EDIT).
<p>
<p>
Definition at line <a class="el" href="a05427.html#l00406">406</a> of file <a class="el" href="a05427.html">ambiant_source.cpp</a>.
<p>
References <a class="el" href="a05428.html#l00105">_AmbiantSounds</a>, <a class="el" href="a05428.html#l00114">_CrossfadeTime</a>, <a class="el" href="a05428.html#l00116">_SparseAvgPeriod</a>, <a class="el" href="a05428.html#l00105">_SparseSounds</a>, <a class="el" href="a05428.html#l00115">_SustainTime</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
<p>
<div class="fragment"><pre>00410 {
00411 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer0">_AmbiantSounds</a> = ambiantsounds;
00412 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer6">_SparseSounds</a> = sparsesounds;
00413 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer1">_CrossfadeTime</a> = crossfadeTimeMs;
00414 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer11">_SustainTime</a> = sustainTimeMs;
00415 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer5">_SparseAvgPeriod</a> = sparseAvgPeriodMs;
00416 }
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1CAmbiantSourcea5" doxytag="NLSOUND::CAmbiantSource::update" ></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::CAmbiantSource::update </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap><code> [virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Update.
<p>
<p>
Definition at line <a class="el" href="a05427.html#l00239">239</a> of file <a class="el" href="a05427.html">ambiant_source.cpp</a>.
<p>
References <a class="el" href="a05428.html#l00105">_AmbiantSounds</a>, <a class="el" href="a05428.html#l00114">_CrossfadeTime</a>, <a class="el" href="a05428.html#l00111">_NextSparseSoundTime</a>, <a class="el" href="a05428.html#l00098">_Play</a>, <a class="el" href="a05428.html#l00105">_SparseSounds</a>, <a class="el" href="a05428.html#l00101">_StereoChannels</a>, <a class="el" href="a05428.html#l00102">_StereoGain</a>, <a class="el" href="a05428.html#l00109">_Sustain</a>, <a class="el" href="a05677.html#l00045">AMBIANT_CH1</a>, <a class="el" href="a05427.html#l00212">calcPosInCycle()</a>, <a class="el" href="a05427.html#l00353">calcRandomSparseSoundTime()</a>, <a class="el" href="a05427.html#l00336">getRandomSound()</a>, <a class="el" href="a06391.html#l00069">NLSOUND::CSimpleSource::getSound()</a>, <a class="el" href="a06391.html#l00129">NLSOUND::CSimpleSource::getTrack()</a>, <a class="el" href="a05381.html#a82a65">NLSOUND::HighPri</a>, <a class="el" href="a05381.html#a82a66">NLSOUND::MidPri</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, <a class="el" href="a05622.html#l00101">nldebug</a>, <a class="el" href="a06390.html#l00126">NLSOUND::CSimpleSource::play()</a>, <a class="el" href="a06427.html#l00076">NLSOUND::CSourceCommon::setPriority()</a>, <a class="el" href="a06390.html#l00337">NLSOUND::CSimpleSource::setRelativeGain()</a>, <a class="el" href="a05677.html#l00047">SPARSE_CH</a>, <a class="el" href="a06390.html#l00217">NLSOUND::CSimpleSource::stop()</a>, <a class="el" href="a06630.html#l00069">NLSOUND::TSoundId</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
<p>
<div class="fragment"><pre>00240 {
00241 <span class="keywordflow">if</span> ( (!<a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer3">_Play</a>) || (<a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer9">_StereoGain</a>==0.0f) )
00242 {
00243 <span class="keywordflow">return</span>;
00244 }
00245
00246 <span class="comment">// Calc pos in cycle</span>
00247 <span class="keywordtype">bool</span> crossfade;
00248 <a class="code" href="a04558.html#a11">uint32</a> leadchannel, backchannel=0;
00249 <a class="code" href="a05378.html#a242">TTime</a> posInCycle=0;
00250 <span class="keywordflow">if</span> ( <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer0">_AmbiantSounds</a>.size() > 1 )
00251 {
00252 posInCycle = <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourceb0">calcPosInCycle</a>( crossfade, leadchannel );
00253 backchannel = 1 - leadchannel;
00254 }
00255 <span class="keywordflow">else</span>
00256 {
00257 <span class="comment">// If there is less than 2 sounds, no crossfade, always sustain (a single sound must be looping)</span>
00258 crossfade = <span class="keyword">false</span>;
00259 leadchannel = <a class="code" href="a04254.html#a1">AMBIANT_CH1</a>;
00260 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer10">_Sustain</a> = <span class="keyword">true</span>;
00261 }
00262
00263 <span class="comment">// Crossfade the first two sources</span>
00264 <span class="keywordflow">if</span> ( crossfade )
00265 {
00266 <span class="comment">// Attack</span>
00267 <span class="keywordtype">float</span> ratio = (<span class="keywordtype">float</span>)posInCycle / (<span class="keywordtype">float</span>)<a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer1">_CrossfadeTime</a>;
00268 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer8">_StereoChannels</a>[leadchannel].setRelativeGain( ratio*_StereoGain );
00269 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer8">_StereoChannels</a>[backchannel].setRelativeGain( (1.0f - ratio)*_StereoGain );
00270
00271 <span class="comment">// Start next sound</span>
00272 <span class="keywordflow">if</span> ( <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer10">_Sustain</a> )
00273 {
00274 <a class="code" href="a04199.html#a0">nldebug</a>( <span class="stringliteral">"AM: EnvSound: Beginning crossfade: channel #%u rising"</span>, leadchannel );
00275 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer8">_StereoChannels</a>[leadchannel].setPriority( HighPri ) ;
00276 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer8">_StereoChannels</a>[leadchannel].play();
00277 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer10">_Sustain</a> = <span class="keyword">false</span>;
00278 }
00279 }
00280 <span class="keywordflow">else</span>
00281 {
00282 <span class="comment">// Set sustain gain (takes into account the possible changes to _StereoGain)</span>
00283 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer8">_StereoChannels</a>[leadchannel].setRelativeGain( _StereoGain );
00284
00285 <span class="comment">// Prepare next ambiant sound</span>
00286 <span class="keywordflow">if</span> ( ! <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer10">_Sustain</a> )
00287 {
00288 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer10">_Sustain</a> = <span class="keyword">true</span>;
00289 <a class="code" href="a05381.html#a62">TSoundId</a> nextsound = <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourceb2">getRandomSound</a>( _AmbiantSounds );
00290 <span class="preprocessor">#ifdef ENVSOUND_DONT_DUPLICATE_AMBIANT</span>
00291 <span class="preprocessor"></span> <a class="code" href="a04199.html#a6">nlassert</a>( <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer0">_AmbiantSounds</a>.size() > 1 ); <span class="comment">// or infinite loop</span>
00292 <span class="keywordflow">while</span> ( nextsound == <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer8">_StereoChannels</a>[leadchannel].getSound() )
00293 {
00294 <a class="code" href="a04199.html#a0">nldebug</a>( <span class="stringliteral">"AM: EnvSound: Avoiding ambiant sound duplication..."</span> );
00295 nextsound = <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourceb2">getRandomSound</a>( _AmbiantSounds );
00296 }
00297 <span class="preprocessor">#endif</span>
00298 <span class="preprocessor"></span> <a class="code" href="a04199.html#a0">nldebug</a>( <span class="stringliteral">"AM: EnvSound: Sustain: channel #1"</span> );
00299 _StereoChannels[backchannel].setRelativeGain( 0.0f );
00300 _StereoChannels[backchannel].stop(); <span class="comment">// we don't set the priority to LowPri</span>
00301 _StereoChannels[backchannel].setSound( nextsound );
00302 }
00303 }
00304
00305 <span class="comment">// Add a short random sound into the third source</span>
00306 <span class="keywordflow">if</span> ( ! <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer6">_SparseSounds</a>.empty() )
00307 {
00308 <span class="comment">// Set sustain gain (takes into account the possible changes to _StereoGain)</span>
00309 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer8">_StereoChannels</a>[<a class="code" href="a04254.html#a3">SPARSE_CH</a>].setRelativeGain( _StereoGain );
00310
00311 <span class="comment">// Start next sparse sound</span>
00312 <a class="code" href="a05378.html#a242">TTime</a> now = CTime::getLocalTime();
00313 <span class="keywordflow">if</span> ( now > <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer2">_NextSparseSoundTime</a> )
00314 {
00315 <a class="code" href="a05381.html#a62">TSoundId</a> nextsound = <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourceb2">getRandomSound</a>( _SparseSounds );
00316 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer8">_StereoChannels</a>[<a class="code" href="a04254.html#a3">SPARSE_CH</a>].stop();
00317 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer8">_StereoChannels</a>[<a class="code" href="a04254.html#a3">SPARSE_CH</a>].setSound( nextsound );
00318 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer8">_StereoChannels</a>[<a class="code" href="a04254.html#a3">SPARSE_CH</a>].setPriority( MidPri );
00319 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer8">_StereoChannels</a>[<a class="code" href="a04254.html#a3">SPARSE_CH</a>].play();
00320 <a class="code" href="a04199.html#a0">nldebug</a>( <span class="stringliteral">"AM: EnvSound: Playing sparse sound"</span> );
00321 <span class="keywordflow">if</span> ( <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourcer8">_StereoChannels</a>[<a class="code" href="a04254.html#a3">SPARSE_CH</a>].getTrack() == NULL )
00322 {
00323 <a class="code" href="a04199.html#a0">nldebug</a>( <span class="stringliteral">"AM: Ensound: Switch on sparse channel"</span> );
00324 <a class="code" href="a04199.html#a6">nlassert</a>( _StereoChannels[SPARSE_CH].getSound() != NULL );
00325 }
00326 <span class="comment">// Does not leave the track</span>
00327 <a class="code" href="a02194.html#NLSOUND_1_1CAmbiantSourceb1">calcRandomSparseSoundTime</a>( nextsound );
00328 }
00329 }
00330 }
</pre></div> </td>
</tr>
</table>
<hr><h2>Field Documentation</h2>
<a class="anchor" name="NLSOUND_1_1CAmbiantSourcer0" doxytag="NLSOUND::CAmbiantSource::_AmbiantSounds" ></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<<a class="el" href="a02246.html">CSound</a>*> <a class="el" href="a02194.html#NLSOUND_1_1CAmbiantSourcer0">NLSOUND::CAmbiantSource::_AmbiantSounds</a><code> [private]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="a05428.html#l00105">105</a> of file <a class="el" href="a05428.html">ambiant_source.h</a>.
<p>
Referenced by <a class="el" href="a05427.html#l00130">enable()</a>, <a class="el" href="a05427.html#l00092">initPos()</a>, <a class="el" href="a05427.html#l00406">setProperties()</a>, and <a class="el" href="a05427.html#l00239">update()</a>. </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1CAmbiantSourcer1" doxytag="NLSOUND::CAmbiantSource::_CrossfadeTime" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a11">uint32</a> <a class="el" href="a02194.html#NLSOUND_1_1CAmbiantSourcer1">NLSOUND::CAmbiantSource::_CrossfadeTime</a><code> [private]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="a05428.html#l00114">114</a> of file <a class="el" href="a05428.html">ambiant_source.h</a>.
<p>
Referenced by <a class="el" href="a05427.html#l00212">calcPosInCycle()</a>, <a class="el" href="a05427.html#l00406">setProperties()</a>, and <a class="el" href="a05427.html#l00239">update()</a>. </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1CAmbiantSourcer2" doxytag="NLSOUND::CAmbiantSource::_NextSparseSoundTime" ></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="a02194.html#NLSOUND_1_1CAmbiantSourcer2">NLSOUND::CAmbiantSource::_NextSparseSoundTime</a><code> [private]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="a05428.html#l00111">111</a> of file <a class="el" href="a05428.html">ambiant_source.h</a>.
<p>
Referenced by <a class="el" href="a05427.html#l00353">calcRandomSparseSoundTime()</a>, and <a class="el" href="a05427.html#l00239">update()</a>. </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1CAmbiantSourcer3" doxytag="NLSOUND::CAmbiantSource::_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"> bool <a class="el" href="a02194.html#NLSOUND_1_1CAmbiantSourcer3">NLSOUND::CAmbiantSource::_Play</a><code> [private]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="a05428.html#l00098">98</a> of file <a class="el" href="a05428.html">ambiant_source.h</a>.
<p>
Referenced by <a class="el" href="a05427.html#l00130">enable()</a>, and <a class="el" href="a05427.html#l00239">update()</a>. </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1CAmbiantSourcer4" doxytag="NLSOUND::CAmbiantSource::_RandomSoundChosen" ></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="a02194.html#NLSOUND_1_1CAmbiantSourcer4">NLSOUND::CAmbiantSource::_RandomSoundChosen</a><code> [private]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="a05428.html#l00110">110</a> of file <a class="el" href="a05428.html">ambiant_source.h</a>. </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1CAmbiantSourcer5" doxytag="NLSOUND::CAmbiantSource::_SparseAvgPeriod" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a11">uint32</a> <a class="el" href="a02194.html#NLSOUND_1_1CAmbiantSourcer5">NLSOUND::CAmbiantSource::_SparseAvgPeriod</a><code> [private]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="a05428.html#l00116">116</a> of file <a class="el" href="a05428.html">ambiant_source.h</a>.
<p>
Referenced by <a class="el" href="a05427.html#l00353">calcRandomSparseSoundTime()</a>, and <a class="el" href="a05427.html#l00406">setProperties()</a>. </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1CAmbiantSourcer6" doxytag="NLSOUND::CAmbiantSource::_SparseSounds" ></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<<a class="el" href="a02246.html">CSound</a>*> <a class="el" href="a02194.html#NLSOUND_1_1CAmbiantSourcer6">NLSOUND::CAmbiantSource::_SparseSounds</a><code> [private]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="a05428.html#l00105">105</a> of file <a class="el" href="a05428.html">ambiant_source.h</a>.
<p>
Referenced by <a class="el" href="a05427.html#l00092">initPos()</a>, <a class="el" href="a05427.html#l00406">setProperties()</a>, and <a class="el" href="a05427.html#l00239">update()</a>. </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1CAmbiantSourcer7" doxytag="NLSOUND::CAmbiantSource::_StartTime" ></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="a02194.html#NLSOUND_1_1CAmbiantSourcer7">NLSOUND::CAmbiantSource::_StartTime</a><code> [private]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="a05428.html#l00108">108</a> of file <a class="el" href="a05428.html">ambiant_source.h</a>. </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1CAmbiantSourcer8" doxytag="NLSOUND::CAmbiantSource::_StereoChannels" ></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="a03395.html">CSimpleSource</a> <a class="el" href="a02194.html#NLSOUND_1_1CAmbiantSourcer8">NLSOUND::CAmbiantSource::_StereoChannels</a>[ 3 ]<code> [private]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="a05428.html#l00101">101</a> of file <a class="el" href="a05428.html">ambiant_source.h</a>.
<p>
Referenced by <a class="el" href="a05427.html#l00047">CAmbiantSource()</a>, <a class="el" href="a05427.html#l00130">enable()</a>, <a class="el" href="a05428.html#l00079">getChannels()</a>, <a class="el" href="a05427.html#l00092">initPos()</a>, <a class="el" href="a05427.html#l00239">update()</a>, and <a class="el" href="a05427.html#l00067">~CAmbiantSource()</a>. </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1CAmbiantSourcer9" doxytag="NLSOUND::CAmbiantSource::_StereoGain" ></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="a02194.html#NLSOUND_1_1CAmbiantSourcer9">NLSOUND::CAmbiantSource::_StereoGain</a><code> [private]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="a05428.html#l00102">102</a> of file <a class="el" href="a05428.html">ambiant_source.h</a>.
<p>
Referenced by <a class="el" href="a05427.html#l00130">enable()</a>, and <a class="el" href="a05427.html#l00239">update()</a>. </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1CAmbiantSourcer10" doxytag="NLSOUND::CAmbiantSource::_Sustain" ></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="a02194.html#NLSOUND_1_1CAmbiantSourcer10">NLSOUND::CAmbiantSource::_Sustain</a><code> [private]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="a05428.html#l00109">109</a> of file <a class="el" href="a05428.html">ambiant_source.h</a>.
<p>
Referenced by <a class="el" href="a05427.html#l00239">update()</a>. </td>
</tr>
</table>
<a class="anchor" name="NLSOUND_1_1CAmbiantSourcer11" doxytag="NLSOUND::CAmbiantSource::_SustainTime" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a11">uint32</a> <a class="el" href="a02194.html#NLSOUND_1_1CAmbiantSourcer11">NLSOUND::CAmbiantSource::_SustainTime</a><code> [private]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
<p>
Definition at line <a class="el" href="a05428.html#l00115">115</a> of file <a class="el" href="a05428.html">ambiant_source.h</a>.
<p>
Referenced by <a class="el" href="a05427.html#l00212">calcPosInCycle()</a>, and <a class="el" href="a05427.html#l00406">setProperties()</a>. </td>
</tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="a05428.html">ambiant_source.h</a><li><a class="el" href="a05427.html">ambiant_source.cpp</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 14:28:05 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>
|