Some cleanup and crash fixes

This commit is contained in:
Cacodemon345
2024-03-03 16:26:49 +06:00
committed by Kagamiin~
parent 7f9f072b3e
commit 6ab45767e5
2 changed files with 6 additions and 6 deletions

View File

@@ -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);

View File

@@ -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