From cc22fe17bbe97f9569c422814a9d3633f0f65789 Mon Sep 17 00:00:00 2001 From: Kenix3 Date: Sun, 26 Jun 2022 22:09:18 -0400 Subject: [PATCH] Headphones setting in game should now work. Resolves #13 --- libultraship/libultraship/mixer.c | 2 +- libultraship/libultraship/mixer.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libultraship/libultraship/mixer.c b/libultraship/libultraship/mixer.c index 302a54ef477..1e66dc8a1d7 100644 --- a/libultraship/libultraship/mixer.c +++ b/libultraship/libultraship/mixer.c @@ -364,7 +364,7 @@ void aS8DecImpl(uint8_t flags, ADPCM_STATE state) { memcpy(state, out - 16, 16 * sizeof(int16_t)); } -void aAddMixerImpl(uint16_t in_addr, uint16_t out_addr, uint16_t count) { +void aAddMixerImpl(uint16_t count, uint16_t in_addr, uint16_t out_addr) { int16_t *in = BUF_S16(in_addr); int16_t *out = BUF_S16(out_addr); int nbytes = ROUND_UP_64(ROUND_DOWN_16(count)); diff --git a/libultraship/libultraship/mixer.h b/libultraship/libultraship/mixer.h index 62cf7e4ba19..2e1279a8633 100644 --- a/libultraship/libultraship/mixer.h +++ b/libultraship/libultraship/mixer.h @@ -51,7 +51,7 @@ void aEnvMixerImpl(uint16_t in_addr, uint16_t n_samples, bool swap_reverb, int32_t wet_dry_addr, u32 unk); void aMixImpl(uint16_t count, int16_t gain, uint16_t in_addr, uint16_t out_addr); void aS8DecImpl(uint8_t flags, ADPCM_STATE state); -void aAddMixerImpl(uint16_t in_addr, uint16_t out_addr, uint16_t count); +void aAddMixerImpl(uint16_t count, uint16_t in_addr, uint16_t out_addr); void aDuplicateImpl(uint16_t count, uint16_t in_addr, uint16_t out_addr); void aResampleZohImpl(uint16_t pitch, uint16_t start_fract); void aInterlImpl(uint16_t in_addr, uint16_t out_addr, uint16_t n_samples);