cmDspPgmKr.c : Added 'useWtFl' to cmDspSysPgm_Timeline.

This commit is contained in:
kevin 2014-01-16 15:05:24 -08:00
parent ed1c13c0ec
commit f96e261382

View File

@ -61,8 +61,6 @@ cmDspRC_t krLoadRsrc(cmDspSysH_t h, cmErr_t* err, krRsrc_t* r)
cmDspRsrcString(h,&r->midiDevice, "midiDevice", NULL); cmDspRsrcString(h,&r->midiDevice, "midiDevice", NULL);
cmDspRsrcString(h,&r->midiOutPort, "midiOutPort", NULL); cmDspRsrcString(h,&r->midiOutPort, "midiOutPort", NULL);
if((rc = cmDspSysLastRC(h)) != kOkDspRC ) if((rc = cmDspSysLastRC(h)) != kOkDspRC )
cmErrMsg(err,rc,"A KR DSP resource load failed."); cmErrMsg(err,rc,"A KR DSP resource load failed.");
@ -364,6 +362,7 @@ cmDspRC_t _cmDspSysPgm_TimeLine(cmDspSysH_t h, void** userPtrPtr )
cmErr_t err; cmErr_t err;
krRsrc_t r; krRsrc_t r;
bool fragFl = false; bool fragFl = false;
bool useWtFl = true;
unsigned wtLoopCnt = 1; // 1=play once (-1=loop forever) unsigned wtLoopCnt = 1; // 1=play once (-1=loop forever)
unsigned wtInitMode = 0; // initial wt mode is 'silence' unsigned wtInitMode = 0; // initial wt mode is 'silence'
unsigned wtSmpCnt = floor(cmDspSysSampleRate(h)); // wt length == srate unsigned wtSmpCnt = floor(cmDspSysSampleRate(h)); // wt length == srate
@ -498,21 +497,22 @@ cmDspRC_t _cmDspSysPgm_TimeLine(cmDspSysH_t h, void** userPtrPtr )
// Audio connections // Audio connections
cmDspSysConnectAudio(h, php, "out", wtp, "phs" ); // phs -> wt cmDspSysConnectAudio(h, php, "out", wtp, "phs" ); // phs -> wt
cmDspSysConnectAudio(h, wtp, "out", au0Sw, "a-in-0" ); // wt -> sw if( useWtFl )
{
/* cmDspSysConnectAudio(h, wtp, "out", au0Sw, "a-in-0" ); // wt -> sw
cmDspSysConnectAudio(h, ai0p, "out", au0Sw, "a-in-1" ); // ain -> sw cmDspSysConnectAudio(h, ai0p, "out", au0Sw, "a-in-1" ); // ain -> sw
cmDspSysConnectAudio(h, ai0p, "out", mi0p, "in" ); cmDspSysConnectAudio(h, ai0p, "out", mi0p, "in" );
cmDspSysConnectAudio(h, au0Sw, "a-out", rpp, "in-0"); // sw -> rcdply cmDspSysConnectAudio(h, au0Sw, "a-out", rpp, "in-0"); // sw -> rcdply
cmDspSysConnectAudio(h, au0Sw, "a-out", c0.kr0,"in" ); // sw -> kr cmDspSysConnectAudio(h, au0Sw, "a-out", c0.kr0,"in" ); // sw -> kr
cmDspSysConnectAudio(h, au0Sw, "a-out", c0.kr1,"in" ); // sw -> kr cmDspSysConnectAudio(h, au0Sw, "a-out", c0.kr1,"in" ); // sw -> kr
*/ }
else
{
cmDspSysConnectAudio(h, ai0p, "out", rpp, "in-0"); // sw -> rcdply cmDspSysConnectAudio(h, ai0p, "out", rpp, "in-0"); // sw -> rcdply
cmDspSysConnectAudio(h, ai0p, "out", c0.kr0, "in" ); // ain -> sw cmDspSysConnectAudio(h, ai0p, "out", c0.kr0, "in" ); // ain -> sw
cmDspSysConnectAudio(h, ai0p, "out", c0.kr1, "in" ); // ain -> sw cmDspSysConnectAudio(h, ai0p, "out", c0.kr1, "in" ); // ain -> sw
cmDspSysConnectAudio(h, ai0p, "out", mi0p, "in" ); cmDspSysConnectAudio(h, ai0p, "out", mi0p, "in" );
}
if( fragFl ) if( fragFl )
{ {
@ -525,22 +525,26 @@ cmDspRC_t _cmDspSysPgm_TimeLine(cmDspSysH_t h, void** userPtrPtr )
else else
{ {
cmDspSysConnectAudio(h, c0.cmp, "out", ao0p, "in" ); cmDspSysConnectAudio(h, c0.cmp, "out", ao0p, "in" );
//cmDspSysConnectAudio(h, wtp, "out", ao0p, "in" );
} }
cmDspSysConnectAudio(h, wtp, "out", au1Sw, "a-in-0" ); // wt -> sw if( useWtFl )
/* {
cmDspSysConnectAudio(h, ai1p, "out", au1Sw, "a-in-1" ); // ain -> sw cmDspSysConnectAudio(h, wtp, "out", au1Sw, "a-in-0" ); // wt -> sw
cmDspSysConnectAudio(h, ai1p, "out", mi1p, "in" ); cmDspSysConnectAudio(h, ai1p, "out", au1Sw, "a-in-1" ); // ain -> sw
cmDspSysConnectAudio(h, au1Sw, "a-out", rpp, "in-1"); // sw -> rcdply cmDspSysConnectAudio(h, ai1p, "out", mi1p, "in" );
cmDspSysConnectAudio(h, au1Sw, "a-out", c1.kr0,"in" ); // sw -> kr cmDspSysConnectAudio(h, au1Sw, "a-out", rpp, "in-1"); // sw -> rcdply
cmDspSysConnectAudio(h, au1Sw, "a-out", c1.kr1,"in" ); // sw -> kr cmDspSysConnectAudio(h, au1Sw, "a-out", c1.kr0,"in" ); // sw -> kr
*/ cmDspSysConnectAudio(h, au1Sw, "a-out", c1.kr1,"in" ); // sw -> kr
}
cmDspSysConnectAudio(h, ai1p, "out", rpp, "in-1"); // sw -> rcdply else
cmDspSysConnectAudio(h, ai1p, "out", c1.kr0, "in" ); // ain -> sw {
cmDspSysConnectAudio(h, ai1p, "out", c1.kr1, "in" ); // ain -> sw cmDspSysConnectAudio(h, ai1p, "out", rpp, "in-1"); // sw -> rcdply
cmDspSysConnectAudio(h, ai1p, "out", mi1p, "in" ); cmDspSysConnectAudio(h, ai1p, "out", c1.kr0, "in" ); // ain -> sw
cmDspSysConnectAudio(h, ai1p, "out", c1.kr1, "in" ); // ain -> sw
cmDspSysConnectAudio(h, ai1p, "out", mi1p, "in" );
}
if( fragFl ) if( fragFl )
{ {
@ -553,6 +557,8 @@ cmDspRC_t _cmDspSysPgm_TimeLine(cmDspSysH_t h, void** userPtrPtr )
else else
{ {
cmDspSysConnectAudio(h, c1.cmp, "out", ao1p, "in" ); // cmp -> mix 0 cmDspSysConnectAudio(h, c1.cmp, "out", ao1p, "in" ); // cmp -> mix 0
//cmDspSysConnectAudio(h, wtp, "out", ao1p, "in" );
} }
cmDspSysConnectAudio(h, c0.cmp, "out", afop, "in0" ); // comp -> audio_file_out cmDspSysConnectAudio(h, c0.cmp, "out", afop, "in0" ); // comp -> audio_file_out