new chan osc, part 7

i am done
This commit is contained in:
tildearrow 2025-03-02 16:14:49 -05:00
parent 6265d2cd39
commit 49a8693dcb
35 changed files with 606 additions and 217 deletions

View file

@ -94,6 +94,10 @@ const char** DivPlatformSID3::getRegisterSheet() {
void DivPlatformSID3::acquire(short** buf, size_t len)
{
for (int i=0; i<SID3_NUM_CHANNELS; i++) {
oscBuf[i]->begin(len);
}
for (size_t i=0; i<len; i++)
{
if (chan[SID3_NUM_CHANNELS - 1].pcm && chan[SID3_NUM_CHANNELS - 1].dacSample!=-1)
@ -200,12 +204,16 @@ void DivPlatformSID3::acquire(short** buf, size_t len)
for(int j = 0; j < SID3_NUM_CHANNELS - 1; j++)
{
oscBuf[j]->data[oscBuf[j]->needle++] = sid3->muted[j] ? 0 : (sid3->channel_output[j] / 4);
oscBuf[j]->putSample(i,sid3->muted[j] ? 0 : (sid3->channel_output[j] / 4));
}
oscBuf[SID3_NUM_CHANNELS - 1]->data[oscBuf[SID3_NUM_CHANNELS - 1]->needle++] = sid3->muted[SID3_NUM_CHANNELS - 1] ? 0 : (sid3->wave_channel_output / 4);
oscBuf[SID3_NUM_CHANNELS - 1]->putSample(i,sid3->muted[SID3_NUM_CHANNELS - 1] ? 0 : (sid3->wave_channel_output / 4));
}
}
for (int i=0; i<SID3_NUM_CHANNELS; i++) {
oscBuf[i]->end(len);
}
}
void DivPlatformSID3::updateFlags(int channel, bool gate)
@ -1351,7 +1359,7 @@ void DivPlatformSID3::setFlags(const DivConfig& flags) {
rate=chipClock;
sid3_set_clock_rate(sid3, chipClock);
for (int i=0; i<SID3_NUM_CHANNELS; i++) {
oscBuf[i]->rate=rate/8;
oscBuf[i]->setRate(rate);
}
}