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
|
|
@ -44,6 +44,10 @@ const char** DivPlatformMMC5::getRegisterSheet() {
|
|||
}
|
||||
|
||||
void DivPlatformMMC5::acquire(short** buf, size_t len) {
|
||||
for (int i=0; i<3; i++) {
|
||||
oscBuf[i]->begin(len);
|
||||
}
|
||||
|
||||
for (size_t i=0; i<len; i++) {
|
||||
if (dacSample!=-1) {
|
||||
dacPeriod+=dacRate;
|
||||
|
|
@ -85,11 +89,15 @@ void DivPlatformMMC5::acquire(short** buf, size_t len) {
|
|||
|
||||
if (++writeOscBuf>=32) {
|
||||
writeOscBuf=0;
|
||||
oscBuf[0]->data[oscBuf[0]->needle++]=isMuted[0]?0:((mmc5->S3.output)<<11);
|
||||
oscBuf[1]->data[oscBuf[1]->needle++]=isMuted[1]?0:((mmc5->S4.output)<<11);
|
||||
oscBuf[2]->data[oscBuf[2]->needle++]=isMuted[2]?0:((mmc5->pcm.output)<<7);
|
||||
oscBuf[0]->putSample(i,isMuted[0]?0:((mmc5->S3.output)<<11));
|
||||
oscBuf[1]->putSample(i,isMuted[1]?0:((mmc5->S4.output)<<11));
|
||||
oscBuf[2]->putSample(i,isMuted[2]?0:((mmc5->pcm.output)<<7));
|
||||
}
|
||||
}
|
||||
|
||||
for (int i=0; i<3; i++) {
|
||||
oscBuf[i]->end(len);
|
||||
}
|
||||
}
|
||||
|
||||
void DivPlatformMMC5::tick(bool sysTick) {
|
||||
|
|
@ -427,7 +435,7 @@ void DivPlatformMMC5::setFlags(const DivConfig& flags) {
|
|||
CHECK_CUSTOM_CLOCK;
|
||||
rate=chipClock;
|
||||
for (int i=0; i<3; i++) {
|
||||
oscBuf[i]->rate=rate/32;
|
||||
oscBuf[i]->setRate(rate);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue