Format and fix mixer for Windows

This commit is contained in:
louist103 2025-04-30 21:34:15 -04:00
commit 630c814f0c
14 changed files with 234 additions and 237 deletions

View file

@ -16,7 +16,6 @@
#define ROUND_UP_8(v) (((v) + 7) & ~7)
#define ROUND_DOWN_16(v) ((v) & ~0xf)
#define DMEM_BUF_SIZE (0x1000 - 0x3C0 - 0x40)
#define BUF_U8(a) (rspa.buf.as_u8 + ((a)-0x3C0))
#define BUF_S16(a) (rspa.buf.as_s16 + ((a)-0x3C0) / sizeof(int16_t))
@ -38,7 +37,7 @@ static struct {
uint16_t filter_count;
int16_t filter[8];
__attribute__((aligned(16))) union {
union {
int16_t as_s16[DMEM_BUF_SIZE / sizeof(int16_t)];
uint8_t as_u8[DMEM_BUF_SIZE];
} buf;

View file

@ -346,8 +346,7 @@ uint8_t ResourceFactoryXMLAudioSampleV0::CodecStrToInt(const char* str, const ch
return CODEC_S16;
} else {
char buff[2048];
snprintf(buff, 2048,
"Invalid codec in %s. Got %s, expected ADPCM, S8, S16MEM, ADPCMSMALL, REVERB, S16.", file,
snprintf(buff, 2048, "Invalid codec in %s. Got %s, expected ADPCM, S8, S16MEM, ADPCMSMALL, REVERB, S16.", file,
str);
throw std::runtime_error(buff);
}

View file

@ -854,8 +854,7 @@ Acmd* AudioSynth_ProcessNote(s32 noteIndex, NoteSubEu* noteSubEu, NoteSynthesisS
goto skip;
case CODEC_S16:
case CODEC_OPUS:
AudioSynth_ClearBuffer(cmd++, DMEM_UNCOMPRESSED_NOTE,
(samplesLenAdjusted + 16) * 2);
AudioSynth_ClearBuffer(cmd++, DMEM_UNCOMPRESSED_NOTE, (samplesLenAdjusted + 16) * 2);
flags = A_CONTINUE;
skipBytes = 0;
size_t bytesToRead;