new chan osc work in progress
This commit is contained in:
parent
0eea0ec139
commit
dd7e1def3d
11 changed files with 171 additions and 74 deletions
|
|
@ -71,6 +71,9 @@ const char** DivPlatformSNES::getRegisterSheet() {
|
|||
void DivPlatformSNES::acquire(short** buf, size_t len) {
|
||||
short out[2];
|
||||
short chOut[16];
|
||||
for (int i=0; i<8; i++) {
|
||||
oscBuf[i]->begin(len);
|
||||
}
|
||||
for (size_t h=0; h<len; h++) {
|
||||
if (--delay<=0) {
|
||||
delay=0;
|
||||
|
|
@ -94,9 +97,12 @@ void DivPlatformSNES::acquire(short** buf, size_t len) {
|
|||
next=(next*254)/MAX(1,globalVolL+globalVolR);
|
||||
if (next<-32768) next=-32768;
|
||||
if (next>32767) next=32767;
|
||||
oscBuf[i]->data[oscBuf[i]->needle++]=next>>1;
|
||||
oscBuf[i]->putSample(h,next>>1);
|
||||
}
|
||||
}
|
||||
for (int i=0; i<8; i++) {
|
||||
oscBuf[i]->end(len);
|
||||
}
|
||||
}
|
||||
|
||||
void DivPlatformSNES::tick(bool sysTick) {
|
||||
|
|
@ -1058,7 +1064,7 @@ int DivPlatformSNES::init(DivEngine* p, int channels, int sugRate, const DivConf
|
|||
rate=chipClock/32;
|
||||
for (int i=0; i<8; i++) {
|
||||
oscBuf[i]=new DivDispatchOscBuffer;
|
||||
oscBuf[i]->rate=rate;
|
||||
oscBuf[i]->setRate(rate);
|
||||
isMuted[i]=false;
|
||||
}
|
||||
setFlags(flags);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue