Merge branch 'master' into spectrum
This commit is contained in:
commit
099db19b03
5 changed files with 41 additions and 18 deletions
|
|
@ -43,7 +43,7 @@ static long _onMessage(long type, long value, void* msg, double* opt) {
|
|||
case kAsioSelectorSupported:
|
||||
case kAsioEngineVersion:
|
||||
case kAsioResetRequest:
|
||||
case kAsioBufferSizeChange:
|
||||
//case kAsioBufferSizeChange:
|
||||
case kAsioResyncRequest:
|
||||
return 1;
|
||||
default:
|
||||
|
|
@ -58,8 +58,9 @@ static long _onMessage(long type, long value, void* msg, double* opt) {
|
|||
return 1;
|
||||
break;
|
||||
case kAsioBufferSizeChange:
|
||||
callbackInstance->onBufferSize(value);
|
||||
return 1;
|
||||
// unfortunately the following triggers a crash, so I am disabling it for now.
|
||||
//callbackInstance->onBufferSize(value);
|
||||
return 0;
|
||||
break;
|
||||
case kAsioResyncRequest:
|
||||
// ignore
|
||||
|
|
|
|||
|
|
@ -270,9 +270,10 @@ void DivPlatformOPL::acquire_nuked(short** buf, size_t len) {
|
|||
if (properDrums) {
|
||||
for (int i=0; i<melodicChans+1; i++) {
|
||||
unsigned char ch=outChanMap[i];
|
||||
unsigned char chMute=(i<12 && chan[i&(~1)].fourOp)?(i^1):i;
|
||||
int chOut=0;
|
||||
if (ch==255) continue;
|
||||
if (isMuted[i]) continue;
|
||||
if (isMuted[chMute]) continue;
|
||||
if (fm.channel[i].out[0]!=NULL) {
|
||||
chOut+=*fm.channel[ch].out[0];
|
||||
}
|
||||
|
|
@ -295,9 +296,10 @@ void DivPlatformOPL::acquire_nuked(short** buf, size_t len) {
|
|||
} else {
|
||||
for (int i=0; i<chans; i++) {
|
||||
unsigned char ch=outChanMap[i];
|
||||
unsigned char chMute=(i<12 && chan[i&(~1)].fourOp)?(i^1):i;
|
||||
int chOut=0;
|
||||
if (ch==255) continue;
|
||||
if (isMuted[i]) continue;
|
||||
if (isMuted[chMute]) continue;
|
||||
if (fm.channel[i].out[0]!=NULL) {
|
||||
chOut+=*fm.channel[ch].out[0];
|
||||
}
|
||||
|
|
@ -587,8 +589,9 @@ void DivPlatformOPL::acquire_ymfm3(short** buf, size_t len) {
|
|||
if (properDrums) {
|
||||
for (int i=0; i<16; i++) {
|
||||
unsigned char ch=(i<12 && chan[i&(~1)].fourOp)?outChanMap[i^1]:outChanMap[i];
|
||||
unsigned char chMute=(i<12 && chan[i&(~1)].fourOp)?(i^1):i;
|
||||
if (ch==255) continue;
|
||||
if (isMuted[i]) continue;
|
||||
if (isMuted[chMute]) continue;
|
||||
int chOut=fmChan[ch]->debug_output(0)+fmChan[ch]->debug_output(1);
|
||||
if (chOut==0) {
|
||||
chOut=fmChan[ch]->debug_output(2);
|
||||
|
|
@ -608,9 +611,10 @@ void DivPlatformOPL::acquire_ymfm3(short** buf, size_t len) {
|
|||
oscBuf[19]->putSample(h,CLAMP(fmChan[7]->debug_special1()<<1,-32768,32767));
|
||||
} else {
|
||||
for (int i=0; i<18; i++) {
|
||||
unsigned char ch=outChanMap[i];
|
||||
unsigned char ch=(i<12 && chan[i&(~1)].fourOp)?outChanMap[i^1]:outChanMap[i];
|
||||
unsigned char chMute=(i<12 && chan[i&(~1)].fourOp)?(i^1):i;
|
||||
if (ch==255) continue;
|
||||
if (isMuted[i]) continue;
|
||||
if (isMuted[chMute]) continue;
|
||||
int chOut=fmChan[ch]->debug_output(0)+fmChan[ch]->debug_output(1);
|
||||
if (chOut==0) {
|
||||
chOut=fmChan[ch]->debug_output(2);
|
||||
|
|
@ -683,8 +687,9 @@ void DivPlatformOPL::acquire_ymfm4(short** buf, size_t len) {
|
|||
if (properDrums) {
|
||||
for (int i=0; i<16; i++) {
|
||||
unsigned char ch=(i<12 && chan[i&(~1)].fourOp)?outChanMap[i^1]:outChanMap[i];
|
||||
unsigned char chMute=(i<12 && chan[i&(~1)].fourOp)?(i^1):i;
|
||||
if (ch==255) continue;
|
||||
if (isMuted[i]) continue;
|
||||
if (isMuted[chMute]) continue;
|
||||
int chOut=fmChan[ch]->debug_output(0);
|
||||
if (chOut==0) {
|
||||
chOut=fmChan[ch]->debug_output(1);
|
||||
|
|
@ -707,9 +712,10 @@ void DivPlatformOPL::acquire_ymfm4(short** buf, size_t len) {
|
|||
oscBuf[19]->putSample(h,CLAMP(fmChan[7]->debug_special1()<<1,-32768,32767));
|
||||
} else {
|
||||
for (int i=0; i<18; i++) {
|
||||
unsigned char ch=outChanMap[i];
|
||||
unsigned char ch=(i<12 && chan[i&(~1)].fourOp)?outChanMap[i^1]:outChanMap[i];
|
||||
unsigned char chMute=(i<12 && chan[i&(~1)].fourOp)?(i^1):i;
|
||||
if (ch==255) continue;
|
||||
if (isMuted[i]) continue;
|
||||
if (isMuted[chMute]) continue;
|
||||
int chOut=fmChan[ch]->debug_output(0);
|
||||
if (chOut==0) {
|
||||
chOut=fmChan[ch]->debug_output(1);
|
||||
|
|
@ -1019,7 +1025,8 @@ void DivPlatformOPL::acquire_nukedLLE3(short** buf, size_t len) {
|
|||
}
|
||||
|
||||
for (int i=0; i<20; i++) {
|
||||
if (isMuted[i]) continue;
|
||||
unsigned char chMute=(i<12 && chan[i&(~1)].fourOp)?(i^1):i;
|
||||
if (isMuted[chMute]) continue;
|
||||
if (chOut[i]<-32768) chOut[i]=-32768;
|
||||
if (chOut[i]>32767) chOut[i]=32767;
|
||||
oscBuf[i]->putSample(h,chOut[i]);
|
||||
|
|
|
|||
|
|
@ -1695,6 +1695,7 @@ SafeWriter* DivEngine::saveVGM(bool* sysToExport, bool loop, int version, bool p
|
|||
case DIV_SYSTEM_VRC7:
|
||||
if (!hasOPLL) {
|
||||
hasOPLL=disCont[i].dispatch->chipClock;
|
||||
if (song.system[i]==DIV_SYSTEM_VRC7) hasOPLL|=0x80000000;
|
||||
CHIP_VOL(1,3.2);
|
||||
willExport[i]=true;
|
||||
} else if (!(hasOPLL&0x40000000)) {
|
||||
|
|
|
|||
|
|
@ -53,10 +53,16 @@ void FurnaceGUI::drawMultiInsSetup() {
|
|||
ImGui::PushItemFlag(ImGuiItemFlags_ButtonRepeat,true);
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding,ImVec2(0.0f,0.0f));
|
||||
if (ImGui::Button(ICON_FA_CHEVRON_UP "##Up",ImVec2(ImGui::GetContentRegionAvail().x,0))) {
|
||||
if (i>0) multiInsTranspose[i-1]++;
|
||||
if (i>0) {
|
||||
multiInsTranspose[i-1]++;
|
||||
if (multiInsTranspose[i-1]>60) multiInsTranspose[i-1]=60;
|
||||
}
|
||||
}
|
||||
if (ImGui::IsItemClicked(ImGuiMouseButton_Right)) {
|
||||
if (i>0) multiInsTranspose[i-1]+=12;
|
||||
if (i>0) {
|
||||
multiInsTranspose[i-1]+=12;
|
||||
if (multiInsTranspose[i-1]>60) multiInsTranspose[i-1]=60;
|
||||
}
|
||||
}
|
||||
ImGui::PopStyleVar();
|
||||
ImGui::PopItemFlag();
|
||||
|
|
@ -84,10 +90,16 @@ void FurnaceGUI::drawMultiInsSetup() {
|
|||
ImGui::PushItemFlag(ImGuiItemFlags_ButtonRepeat,true);
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding,ImVec2(0.0f,0.0f));
|
||||
if (ImGui::Button(ICON_FA_CHEVRON_DOWN "##Down",ImVec2(ImGui::GetContentRegionAvail().x,0))) {
|
||||
if (i>0) multiInsTranspose[i-1]--;
|
||||
if (i>0) {
|
||||
multiInsTranspose[i-1]--;
|
||||
if (multiInsTranspose[i-1]<-60) multiInsTranspose[i-1]=-60;
|
||||
}
|
||||
}
|
||||
if (ImGui::IsItemClicked(ImGuiMouseButton_Right)) {
|
||||
if (i>0) multiInsTranspose[i-1]-=12;
|
||||
if (i>0) {
|
||||
multiInsTranspose[i-1]-=12;
|
||||
if (multiInsTranspose[i-1]<-60) multiInsTranspose[i-1]=-60;
|
||||
}
|
||||
}
|
||||
ImGui::PopStyleVar();
|
||||
ImGui::PopItemFlag();
|
||||
|
|
|
|||
|
|
@ -39,16 +39,18 @@ void FurnaceGUI::drawXYOsc() {
|
|||
int xyOscXChannelP1=xyOscXChannel+1;
|
||||
int xyOscYChannelP1=xyOscYChannel+1;
|
||||
|
||||
ImGui::AlignTextToFramePadding();
|
||||
ImGui::Text(_("X Channel"));
|
||||
ImGui::SameLine();
|
||||
if (ImGui::DragInt("##XChannel",&xyOscXChannelP1,1.0f,1,DIV_MAX_OUTPUTS)) {
|
||||
if (ImGui::InputInt("##XChannel",&xyOscXChannelP1)) {
|
||||
xyOscXChannel=MIN(MAX(xyOscXChannelP1,1),DIV_MAX_OUTPUTS)-1;
|
||||
} rightClickable
|
||||
ImGui::SameLine();
|
||||
ImGui::Checkbox(_("Invert##X"),&xyOscXInvert);
|
||||
ImGui::AlignTextToFramePadding();
|
||||
ImGui::Text(_("Y Channel"));
|
||||
ImGui::SameLine();
|
||||
if (ImGui::DragInt("##YChannel",&xyOscYChannelP1,1.0f,1,DIV_MAX_OUTPUTS)) {
|
||||
if (ImGui::InputInt("##YChannel",&xyOscYChannelP1)) {
|
||||
xyOscYChannel=MIN(MAX(xyOscYChannelP1,1),DIV_MAX_OUTPUTS)-1;
|
||||
} rightClickable
|
||||
ImGui::SameLine();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue