Skip to content

Commit

Permalink
Some cleanup and crash fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Cacodemon345 committed Mar 3, 2024
1 parent e5607d9 commit 029ec12
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/sound/snd_ess.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
11 changes: 6 additions & 5 deletions src/sound/snd_opl_esfm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 029ec12

Please sign in to comment.