diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/chips/opl_chip_base.tcc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/chips/opl_chip_base.tcc b/src/chips/opl_chip_base.tcc index 42cfc13..58145bc 100644 --- a/src/chips/opl_chip_base.tcc +++ b/src/chips/opl_chip_base.tcc @@ -65,8 +65,9 @@ void OPLChipBaseT<T>::generate(int16_t *output, size_t frames) int32_t temp = frame[c]; temp = (temp > -32768) ? temp : -32768; temp = (temp < 32767) ? temp : 32767; - output[c] = temp; + output[c] = (int16_t)temp; } + output += 2; } static_cast<T *>(this)->nativePostGenerate(); } @@ -83,8 +84,9 @@ void OPLChipBaseT<T>::generateAndMix(int16_t *output, size_t frames) int32_t temp = (int32_t)output[c] + frame[c]; temp = (temp > -32768) ? temp : -32768; temp = (temp < 32767) ? temp : 32767; - output[c] = temp; + output[c] = (int16_t)temp; } + output += 2; } static_cast<T *>(this)->nativePostGenerate(); } |