Merge branch 'tildearrow:master' into master
This commit is contained in:
commit
65817f7589
11 changed files with 199 additions and 75 deletions
|
|
@ -696,7 +696,7 @@ void DivEngine::initSongWithDesc(const int* description) {
|
|||
song.systemFlags[index]=description[i+3];
|
||||
index++;
|
||||
chanCount+=getChannelCount(song.system[index]);
|
||||
if (chanCount>=63) break;
|
||||
if (chanCount>=DIV_MAX_CHANS) break;
|
||||
if (index>=32) break;
|
||||
}
|
||||
song.systemLen=index;
|
||||
|
|
@ -886,9 +886,8 @@ bool DivEngine::addSystem(DivSystem which) {
|
|||
lastError="max number of systems is 32";
|
||||
return false;
|
||||
}
|
||||
// this was DIV_MAX_CHANS but I am setting it to 63 for now due to an ImGui limitation
|
||||
if (chans+getChannelCount(which)>63) {
|
||||
lastError="max number of total channels is 63";
|
||||
if (chans+getChannelCount(which)>DIV_MAX_CHANS) {
|
||||
lastError=fmt::sprintf("max number of total channels is %d",DIV_MAX_CHANS);
|
||||
return false;
|
||||
}
|
||||
quitDispatch();
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ void DivPlatformSMS::acquire_nuked(short* bufL, short* bufR, size_t start, size_
|
|||
YMPSG_Clock(&sn_nuked);
|
||||
YMPSG_Clock(&sn_nuked);
|
||||
YMPSG_Clock(&sn_nuked);
|
||||
o=YMPSG_GetOutput(&sn_nuked)*8192.0;
|
||||
o=YMPSG_GetOutput(&sn_nuked);
|
||||
if (o<-32768) o=-32768;
|
||||
if (o>32767) o=32767;
|
||||
bufL[h]=o;
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ bool DivWaveSynth::tick(bool skipSubDiv) {
|
|||
break;
|
||||
case DIV_WS_PHASE_MOD:
|
||||
for (int i=0; i<=state.speed; i++) {
|
||||
int mod=(wave2[pos]*(state.param2-stage)*width)/512;
|
||||
int mod=(wave2[pos]*(state.param2-stage)*width)/(64*(height+1));
|
||||
output[pos]=wave1[(pos+mod)%width];
|
||||
if (++pos>=width) {
|
||||
pos=0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue