|
@@ -2909,32 +2909,32 @@ cmDspRC_t _cmDspSysPgm_IntToSym( cmDspSysH_t h, void** userPtrPtr )
|
2909
|
2909
|
{
|
2910
|
2910
|
cmDspRC_t rc = kOkDspRC;
|
2911
|
2911
|
|
2912
|
|
- inst_t* btn0 = button( "Btn0", 0.0 );
|
2913
|
|
- inst_t* btn1 = button( "Btn1", 1.0 );
|
2914
|
|
- inst_t* btn2 = button( "Btn2", 2.0 );
|
|
2912
|
+ inst_t* sel0 = scalar( "Sel0", 0.0, 10.0, 1.0, 1.0 );
|
|
2913
|
+ inst_t* sel1 = scalar( "Sel1", 0.0, 10.0, 1.0, 1.0 );
|
|
2914
|
+ inst_t* sel2 = scalar( "Sel2", 0.0, 10.0, 1.0, 1.0 );
|
|
2915
|
+ inst_t* val = scalar( "Val", 0.0, 10.0, 1.0, 1.0 );
|
2915
|
2916
|
|
2916
|
|
- inst_t* pts = inst( "IntToSym", NULL, 1, "one", 2, "two", 3, "three");
|
|
2917
|
+ inst_t* pts = inst( "IntToSym", NULL, 0, "one", 0, "two", 0, "three");
|
2917
|
2918
|
|
2918
|
|
- inst_t* pr0 = inst( "Printer", NULL, "btn:" );
|
|
2919
|
+ inst_t* pr0 = inst( "Printer", NULL, "val:" );
|
2919
|
2920
|
inst_t* pr1 = inst( "Printer", NULL, "sym:" );
|
2920
|
2921
|
inst_t* pr2 = inst( "Printer", NULL, "out:" );
|
2921
|
2922
|
|
2922
|
2923
|
// check for allocation errors
|
2923
|
2924
|
if((rc = cmDspSysLastRC(h)) != kOkDspRC )
|
2924
|
2925
|
goto errLabel;
|
2925
|
|
-
|
2926
|
|
- event( btn0, out, pts, one );
|
2927
|
|
- event( btn1, out, pts, two );
|
2928
|
|
- event( btn2, out, pts, three );
|
2929
|
2926
|
|
2930
|
|
- event( btn0, out, pr0, in );
|
2931
|
|
- event( btn1, out, pr0, in );
|
2932
|
|
- event( btn2, out, pr0, in );
|
|
2927
|
+ event( sel0, val, pts, one-int );
|
|
2928
|
+ event( sel1, val, pts, two-int );
|
|
2929
|
+ event( sel2, val, pts, three-int );
|
|
2930
|
+
|
|
2931
|
+ event( val, val, pts, in );
|
|
2932
|
+ event( val, val, pr0, in );
|
2933
|
2933
|
|
2934
|
2934
|
event( pts, one, pr1, in );
|
2935
|
2935
|
event( pts, two, pr1, in );
|
2936
|
2936
|
event( pts, three, pr1, in );
|
2937
|
|
-
|
|
2937
|
+
|
2938
|
2938
|
event( pts, out, pr2, in );
|
2939
|
2939
|
|
2940
|
2940
|
errLabel:
|