From 483fe43fb4d4d3cd2e93d8870a21a9b639e41cf7 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Fri, 12 Jul 2024 20:28:12 -0400 Subject: [PATCH] Nuked: Compile fixes Update snd_opl_nuked.h --- src/include/86box/snd_opl_nuked.h | 2 +- src/sound/snd_opl_nuked.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/include/86box/snd_opl_nuked.h b/src/include/86box/snd_opl_nuked.h index da2a8ae86..1cc4fe64e 100644 --- a/src/include/86box/snd_opl_nuked.h +++ b/src/include/86box/snd_opl_nuked.h @@ -20,6 +20,6 @@ #ifndef SOUND_OPL_NUKED_H #define SOUND_OPL_NUKED_H -void nuked_write_reg(opl3_chip *dev, uint16_t reg, uint8_t val); +void nuked_write_reg(void *priv, uint16_t reg, uint8_t val); #endif /*SOUND_OPL_NUKED_H*/ diff --git a/src/sound/snd_opl_nuked.c b/src/sound/snd_opl_nuked.c index 4887c2a2b..0cddb33d0 100644 --- a/src/sound/snd_opl_nuked.c +++ b/src/sound/snd_opl_nuked.c @@ -1206,7 +1206,7 @@ process_slot(opl3_slot *slot) slot_generate(slot); } -inline void +static inline void nuked_generate_4ch(void *priv, int32_t *buf4) { opl3_chip *dev = (opl3_chip *) priv; @@ -1369,9 +1369,9 @@ nuked_generate_4ch_resampled(opl3_chip *dev, int32_t *buf4) } void -nuked_generate_resampled(opl3_chip *dev, int16_t *buf4) +nuked_generate_resampled(opl3_chip *dev, int32_t *buf4) { - int16_t samples[4]; + int32_t samples[4]; nuked_generate_4ch_resampled(dev, samples); buf4[0] = samples[0]; buf4[1] = samples[1]; @@ -1537,7 +1537,7 @@ nuked_write_reg_buffered(void *priv, uint16_t reg, uint8_t val) void nuked_generate_4ch_stream(opl3_chip *dev, int16_t *sndptr1, int16_t *sndptr2, uint32_t numsamples) { - int16_t samples[4]; + int32_t samples[4]; for (uint_fast32_t i = 0; i < numsamples; i++) { nuked_generate_4ch_resampled(dev, samples);