diff --git a/src/sound/snd_ess.c b/src/sound/snd_ess.c index 5b6852b689..f0f1b5ec70 100644 --- a/src/sound/snd_ess.c +++ b/src/sound/snd_ess.c @@ -299,7 +299,6 @@ ess_get_music_buffer_sbpro(int32_t *buffer, int len, void *priv) double out_l = 0.0; double out_r = 0.0; const int32_t *opl_buf = NULL; - const int32_t *opl2_buf = NULL; opl_buf = ess->opl.update(ess->opl.priv); diff --git a/src/sound/snd_opl_esfm.c b/src/sound/snd_opl_esfm.c index 3720c8ada1..cbd9a93a33 100644 --- a/src/sound/snd_opl_esfm.c +++ b/src/sound/snd_opl_esfm.c @@ -54,18 +54,19 @@ typedef struct { uint16_t timer_count[2]; uint16_t timer_cur_count[2]; + int16_t samples[2]; + int pos; - int32_t buffer[SOUNDBUFLEN * 2]; + int32_t buffer[MUSICBUFLEN * 2]; } esfm_drv_t; void esfm_generate_raw(esfm_drv_t *dev, int32_t *bufp) { - int16_t samples[2] = { 0, 0 }; - ESFM_generate(&dev->opl, samples); + ESFM_generate(&dev->opl, &dev->samples[0]); - bufp[0] = (int32_t) samples[0]; - bufp[1] = (int32_t) samples[1]; + bufp[0] = dev->samples[0]; + bufp[1] = dev->samples[1]; } void