diff --git a/src/sound/snd_sb_dsp.c b/src/sound/snd_sb_dsp.c index fa313376846..192684be782 100644 --- a/src/sound/snd_sb_dsp.c +++ b/src/sound/snd_sb_dsp.c @@ -358,6 +358,11 @@ sb_start_dma(sb_dsp_t *dsp, int dma8, int autoinit, uint8_t format, int len) { dsp->sb_pausetime = -1; + if (dsp->ess_reload_len) { + len = sb_ess_get_dma_len(dsp); + dsp->ess_reload_len = 0; + } + if (dma8) { dsp->sb_8_length = dsp->sb_8_origlength = len; dsp->sb_8_format = format; @@ -392,6 +397,11 @@ sb_start_dma(sb_dsp_t *dsp, int dma8, int autoinit, uint8_t format, int len) void sb_start_dma_i(sb_dsp_t *dsp, int dma8, int autoinit, uint8_t format, int len) { + if (dsp->ess_reload_len) { + len = sb_ess_get_dma_len(dsp); + dsp->ess_reload_len = 0; + } + if (dma8) { dsp->sb_8_length = dsp->sb_8_origlength = len; dsp->sb_8_format = format;