diff --git a/src/engine/platform/genesis.cpp b/src/engine/platform/genesis.cpp index 59b340524..bbd9c32ec 100644 --- a/src/engine/platform/genesis.cpp +++ b/src/engine/platform/genesis.cpp @@ -339,7 +339,7 @@ void DivPlatformGenesis::tick(bool sysTick) { if (chan[i].std.pitch.had) { if (chan[i].std.pitch.mode) { chan[i].pitch2+=chan[i].std.pitch.val; - CLAMP_VAR(chan[i].pitch2,-32768,32767); + CLAMP_VAR(chan[i].pitch2,-1048576,1048575); } else { chan[i].pitch2=chan[i].std.pitch.val; } diff --git a/src/engine/platform/genesisext.cpp b/src/engine/platform/genesisext.cpp index ae6ac70bd..f181774a0 100644 --- a/src/engine/platform/genesisext.cpp +++ b/src/engine/platform/genesisext.cpp @@ -491,7 +491,7 @@ void DivPlatformGenesisExt::tick(bool sysTick) { if (opChan[i].std.pitch.had) { if (opChan[i].std.pitch.mode) { opChan[i].pitch2+=opChan[i].std.pitch.val; - CLAMP_VAR(opChan[i].pitch2,-32768,32767); + CLAMP_VAR(opChan[i].pitch2,-1048576,1048575); } else { opChan[i].pitch2=opChan[i].std.pitch.val; } diff --git a/src/engine/platform/ym2203.cpp b/src/engine/platform/ym2203.cpp index cd6df57f8..00df4edbc 100644 --- a/src/engine/platform/ym2203.cpp +++ b/src/engine/platform/ym2203.cpp @@ -316,7 +316,7 @@ void DivPlatformYM2203::tick(bool sysTick) { if (chan[i].std.pitch.had) { if (chan[i].std.pitch.mode) { chan[i].pitch2+=chan[i].std.pitch.val; - CLAMP_VAR(chan[i].pitch2,-32768,32767); + CLAMP_VAR(chan[i].pitch2,-1048576,1048575); } else { chan[i].pitch2=chan[i].std.pitch.val; } diff --git a/src/engine/platform/ym2203ext.cpp b/src/engine/platform/ym2203ext.cpp index 12605a93b..d19276be5 100644 --- a/src/engine/platform/ym2203ext.cpp +++ b/src/engine/platform/ym2203ext.cpp @@ -412,7 +412,7 @@ void DivPlatformYM2203Ext::tick(bool sysTick) { if (opChan[i].std.pitch.had) { if (opChan[i].std.pitch.mode) { opChan[i].pitch2+=opChan[i].std.pitch.val; - CLAMP_VAR(opChan[i].pitch2,-32768,32767); + CLAMP_VAR(opChan[i].pitch2,-1048576,1048575); } else { opChan[i].pitch2=opChan[i].std.pitch.val; } diff --git a/src/engine/platform/ym2608.cpp b/src/engine/platform/ym2608.cpp index 924b6dbb9..cf42741db 100644 --- a/src/engine/platform/ym2608.cpp +++ b/src/engine/platform/ym2608.cpp @@ -503,7 +503,7 @@ void DivPlatformYM2608::tick(bool sysTick) { if (chan[i].std.pitch.had) { if (chan[i].std.pitch.mode) { chan[i].pitch2+=chan[i].std.pitch.val; - CLAMP_VAR(chan[i].pitch2,-32768,32767); + CLAMP_VAR(chan[i].pitch2,-1048576,1048575); } else { chan[i].pitch2=chan[i].std.pitch.val; } diff --git a/src/engine/platform/ym2608ext.cpp b/src/engine/platform/ym2608ext.cpp index 47a01d137..b38e1a262 100644 --- a/src/engine/platform/ym2608ext.cpp +++ b/src/engine/platform/ym2608ext.cpp @@ -435,7 +435,7 @@ void DivPlatformYM2608Ext::tick(bool sysTick) { if (opChan[i].std.pitch.had) { if (opChan[i].std.pitch.mode) { opChan[i].pitch2+=opChan[i].std.pitch.val; - CLAMP_VAR(opChan[i].pitch2,-32768,32767); + CLAMP_VAR(opChan[i].pitch2,-1048576,1048575); } else { opChan[i].pitch2=opChan[i].std.pitch.val; } diff --git a/src/engine/platform/ym2610.cpp b/src/engine/platform/ym2610.cpp index 8b398a3e3..50568aa28 100644 --- a/src/engine/platform/ym2610.cpp +++ b/src/engine/platform/ym2610.cpp @@ -436,7 +436,7 @@ void DivPlatformYM2610::tick(bool sysTick) { if (chan[i].std.pitch.had) { if (chan[i].std.pitch.mode) { chan[i].pitch2+=chan[i].std.pitch.val; - CLAMP_VAR(chan[i].pitch2,-32768,32767); + CLAMP_VAR(chan[i].pitch2,-1048576,1048575); } else { chan[i].pitch2=chan[i].std.pitch.val; } diff --git a/src/engine/platform/ym2610b.cpp b/src/engine/platform/ym2610b.cpp index af02fd9a0..a9c887642 100644 --- a/src/engine/platform/ym2610b.cpp +++ b/src/engine/platform/ym2610b.cpp @@ -503,7 +503,7 @@ void DivPlatformYM2610B::tick(bool sysTick) { if (chan[i].std.pitch.had) { if (chan[i].std.pitch.mode) { chan[i].pitch2+=chan[i].std.pitch.val; - CLAMP_VAR(chan[i].pitch2,-32768,32767); + CLAMP_VAR(chan[i].pitch2,-1048576,1048575); } else { chan[i].pitch2=chan[i].std.pitch.val; } diff --git a/src/engine/platform/ym2610bext.cpp b/src/engine/platform/ym2610bext.cpp index 207708bde..a5845461e 100644 --- a/src/engine/platform/ym2610bext.cpp +++ b/src/engine/platform/ym2610bext.cpp @@ -431,7 +431,7 @@ void DivPlatformYM2610BExt::tick(bool sysTick) { if (opChan[i].std.pitch.had) { if (opChan[i].std.pitch.mode) { opChan[i].pitch2+=opChan[i].std.pitch.val; - CLAMP_VAR(opChan[i].pitch2,-32768,32767); + CLAMP_VAR(opChan[i].pitch2,-1048576,1048575); } else { opChan[i].pitch2=opChan[i].std.pitch.val; } diff --git a/src/engine/platform/ym2610ext.cpp b/src/engine/platform/ym2610ext.cpp index b4da0878f..206c904d3 100644 --- a/src/engine/platform/ym2610ext.cpp +++ b/src/engine/platform/ym2610ext.cpp @@ -431,7 +431,7 @@ void DivPlatformYM2610Ext::tick(bool sysTick) { if (opChan[i].std.pitch.had) { if (opChan[i].std.pitch.mode) { opChan[i].pitch2+=opChan[i].std.pitch.val; - CLAMP_VAR(opChan[i].pitch2,-32768,32767); + CLAMP_VAR(opChan[i].pitch2,-1048576,1048575); } else { opChan[i].pitch2=opChan[i].std.pitch.val; }