forked from fxsound2/fxsound-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdfxpComm.cpp
More file actions
1741 lines (1419 loc) · 58.2 KB
/
Copy pathdfxpComm.cpp
File metadata and controls
1741 lines (1419 loc) · 58.2 KB
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
/*
FxSound
Copyright (C) 2023 FxSound LLC
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* dfxpComm.cpp */
#include "codedefs.h"
#include <windows.h>
#include <stdio.h>
#include <math.h>
#include "u_dfxp.h"
#include "dfxp.h"
#include "DfxSdk.h"
#include "com.h"
#include "qnt.h"
#include "math.h"
#include "midi.h"
#include "filt.h"
#include "C_Play.h"
#include "C_aural.h"
#include "C_dsps.h"
#include "c_lex.h"
#include "c_max.h"
#include "c_aural.h"
#include "c_wid.h"
#include "c_dly1.h"
/*
* Any midi setting for Ambience at this value or below will be
* treated as 0.
*/
#define DFXP_MIN_EFFECTIVE_MIDI_AMBIENCE 12
/*
* FUNCTION: dfxp_CommunicateInit()
* DESCRIPTION:
* Initialize the Comm handle. This function should only be called once
* at the beginning.
*/
int dfxp_CommunicateInit(PT_HANDLE *hp_dfxp)
{
struct dfxpHdlType *cast_handle;
cast_handle = (struct dfxpHdlType *)(hp_dfxp);
if (cast_handle == NULL)
return(OKAY);
struct {
int softdsp_mode;
int board_address;
int processor_num;
long base_address;
char cp_dsp_dirpath[64];
int num_cards_configured;
} obsolete;
/*
* Initialize the variables which are passed to comInit but really don't
* have any meaning except are in the function call for historical
* purposes.
*/
obsolete.softdsp_mode = IS_TRUE;
obsolete.board_address = 0;
obsolete.processor_num = 1;
obsolete.base_address = 0L;
obsolete.num_cards_configured = 0;
sprintf(obsolete.cp_dsp_dirpath, "");
if (comInit(&(cast_handle->com_hdl_front), obsolete.softdsp_mode, obsolete.board_address,
obsolete.processor_num, obsolete.base_address, obsolete.cp_dsp_dirpath,
obsolete.num_cards_configured, cast_handle->slout1) != OKAY)
return(NOT_OKAY);
if (comInit(&(cast_handle->com_hdl_rear), obsolete.softdsp_mode, obsolete.board_address,
obsolete.processor_num, obsolete.base_address, obsolete.cp_dsp_dirpath,
obsolete.num_cards_configured, cast_handle->slout1) != OKAY)
return(NOT_OKAY);
if (comInit(&(cast_handle->com_hdl_side), obsolete.softdsp_mode, obsolete.board_address,
obsolete.processor_num, obsolete.base_address, obsolete.cp_dsp_dirpath,
obsolete.num_cards_configured, cast_handle->slout1) != OKAY)
return(NOT_OKAY);
if (comInit(&(cast_handle->com_hdl_center), obsolete.softdsp_mode, obsolete.board_address,
obsolete.processor_num, obsolete.base_address, obsolete.cp_dsp_dirpath,
obsolete.num_cards_configured, cast_handle->slout1) != OKAY)
return(NOT_OKAY);
if (comInit(&(cast_handle->com_hdl_subwoofer), obsolete.softdsp_mode, obsolete.board_address,
obsolete.processor_num, obsolete.base_address, obsolete.cp_dsp_dirpath,
obsolete.num_cards_configured, cast_handle->slout1) != OKAY)
return(NOT_OKAY);
if (dfxp_ComLoadAndRun(hp_dfxp) != OKAY)
return(NOT_OKAY);
if (dfxpCommunicateAll(hp_dfxp) != OKAY)
return(NOT_OKAY);
return(OKAY);
}
/*
* FUNCTION: dfxp_ComLoadAndRun()
* DESCRIPTION:
* Load and run the dsp program. This needs to be called whenever the
* sampling freq, or bit width changes.
*/
int dfxp_ComLoadAndRun(PT_HANDLE *hp_dfxp)
{
struct dfxpHdlType *cast_handle;
cast_handle = (struct dfxpHdlType *)(hp_dfxp);
if (cast_handle == NULL)
return(OKAY);
int stereo_flag;
if (cast_handle->num_channels_out == 1)
stereo_flag = IS_FALSE;
else
stereo_flag = IS_TRUE;
if( cast_handle->num_channels_out == 1 )
{
if (comSoftDspLoadAndRunNonShared(cast_handle->com_hdl_front, DFXP_DSP_FUNCTION_NAME, cast_handle->internal_sampling_freq,
stereo_flag, (short)DFXP_DSP_INTERNAL_BIT_WIDTH) != OKAY)
return(NOT_OKAY);
}
if( cast_handle->num_channels_out >= 2 )
{
// Front and rear channels as stereo
if (comSoftDspLoadAndRunNonShared(cast_handle->com_hdl_front, DFXP_DSP_FUNCTION_NAME, cast_handle->internal_sampling_freq,
stereo_flag, (short)DFXP_DSP_INTERNAL_BIT_WIDTH) != OKAY)
return(NOT_OKAY);
if (comSoftDspLoadAndRunNonShared(cast_handle->com_hdl_rear, DFXP_DSP_FUNCTION_NAME, cast_handle->internal_sampling_freq,
stereo_flag, (short)DFXP_DSP_INTERNAL_BIT_WIDTH) != OKAY)
return(NOT_OKAY);
if (comSoftDspLoadAndRunNonShared(cast_handle->com_hdl_side, DFXP_DSP_FUNCTION_NAME, cast_handle->internal_sampling_freq,
stereo_flag, (short)DFXP_DSP_INTERNAL_BIT_WIDTH) != OKAY)
return(NOT_OKAY);
// Center and Subwoofer as mono
if (comSoftDspLoadAndRunNonShared(cast_handle->com_hdl_center, DFXP_DSP_FUNCTION_NAME, cast_handle->internal_sampling_freq,
IS_FALSE, (short)DFXP_DSP_INTERNAL_BIT_WIDTH) != OKAY)
return(NOT_OKAY);
if (comSoftDspLoadAndRunNonShared(cast_handle->com_hdl_subwoofer, DFXP_DSP_FUNCTION_NAME, cast_handle->internal_sampling_freq,
IS_FALSE, (short)DFXP_DSP_INTERNAL_BIT_WIDTH) != OKAY)
return(NOT_OKAY);
}
return(OKAY);
}
/*
* FUNCTION: dfxpCommunicateAll()
* DESCRIPTION:
* Communicate to the DSP all the information needed for processing.
*/
int dfxpCommunicateAll(PT_HANDLE *hp_dfxp)
{
/* Communicate all the parameters that can change based on user controls */
if (dfxpCommunicateAllNonFixed(hp_dfxp, IS_FALSE) != OKAY)
return(NOT_OKAY);
/* Communicate all the parameters that don't change based on user controls */
if (dfxp_CommunicateAllFixed(hp_dfxp) != OKAY)
return(NOT_OKAY);
return(OKAY);
}
/*
* FUNCTION: dfxpCommunicateAllNonFixed()
* DESCRIPTION:
* Communicate to the DSP all the information needed for processing which can change
* based on user interaction.
*
* The i_communicate_slowly flag is used to specify that we want to save CPU power in cases in which we have
* no choice but to call this function for every buffer since the UI is running in a seperate process, such as the XP winmm and dsound DLL cases.
*/
int dfxpCommunicateAllNonFixed(PT_HANDLE *hp_dfxp, int i_communicate_slowly_flag)
{
struct dfxpHdlType *cast_handle;
int i, eqOnReg;
realtype boostCut;
wchar_t wcp_boost_cut[PT_MAX_GENERIC_STRLEN];
cast_handle = (struct dfxpHdlType *)(hp_dfxp);
if (cast_handle == NULL)
return(OKAY);
if ((!i_communicate_slowly_flag) ||
(i_communicate_slowly_flag && cast_handle->i_communicate_slowly_count == 0))
{
if (dfxp_CommunicateFidelity(hp_dfxp) != OKAY)
return(NOT_OKAY);
}
if ((!i_communicate_slowly_flag) ||
(i_communicate_slowly_flag && cast_handle->i_communicate_slowly_count == 5))
{
if (dfxp_CommunicateSpaciousness(hp_dfxp) != OKAY)
return(NOT_OKAY);
}
if ((!i_communicate_slowly_flag) ||
(i_communicate_slowly_flag && cast_handle->i_communicate_slowly_count == 10))
{
if (dfxp_CommunicateAmbience(hp_dfxp) != OKAY)
return(NOT_OKAY);
}
if ((!i_communicate_slowly_flag) ||
(i_communicate_slowly_flag && cast_handle->i_communicate_slowly_count == 15))
{
if (dfxp_CommunicateBassBoost(hp_dfxp) != OKAY)
return(NOT_OKAY);
}
if ((!i_communicate_slowly_flag) ||
(i_communicate_slowly_flag && cast_handle->i_communicate_slowly_count == 20))
{
if (dfxp_CommunicateVocalReduction(hp_dfxp) != OKAY)
return(NOT_OKAY);
}
if ((!i_communicate_slowly_flag) ||
(i_communicate_slowly_flag && cast_handle->i_communicate_slowly_count == 25))
{
if (dfxp_CommunicateBypassSettings(hp_dfxp) != OKAY)
return(NOT_OKAY);
}
if ((!i_communicate_slowly_flag) ||
(i_communicate_slowly_flag && cast_handle->i_communicate_slowly_count == 30))
{
if (dfxp_CommunicateMusicMode(hp_dfxp) != OKAY)
return(NOT_OKAY);
}
// This code section only executes in the XP case when running from the winmm or dsound dll's, in this case cast_handle->processing_only is TRUE.
// It implements the key dfxp calls required to update the EQ params that are performed in the sound card case by dfxg_UpdateFromRegistryEQ,
// so if the content of that function changes the code here must be updated.
if (cast_handle->processing_only)
{
if ((!i_communicate_slowly_flag) ||
(i_communicate_slowly_flag && cast_handle->i_communicate_slowly_count == 35))
{
// NOTE, the init and processing calls in the winmm and dsound dll's are called asyncronously so the processing call is made before the dfxp init call has fully completed.
// The check below prevents trying to make use of the dfxp and EQ handles before initialization of them has been completed.
if (cast_handle->fully_initialized == TRUE)
{
if (dfxpEqGetProcessingOn(hp_dfxp, DFXP_STORAGE_TYPE_REGISTRY, &eqOnReg) != OKAY)
return(NOT_OKAY);
if (dfxpEqSetProcessingOn(hp_dfxp, DFXP_STORAGE_TYPE_MEMORY, eqOnReg) != OKAY)
return(NOT_OKAY);
for(i=2;i<=DFXP_GRAPHIC_EQ_NUM_BANDS;i++)
{
if( dfxpEqGetBandBoostCut_FromRegistry(hp_dfxp, i, &boostCut, wcp_boost_cut) != OKAY)
return(NOT_OKAY);
if( dfxpEqSetBandBoostCut(hp_dfxp, DFXP_STORAGE_TYPE_MEMORY, i, boostCut) != OKAY)
return(NOT_OKAY);
}
}
}
}
/* Dynamic Boost is communicated in dfxp_CommunicateBypassSettings() */
if (i_communicate_slowly_flag)
{
(cast_handle->i_communicate_slowly_count)++;
if (cast_handle->i_communicate_slowly_count == 40)
cast_handle->i_communicate_slowly_count = 0;
}
return(OKAY);
}
/*
* FUNCTION: dfxp_CommunicateAllFixed()
* DESCRIPTION:
* Communicate to the DSP all the information needed for processing which does not change
* based on user interaction.
*/
int dfxp_CommunicateAllFixed(PT_HANDLE *hp_dfxp)
{
struct dfxpHdlType *cast_handle;
cast_handle = (struct dfxpHdlType *)(hp_dfxp);
if (cast_handle == NULL)
return(OKAY);
if (dfxp_CommunicateFixedQnts_Aural(hp_dfxp) != OKAY)
return(NOT_OKAY);
if (dfxp_CommunicateFixedQnts_Lex(hp_dfxp) != OKAY)
return(NOT_OKAY);
if (dfxp_CommunicateFixedQnts_Opt(hp_dfxp) != OKAY)
return(NOT_OKAY);
if (dfxp_CommunicateFixedQnts_Wid(hp_dfxp) != OKAY)
return(NOT_OKAY);
if (dfxp_CommunicateFixedQnts_Play(hp_dfxp) != OKAY)
return(NOT_OKAY);
if (dfxp_CommunicateFixedQnts_Delay(hp_dfxp) != OKAY)
return(NOT_OKAY);
return(OKAY);
}
/*
* FUNCTION: dfxp_CommunicateBypassSettings()
* DESCRIPTION:
* Communicates the bypass settings.
*/
int dfxp_CommunicateBypassSettings(PT_HANDLE *hp_dfxp)
{
struct dfxpHdlType *cast_handle;
cast_handle = (struct dfxpHdlType *)(hp_dfxp);
if (cast_handle == NULL)
return(OKAY);
int bypass_fidelity;
int bypass_surround;
int bypass_bass_boost;
int bypass_vocal_reduction;
int fidelity_on;
int surround_on;
int bass_boost_on;
int headphone_on;
int vocal_reduction_on;
int stereo_or_mono_flag;
int surround_sound_flag;
int bypass_all;
/* Get the current settings */
if (dfxpGetButtonValue(hp_dfxp, DFX_UI_BUTTON_BYPASS, &bypass_all) != OKAY)
return(NOT_OKAY);
if (dfxpGetButtonValue(hp_dfxp, DFX_UI_BUTTON_FIDELITY, &fidelity_on) != OKAY)
return(NOT_OKAY);
bypass_fidelity = !fidelity_on;
if (dfxpGetButtonValue(hp_dfxp, DFX_UI_BUTTON_SURROUND, &surround_on) != OKAY)
return(NOT_OKAY);
bypass_surround = !surround_on;
if (dfxpGetButtonValue(hp_dfxp, DFX_UI_BUTTON_BASS_BOOST, &bass_boost_on) != OKAY)
return(NOT_OKAY);
bypass_bass_boost = !bass_boost_on;
if (dfxpGetButtonValue(hp_dfxp, DFX_UI_BUTTON_HEADPHONE, &headphone_on) != OKAY)
return(NOT_OKAY);
cast_handle->binaural_headphone_on_flag = headphone_on;
if (dfxpGetButtonValue(hp_dfxp, DFX_UI_BUTTON_VOCAL_REDUCTION_ON, &vocal_reduction_on) != OKAY)
return(NOT_OKAY);
bypass_vocal_reduction = !vocal_reduction_on;
/* Take care of the override processing setting */
if (cast_handle->processing_override == DFXP_PROCESSING_OVERRIDE_DFX_ALL_EXCEPT_OPTIMIZER)
{
bypass_fidelity = IS_TRUE;
bypass_surround = IS_TRUE;
bypass_bass_boost = IS_TRUE;
bypass_vocal_reduction = IS_TRUE;
cast_handle->binaural_headphone_on_flag = IS_FALSE;
}
if(cast_handle->num_channels_out <= 2)
{
stereo_or_mono_flag = 1;
surround_sound_flag = 0;
}
else
{
stereo_or_mono_flag = 0;
surround_sound_flag = 1;
}
/* Send the master bypass */
// Force master bypass on SurroundSound channels when in stereo or mono mode.
if (comLongIntWrite(cast_handle->com_hdl_front, DSP_PLAY_BYPASS_ON, bypass_all) != OKAY)
return(NOT_OKAY);
if (comLongIntWrite(cast_handle->com_hdl_rear, DSP_PLAY_BYPASS_ON, (bypass_all | stereo_or_mono_flag) ) != OKAY)
return(NOT_OKAY);
if (comLongIntWrite(cast_handle->com_hdl_side, DSP_PLAY_BYPASS_ON, (bypass_all | stereo_or_mono_flag) ) != OKAY)
return(NOT_OKAY);
if (comLongIntWrite(cast_handle->com_hdl_center, DSP_PLAY_BYPASS_ON, (bypass_all | stereo_or_mono_flag) ) != OKAY)
return(NOT_OKAY);
if (comLongIntWrite(cast_handle->com_hdl_subwoofer, DSP_PLAY_BYPASS_ON, (bypass_all | stereo_or_mono_flag) ) != OKAY)
return(NOT_OKAY);
/* Send the individual knob bypass settings */
// Activator is always off on subwoofer channel
if (comLongIntWrite(cast_handle->com_hdl_front, DSP_PLAY_ACTIVATOR_ON, !(bypass_fidelity)) != OKAY)
return(NOT_OKAY);
if (comLongIntWrite(cast_handle->com_hdl_rear, DSP_PLAY_ACTIVATOR_ON, !(bypass_fidelity)) != OKAY)
return(NOT_OKAY);
if (comLongIntWrite(cast_handle->com_hdl_side, DSP_PLAY_ACTIVATOR_ON, !(bypass_fidelity)) != OKAY)
return(NOT_OKAY);
if (comLongIntWrite(cast_handle->com_hdl_center, DSP_PLAY_ACTIVATOR_ON, !(bypass_fidelity)) != OKAY)
return(NOT_OKAY);
if (comLongIntWrite(cast_handle->com_hdl_subwoofer, DSP_PLAY_ACTIVATOR_ON, 0) != OKAY)
return(NOT_OKAY);
// Widener is always off in center and subwoofer channels
if (comLongIntWrite(cast_handle->com_hdl_front, DSP_PLAY_WIDENER_ON, !(bypass_surround)) != OKAY)
return(NOT_OKAY);
if (comLongIntWrite(cast_handle->com_hdl_rear, DSP_PLAY_WIDENER_ON, !(bypass_surround)) != OKAY)
return(NOT_OKAY);
if (comLongIntWrite(cast_handle->com_hdl_side, DSP_PLAY_WIDENER_ON, !(bypass_surround)) != OKAY)
return(NOT_OKAY);
if (comLongIntWrite(cast_handle->com_hdl_center, DSP_PLAY_WIDENER_ON, 0) != OKAY)
return(NOT_OKAY);
if (comLongIntWrite(cast_handle->com_hdl_subwoofer, DSP_PLAY_WIDENER_ON, 0) != OKAY)
return(NOT_OKAY);
// For Surround Sound mode, bass boost is only on in subwoofer channel
// PTNOTE - on 10/29/10, modified to always allow bass boost on front channels
//if (comLongIntWrite(cast_handle->com_hdl_front, DSP_PLAY_BASS_BOOST_ON, (!(bypass_bass_boost) & stereo_or_mono_flag) ) != OKAY)
if (comLongIntWrite(cast_handle->com_hdl_front, DSP_PLAY_BASS_BOOST_ON, !(bypass_bass_boost)) != OKAY)
return(NOT_OKAY);
if (comLongIntWrite(cast_handle->com_hdl_rear, DSP_PLAY_BASS_BOOST_ON, 0) != OKAY)
return(NOT_OKAY);
if (comLongIntWrite(cast_handle->com_hdl_side, DSP_PLAY_BASS_BOOST_ON, 0) != OKAY)
return(NOT_OKAY);
if (comLongIntWrite(cast_handle->com_hdl_center, DSP_PLAY_BASS_BOOST_ON, 0) != OKAY)
return(NOT_OKAY);
if (comLongIntWrite(cast_handle->com_hdl_subwoofer, DSP_PLAY_BASS_BOOST_ON, (!(bypass_bass_boost) & surround_sound_flag)) != OKAY)
return(NOT_OKAY);
// Vocal reduction only in in front channels
if (comLongIntWrite(cast_handle->com_hdl_front, DSP_PLAY_VOCAL_REDUCTION_ON, !(bypass_vocal_reduction)) != OKAY)
return(NOT_OKAY);
if (comLongIntWrite(cast_handle->com_hdl_rear, DSP_PLAY_VOCAL_REDUCTION_ON, 0) != OKAY)
return(NOT_OKAY);
if (comLongIntWrite(cast_handle->com_hdl_side, DSP_PLAY_VOCAL_REDUCTION_ON, 0) != OKAY)
return(NOT_OKAY);
if (comLongIntWrite(cast_handle->com_hdl_center, DSP_PLAY_VOCAL_REDUCTION_ON, 0) != OKAY)
return(NOT_OKAY);
if (comLongIntWrite(cast_handle->com_hdl_subwoofer, DSP_PLAY_VOCAL_REDUCTION_ON, 0) != OKAY)
return(NOT_OKAY);
/* Do special calculation for Ambience bypass */
if (dfxp_CommAmbienceBypass(hp_dfxp) != OKAY)
return(NOT_OKAY);
/*
* Send the optimizer bypass (Since in this case we really want to just send
* a zero knob setting when in bypass we will just call the normal comm for
* the optimizer
*/
if (dfxp_CommunicateDynamicBoost(hp_dfxp) != OKAY)
return(NOT_OKAY);
/* PTNOTE - this older headphone mode has been replaced by the BinauralSyn technology. Turn off this older version */
/*
// Headphone mode only on in front channels when in stereo mode
if (comLongIntWrite(cast_handle->com_hdl_front, DSP_PLAY_HEADPHONE_ON, (!(bypass_headphone) & stereo_or_mono_flag) ) != OKAY)
return(NOT_OKAY); */
if (comLongIntWrite(cast_handle->com_hdl_front, DSP_PLAY_HEADPHONE_ON, 0 ) != OKAY)
return(NOT_OKAY);
// These channels always had the older headphone technology off
if (comLongIntWrite(cast_handle->com_hdl_rear, DSP_PLAY_HEADPHONE_ON, 0) != OKAY)
return(NOT_OKAY);
if (comLongIntWrite(cast_handle->com_hdl_side, DSP_PLAY_HEADPHONE_ON, 0) != OKAY)
return(NOT_OKAY);
if (comLongIntWrite(cast_handle->com_hdl_center, DSP_PLAY_HEADPHONE_ON, 0) != OKAY)
return(NOT_OKAY);
if (comLongIntWrite(cast_handle->com_hdl_subwoofer, DSP_PLAY_HEADPHONE_ON, 0) != OKAY)
return(NOT_OKAY);
return(OKAY);
}
/*
* FUNCTION: dfxp_CommunicateFidelity()
* DESCRIPTION:
*/
int dfxp_CommunicateFidelity(PT_HANDLE *hp_dfxp)
{
struct dfxpHdlType *cast_handle;
cast_handle = (struct dfxpHdlType *)(hp_dfxp);
if (cast_handle == NULL)
return(OKAY);
int pc_fidelity;
realtype dsp_fidelity;
int music_mode;
if (dfxp_GetKnobValue_MIDI(hp_dfxp, DFX_UI_KNOB_FIDELITY, &pc_fidelity) != OKAY)
return(NOT_OKAY);
if (dfxpGetButtonValue(hp_dfxp, DFX_UI_BUTTON_MUSIC_MODE, &music_mode) != OKAY)
return(NOT_OKAY);
if (music_mode == DFX_UI_MUSIC_MODE_SPEECH)
{
pc_fidelity = (int)(pc_fidelity * DFXP_SPEECH_MODE_FIDELITY_FACTOR);
if (pc_fidelity > MIDI_MAX_VALUE)
pc_fidelity = MIDI_MAX_VALUE;
}
/* Calculate the value that should be sent to the dsp card */
if (qntIToRCalc(cast_handle->midi_to_dsp.fidelity_qnt_hdl,
pc_fidelity,
&dsp_fidelity) != OKAY)
return(NOT_OKAY);
// Note every channel gets normal fidelity except for subwoofer channel, which will always be bypassed
if (comRealWrite(cast_handle->com_hdl_front, AURAL_DRIVE + DSP_PLAY_AURAL_PARAM_OFFSET,
dsp_fidelity) != OKAY)
return(NOT_OKAY);
if (comRealWrite(cast_handle->com_hdl_rear, AURAL_DRIVE + DSP_PLAY_AURAL_PARAM_OFFSET,
dsp_fidelity) != OKAY)
return(NOT_OKAY);
if (comRealWrite(cast_handle->com_hdl_side, AURAL_DRIVE + DSP_PLAY_AURAL_PARAM_OFFSET,
dsp_fidelity) != OKAY)
return(NOT_OKAY);
if (comRealWrite(cast_handle->com_hdl_center, AURAL_DRIVE + DSP_PLAY_AURAL_PARAM_OFFSET,
dsp_fidelity) != OKAY)
return(NOT_OKAY);
return(OKAY);
}
/*
* FUNCTION: dfxp_CommunicateAmbience()
* DESCRIPTION:
*/
int dfxp_CommunicateAmbience(PT_HANDLE *hp_dfxp)
{
struct dfxpHdlType *cast_handle;
cast_handle = (struct dfxpHdlType *)(hp_dfxp);
if (cast_handle == NULL)
return(OKAY);
int pc_liveliness;
realtype dsp_decay;
realtype dsp_lat6_coeff;
int pc_size;
realtype roomsize;
realtype wet_gain;
realtype dry_gain;
int music_mode;
if (dfxp_GetKnobValue_MIDI(hp_dfxp, DFX_UI_KNOB_AMBIENCE, &pc_liveliness) != OKAY)
return(NOT_OKAY);
if (dfxpGetButtonValue(hp_dfxp, DFX_UI_BUTTON_MUSIC_MODE, &music_mode) != OKAY)
return(NOT_OKAY);
/* For MUSIC2 and SPEECH modes warp ambience to very low level */
if (music_mode != DFX_UI_MUSIC_MODE_MUSIC1)
pc_liveliness = (int)((realtype)pc_liveliness * DFXP_MUSIC_MODE2_AMBIENCE_FACTOR);
/* Hardcode the room size */
pc_size = DSP_PLAY_LEX_ROOM_SIZE_MIDI;
/* Get the roomsize value so we can compensate the liveliness */
if (qntIToRCalc(cast_handle->midi_to_dsp.room_size_qnt_hdl, pc_size, &roomsize) != OKAY)
return(NOT_OKAY);
/* Calculate the values that should be sent to the dsp card */
if (qntIToRCalc(cast_handle->midi_to_dsp.ambience_qnt_hdl, pc_liveliness, &dsp_decay) != OKAY)
return(NOT_OKAY);
/* Now compensate decay for roomsize */
dsp_decay = (realtype)pow(dsp_decay, roomsize);
dsp_lat6_coeff = dsp_decay + (realtype)0.15;
if( dsp_lat6_coeff < (realtype)0.25 )
dsp_lat6_coeff = (realtype)0.25;
if( dsp_lat6_coeff > (realtype)0.5 )
dsp_lat6_coeff = (realtype)0.5;
// For lower setting of ambience, warp wet/dry settings
// Note that 0 setting covers value from 0 to 12 and ambience is bypassed for 12 and below
if( pc_liveliness > 40 )
{
// Note that these are the fixed values used in version 6 and earlier
wet_gain = (realtype)(0.21 * 1.3);
dry_gain = (realtype)(0.69 * 1.3);
}
else
{
// Do warping so that at low pc_liveness wet is tending to zero.
wet_gain = (realtype)((pc_liveliness - 12) * (1.0/(40 - 12)) * (0.21 * 1.3));
dry_gain = (realtype)0.897 + (realtype)((40 - pc_liveliness) * (1.0/(40 - 12))) * (realtype)(1.0 - 0.897);
}
// Ambience will always be bypassed on subwoofer channel, so don't send to that one
if (comRealWrite(cast_handle->com_hdl_front, DRY_GAIN + DSP_PLAY_LEX_PARAM_OFFSET, dry_gain) != OKAY)
return(NOT_OKAY);
if (comRealWrite(cast_handle->com_hdl_rear, DRY_GAIN + DSP_PLAY_LEX_PARAM_OFFSET, dry_gain) != OKAY)
return(NOT_OKAY);
if (comRealWrite(cast_handle->com_hdl_side, DRY_GAIN + DSP_PLAY_LEX_PARAM_OFFSET, dry_gain) != OKAY)
return(NOT_OKAY);
if (comRealWrite(cast_handle->com_hdl_center, DRY_GAIN + DSP_PLAY_LEX_PARAM_OFFSET, dry_gain) != OKAY)
return(NOT_OKAY);
if (comRealWrite(cast_handle->com_hdl_front, WET_GAIN + DSP_PLAY_LEX_PARAM_OFFSET, wet_gain) != OKAY)
return(NOT_OKAY);
if (comRealWrite(cast_handle->com_hdl_rear, WET_GAIN + DSP_PLAY_LEX_PARAM_OFFSET, wet_gain) != OKAY)
return(NOT_OKAY);
if (comRealWrite(cast_handle->com_hdl_side, WET_GAIN + DSP_PLAY_LEX_PARAM_OFFSET, wet_gain) != OKAY)
return(NOT_OKAY);
if (comRealWrite(cast_handle->com_hdl_center, WET_GAIN + DSP_PLAY_LEX_PARAM_OFFSET, wet_gain) != OKAY)
return(NOT_OKAY);
if (comRealWrite(cast_handle->com_hdl_front, LEX_DECAY + DSP_PLAY_LEX_PARAM_OFFSET, dsp_decay) != OKAY)
return(NOT_OKAY);
if (comRealWrite(cast_handle->com_hdl_rear, LEX_DECAY + DSP_PLAY_LEX_PARAM_OFFSET, dsp_decay) != OKAY)
return(NOT_OKAY);
if (comRealWrite(cast_handle->com_hdl_side, LEX_DECAY + DSP_PLAY_LEX_PARAM_OFFSET, dsp_decay) != OKAY)
return(NOT_OKAY);
if (comRealWrite(cast_handle->com_hdl_center, LEX_DECAY + DSP_PLAY_LEX_PARAM_OFFSET, dsp_decay) != OKAY)
return(NOT_OKAY);
if (comRealWrite(cast_handle->com_hdl_front, LEX_LAT6_COEFF + DSP_PLAY_LEX_PARAM_OFFSET, dsp_lat6_coeff) != OKAY)
return(NOT_OKAY);
if (comRealWrite(cast_handle->com_hdl_rear, LEX_LAT6_COEFF + DSP_PLAY_LEX_PARAM_OFFSET, dsp_lat6_coeff) != OKAY)
return(NOT_OKAY);
if (comRealWrite(cast_handle->com_hdl_side, LEX_LAT6_COEFF + DSP_PLAY_LEX_PARAM_OFFSET, dsp_lat6_coeff) != OKAY)
return(NOT_OKAY);
if (comRealWrite(cast_handle->com_hdl_center, LEX_LAT6_COEFF + DSP_PLAY_LEX_PARAM_OFFSET, dsp_lat6_coeff) != OKAY)
return(NOT_OKAY);
/*
* Due to the fact that the bypass for Ambience also depends on the
* knob setting, we must send the correct bypass setting.
*/
if (dfxp_CommAmbienceBypass(hp_dfxp) != OKAY)
return(NOT_OKAY);
return(OKAY);
}
/*
* FUNCTION: dfxp_CommunicateDynamicBoost()
* DESCRIPTION:
* Communicates to the dsp card the current gain boost value
*/
int dfxp_CommunicateDynamicBoost(PT_HANDLE *hp_dfxp)
{
struct dfxpHdlType *cast_handle;
cast_handle = (struct dfxpHdlType *)(hp_dfxp);
if (cast_handle == NULL)
return(OKAY);
int pc_gain_boost;
int max_delay;
realtype dsp_gain_boost;
int bypass_all;
int music_mode;
int dynamic_boost_on;
int bypass_dynamic_boost;
if (dfxp_GetKnobValue_MIDI(hp_dfxp, DFX_UI_KNOB_DYNAMIC_BOOST, &pc_gain_boost) != OKAY)
return(NOT_OKAY);
if (dfxpGetButtonValue(hp_dfxp, DFX_UI_BUTTON_MUSIC_MODE, &music_mode) != OKAY)
return(NOT_OKAY);
switch(music_mode)
{
case DFX_UI_MUSIC_MODE_MUSIC2 :
pc_gain_boost = (int)((realtype)(DFXP_MUSIC_MODE2_DYNAMIC_BOOST_FACTOR) * pc_gain_boost);
break;
case DFX_UI_MUSIC_MODE_SPEECH :
pc_gain_boost = (int)((realtype)(DFXP_SPEECH_MODE_DYNAMIC_BOOST_FACTOR) * pc_gain_boost);
break;
}
/* Limit warped gain boost */
if( pc_gain_boost > MIDI_MAX_VALUE )
pc_gain_boost = MIDI_MAX_VALUE;
/* Get the bypass settings */;
if (dfxpGetButtonValue(hp_dfxp, DFX_UI_BUTTON_BYPASS, &bypass_all) != OKAY)
return(NOT_OKAY);
if (dfxpGetButtonValue(hp_dfxp, DFX_UI_BUTTON_DYNAMIC_BOOST, &dynamic_boost_on) != OKAY)
return(NOT_OKAY);
bypass_dynamic_boost = !dynamic_boost_on;
/* Check if we should bypass */
if ((bypass_dynamic_boost) || bypass_all)
pc_gain_boost = MIDI_MIN_VALUE;
/* Take care of overriding the processing */
if ((cast_handle->processing_override == DFXP_PROCESSING_OVERRIDE_DFX_ALL_EXCEPT_OPTIMIZER) ||
(cast_handle->processing_override == DFXP_PROCESSING_OVERRIDE_DYNAMIC_BOOST))
pc_gain_boost = MIDI_MIN_VALUE;
/* Scale control value directly for now */
pc_gain_boost = (int)((realtype)pc_gain_boost * (realtype)PLY_OPTIMIZER_BOOST_MAX_SCALE);
/* Calculate the value that should be sent to the dsp card */
if (qntIToRCalc(cast_handle->midi_to_dsp.dynamic_boost_qnt_hdl, pc_gain_boost, &dsp_gain_boost) != OKAY)
return(NOT_OKAY);
if (comRealWrite(cast_handle->com_hdl_front, MAXIMIZE_GAIN_BOOST + DSP_PLAY_OPTIMIZER_PARAM_OFFSET,
dsp_gain_boost) != OKAY)
return(NOT_OKAY);
if (comRealWrite(cast_handle->com_hdl_rear, MAXIMIZE_GAIN_BOOST + DSP_PLAY_OPTIMIZER_PARAM_OFFSET,
dsp_gain_boost) != OKAY)
return(NOT_OKAY);
if (comRealWrite(cast_handle->com_hdl_side, MAXIMIZE_GAIN_BOOST + DSP_PLAY_OPTIMIZER_PARAM_OFFSET,
dsp_gain_boost) != OKAY)
return(NOT_OKAY);
if (comRealWrite(cast_handle->com_hdl_center, MAXIMIZE_GAIN_BOOST + DSP_PLAY_OPTIMIZER_PARAM_OFFSET,
dsp_gain_boost) != OKAY)
return(NOT_OKAY);
if (comRealWrite(cast_handle->com_hdl_subwoofer, MAXIMIZE_GAIN_BOOST + DSP_PLAY_OPTIMIZER_PARAM_OFFSET,
dsp_gain_boost) != OKAY)
return(NOT_OKAY);
/* Set delay to desired lookahead time. Needs special init in PC code. */
max_delay = (int)(cast_handle->internal_sampling_freq * (realtype)MAXI_LOOK_AHEAD_DELAY);
if (comLongIntWrite(cast_handle->com_hdl_front, MAXIMIZE_MAX_DELAY + DSP_PLAY_OPTIMIZER_PARAM_OFFSET, max_delay) != OKAY)
return(NOT_OKAY);
if (comLongIntWrite(cast_handle->com_hdl_rear, MAXIMIZE_MAX_DELAY + DSP_PLAY_OPTIMIZER_PARAM_OFFSET, max_delay) != OKAY)
return(NOT_OKAY);
if (comLongIntWrite(cast_handle->com_hdl_side, MAXIMIZE_MAX_DELAY + DSP_PLAY_OPTIMIZER_PARAM_OFFSET, max_delay) != OKAY)
return(NOT_OKAY);
if (comLongIntWrite(cast_handle->com_hdl_center, MAXIMIZE_MAX_DELAY + DSP_PLAY_OPTIMIZER_PARAM_OFFSET, max_delay) != OKAY)
return(NOT_OKAY);
if (comLongIntWrite(cast_handle->com_hdl_subwoofer, MAXIMIZE_MAX_DELAY + DSP_PLAY_OPTIMIZER_PARAM_OFFSET, max_delay) != OKAY)
return(NOT_OKAY);
return(OKAY);
}
/*
* FUNCTION: dfxp_CommunicateSpaciousness()
* DESCRIPTION:
* Communicates to the dsp card the current spaciousness value
*/
int dfxp_CommunicateSpaciousness(PT_HANDLE *hp_dfxp)
{
struct dfxpHdlType *cast_handle;
cast_handle = (struct dfxpHdlType *)(hp_dfxp);
if (cast_handle == NULL)
return(OKAY);
int pc_intensity;
realtype dsp_intensity;
if (dfxp_GetKnobValue_MIDI(hp_dfxp, DFX_UI_KNOB_SURROUND, &pc_intensity) != OKAY)
return(NOT_OKAY);
/* Calculate the values that should be sent to the dsp card */
if (qntIToRCalc(cast_handle->midi_to_dsp.spaciousness_qnt_hdl, pc_intensity,
&dsp_intensity) != OKAY)
return(NOT_OKAY);
// Only front, rear and side will have spacialization active, others bypassed
if (comRealWrite(cast_handle->com_hdl_front, DSP_WID_INTENSITY + DSP_PLAY_WIDENER_PARAM_OFFSET,
dsp_intensity) != OKAY)
return(NOT_OKAY);
if (comRealWrite(cast_handle->com_hdl_rear, DSP_WID_INTENSITY + DSP_PLAY_WIDENER_PARAM_OFFSET,
dsp_intensity) != OKAY)
return(NOT_OKAY);
if (comRealWrite(cast_handle->com_hdl_side, DSP_WID_INTENSITY + DSP_PLAY_WIDENER_PARAM_OFFSET,
dsp_intensity) != OKAY)
return(NOT_OKAY);
return(OKAY);
}
/*
* FUNCTION: dfxp_CommunicateVocalReduction()
* DESCRIPTION:
* Communicates to the dsp card the current vocal reduction
*/
int dfxp_CommunicateVocalReduction(PT_HANDLE *hp_dfxp)
{
struct dfxpHdlType *cast_handle;
cast_handle = (struct dfxpHdlType *)(hp_dfxp);
if (cast_handle == NULL)
return(OKAY);
int i_dsp_vocal_reduction_val;
int vocal_reduction_mode;
/*
* This is a special case in which an int value is passed to the dsp based on the
* midi value because this is the one knob that is quantized.
*/
if (dfxp_GetKnobValue_MIDI(hp_dfxp, DFX_UI_KNOB_VOCAL_REDUCTION, &i_dsp_vocal_reduction_val) != OKAY)
return(NOT_OKAY);
/* Send vocal reduction parameter */
// Only sent to the front DSP processor
if (comLongIntWrite(cast_handle->com_hdl_front, DSP_VOCAL_REDUCTION_VAL,
i_dsp_vocal_reduction_val) != OKAY)
return(NOT_OKAY);
/*
* Send whether it is in Male or Female mode.
*
* NOTE: If DFX_UI_VOCAL_REDUCTION_MODE_1 is Male and DFX_UI_VOCAL_REDUCTION_MODE_2 is Female.
* Note DSP uses mode values starting at zero.
*/
if (dfxpGetButtonValue(hp_dfxp, DFX_UI_BUTTON_VOCAL_REDUCTION_MODE, &vocal_reduction_mode) != OKAY)
return(NOT_OKAY);
if (comLongIntWrite(cast_handle->com_hdl_front, DSP_PLAY_VOCAL_REDUCTION_MODE,
(vocal_reduction_mode - 1) ) != OKAY)
return(NOT_OKAY);
return(OKAY);
}
/*
* FUNCTION: dfxp_CommunicateBassBoost()
* DESCRIPTION:
* Communicates to the dsp card the current bass boost value
*/
int dfxp_CommunicateBassBoost(PT_HANDLE *hp_dfxp)
{
struct dfxpHdlType *cast_handle;
PT_HANDLE *com_hdl;
cast_handle = (struct dfxpHdlType *)(hp_dfxp);
if (cast_handle == NULL)
return(OKAY);
int pc_bass_boost;
struct filt2ndOrderBoostCutShelfFilterType filt;
int music_mode;
if (dfxp_GetKnobValue_MIDI(hp_dfxp, DFX_UI_KNOB_BASS_BOOST, &pc_bass_boost) != OKAY)
return(NOT_OKAY);
if (dfxpGetButtonValue(hp_dfxp, DFX_UI_BUTTON_MUSIC_MODE, &music_mode) != OKAY)
return(NOT_OKAY);
switch (music_mode)
{
case DFX_UI_MUSIC_MODE_SPEECH :
pc_bass_boost = (int)((realtype)(DFXP_SPEECH_MODE_BASS_BOOST_FACTOR) * pc_bass_boost);
break;
}
if ( qntIToBoostCutCalc(cast_handle->midi_to_dsp.bass_boost_qnt_hdl, pc_bass_boost,
&filt) != OKAY)
return(NOT_OKAY);
/* Write filter coeffs to front channels. */
com_hdl = cast_handle->com_hdl_front;
if (comRealWrite(com_hdl, DSP_PLAY_B0,
filt.b0) != OKAY)
return(NOT_OKAY);
if (comRealWrite(com_hdl, DSP_PLAY_B1,
filt.b1) != OKAY)
return(NOT_OKAY);
if (comRealWrite(com_hdl, DSP_PLAY_B2,
filt.b2) != OKAY)
return(NOT_OKAY);
if (comRealWrite(com_hdl, DSP_PLAY_A1,
filt.a1) != OKAY)
return(NOT_OKAY);
if (comRealWrite(com_hdl, DSP_PLAY_A2,
filt.a2) != OKAY)
return(NOT_OKAY);
/* Write filter coeffs to subwoofer also if in surround sound mode */
if( cast_handle->num_channels_out > 2 )
com_hdl = cast_handle->com_hdl_subwoofer;
if (comRealWrite(com_hdl, DSP_PLAY_B0,
filt.b0) != OKAY)
return(NOT_OKAY);
if (comRealWrite(com_hdl, DSP_PLAY_B1,
filt.b1) != OKAY)
return(NOT_OKAY);
if (comRealWrite(com_hdl, DSP_PLAY_B2,
filt.b2) != OKAY)
return(NOT_OKAY);
if (comRealWrite(com_hdl, DSP_PLAY_A1,
filt.a1) != OKAY)
return(NOT_OKAY);
if (comRealWrite(com_hdl, DSP_PLAY_A2,
filt.a2) != OKAY)
return(NOT_OKAY);
return(OKAY);
}
/*
* FUNCTION: dfxp_CommunicateFixedQnts_Aural()
* DESCRIPTION:
* Communicates the qnt values of the Aural Activation which
* do not change when the knob is changed.
*/
int dfxp_CommunicateFixedQnts_Aural(PT_HANDLE *hp_dfxp)
{
struct dfxpHdlType *cast_handle;
cast_handle = (struct dfxpHdlType *)(hp_dfxp);
if (cast_handle == NULL)
return(OKAY);
if (dfxp_AuralCommunicateTune(hp_dfxp) != OKAY)
return(NOT_OKAY);
return(OKAY);
}
/*
* FUNCTION: dfxp_CommunicateFixedQnts_Lex()
* DESCRIPTION:
* Communicates the qnt values of the Reverb which
* do not change when the knob is changed.
*/
int dfxp_CommunicateFixedQnts_Lex(PT_HANDLE *hp_dfxp)
{
struct dfxpHdlType *cast_handle;
cast_handle = (struct dfxpHdlType *)(hp_dfxp);
if (cast_handle == NULL)
return(OKAY);
if (dfxp_LexCommunicateSize(hp_dfxp) != OKAY)
return(NOT_OKAY);
if (dfxp_LexCommunicateRolloff(hp_dfxp) != OKAY)
return(NOT_OKAY);
if (dfxp_LexCommunicateDamping(hp_dfxp) != OKAY)
return(NOT_OKAY);
if (dfxp_LexCommunicateRate(hp_dfxp) != OKAY)
return(NOT_OKAY);
if (dfxp_LexCommunicateDepth(hp_dfxp) != OKAY)
return(NOT_OKAY);
return(OKAY);
}
/*
* FUNCTION: dfxp_CommunicateFixedQnts_Opt()
* DESCRIPTION:
* Communicates the qnt values of the Optimizer which
* do not change when the knob is changed.
*/