support more than 2 output channels

up to 16 on JACK
to-do: add more mixer settings
This commit is contained in:
tildearrow 2023-01-05 02:40:17 -05:00
parent 77f7fcd555
commit 71e40dc015
11 changed files with 127 additions and 42 deletions

View file

@ -131,6 +131,7 @@ void DivDispatchContainer::fillBuf(size_t runtotal, size_t offset, size_t size)
bool mustClear=false;
for (int i=0; i<outs; i++) {
if (bb[i]==NULL) {
logV("creating buf %d because it doesn't exist",i);
bb[i]=blip_new(bbInLen);
if (bb[i]==NULL) {
logE("not enough memory!");
@ -142,6 +143,7 @@ void DivDispatchContainer::fillBuf(size_t runtotal, size_t offset, size_t size)
if (bbOut[i]==NULL) bbOut[i]=new short[bbInLen];
memset(bbIn[i],0,bbInLen*sizeof(short));
memset(bbOut[i],0,bbInLen*sizeof(short));
mustClear=true;
}
}
if (mustClear) clear();