new chan osc, part 6
more adaptations how can I get you out of my head... I want to go back to work!
This commit is contained in:
parent
fe00ee805d
commit
6265d2cd39
27 changed files with 293 additions and 123 deletions
|
|
@ -109,6 +109,10 @@ const char** DivPlatformN163::getRegisterSheet() {
|
|||
}
|
||||
|
||||
void DivPlatformN163::acquire(short** buf, size_t len) {
|
||||
for (int i=0; i<8; i++) {
|
||||
oscBuf[i]->begin(len);
|
||||
}
|
||||
|
||||
for (size_t i=0; i<len; i++) {
|
||||
n163.tick();
|
||||
int out=(n163.out()<<6)*2; // scale to 16 bit
|
||||
|
|
@ -116,8 +120,8 @@ void DivPlatformN163::acquire(short** buf, size_t len) {
|
|||
if (out<-32768) out=-32768;
|
||||
buf[0][i]=out;
|
||||
|
||||
if (n163.voice_cycle()==0x78) for (int i=0; i<8; i++) {
|
||||
oscBuf[i]->data[oscBuf[i]->needle++]=n163.voice_out(i)<<7;
|
||||
if (n163.voice_cycle()==0x78) for (int j=0; j<8; j++) {
|
||||
oscBuf[j]->putSample(i,n163.voice_out(j)<<7);
|
||||
}
|
||||
|
||||
// command queue
|
||||
|
|
@ -128,6 +132,10 @@ void DivPlatformN163::acquire(short** buf, size_t len) {
|
|||
writes.pop();
|
||||
}
|
||||
}
|
||||
|
||||
for (int i=0; i<8; i++) {
|
||||
oscBuf[i]->end(len);
|
||||
}
|
||||
}
|
||||
|
||||
void DivPlatformN163::updateWave(int ch, int wave, int pos, int len) {
|
||||
|
|
@ -595,7 +603,7 @@ void DivPlatformN163::setFlags(const DivConfig& flags) {
|
|||
n163.set_multiplex(multiplex);
|
||||
rWrite(0x7f,initChanMax<<4);
|
||||
for (int i=0; i<8; i++) {
|
||||
oscBuf[i]->rate=rate/(initChanMax+1);
|
||||
oscBuf[i]->setRate(rate);//=rate/(initChanMax+1);
|
||||
}
|
||||
|
||||
lenCompensate=flags.getBool("lenCompensate",false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue