feat(inserts): add bulk enable, bypass and clear actions (phase 95)
This commit is contained in:
parent
c65ac61a98
commit
924821738d
7 changed files with 48 additions and 6 deletions
|
|
@ -31,3 +31,13 @@ xtc_result xtc_track_chain_template(unsigned int index,unsigned int tempo,xtc_tr
|
|||
if(index==2){c.slots[0].plugin.values[0]=.88f;c.slots[0].plugin.values[1]=.6f;c.slots[0].plugin.values[2]=.6f;c.slots[1].plugin.values[0]=500;c.slots[1].plugin.values[1]=.35f;c.slots[1].plugin.values[2]=.25f;}
|
||||
r=xtc_track_chain_validate(&c);if(r==XTC_OK)*out=c;return r;
|
||||
}
|
||||
|
||||
xtc_result xtc_track_chain_bulk(const xtc_track_chain *chain,xtc_chain_action action,xtc_track_chain *out)
|
||||
{
|
||||
xtc_track_chain copy;size_t i;
|
||||
if(!out || xtc_track_chain_validate(chain)!=XTC_OK || action<XTC_CHAIN_ENABLE_ALL || action>XTC_CHAIN_CLEAR)return XTC_ERR_INVALID_ARGUMENT;
|
||||
copy=*chain;
|
||||
if(action==XTC_CHAIN_CLEAR){copy.count=0;for(i=0;i<XTC_TRACK_INSERTS;++i)copy.slots[i]=(xtc_track_insert){0};}
|
||||
else for(i=0;i<copy.count;++i)copy.slots[i].enabled=action==XTC_CHAIN_ENABLE_ALL;
|
||||
*out=copy;return XTC_OK;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue