mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-22 06:13:45 -07:00
Format and fix mixer for Windows
This commit is contained in:
parent
d35b1605ec
commit
630c814f0c
14 changed files with 234 additions and 237 deletions
|
@ -16,7 +16,6 @@
|
||||||
#define ROUND_UP_8(v) (((v) + 7) & ~7)
|
#define ROUND_UP_8(v) (((v) + 7) & ~7)
|
||||||
#define ROUND_DOWN_16(v) ((v) & ~0xf)
|
#define ROUND_DOWN_16(v) ((v) & ~0xf)
|
||||||
|
|
||||||
|
|
||||||
#define DMEM_BUF_SIZE (0x1000 - 0x3C0 - 0x40)
|
#define DMEM_BUF_SIZE (0x1000 - 0x3C0 - 0x40)
|
||||||
#define BUF_U8(a) (rspa.buf.as_u8 + ((a)-0x3C0))
|
#define BUF_U8(a) (rspa.buf.as_u8 + ((a)-0x3C0))
|
||||||
#define BUF_S16(a) (rspa.buf.as_s16 + ((a)-0x3C0) / sizeof(int16_t))
|
#define BUF_S16(a) (rspa.buf.as_s16 + ((a)-0x3C0) / sizeof(int16_t))
|
||||||
|
@ -38,7 +37,7 @@ static struct {
|
||||||
uint16_t filter_count;
|
uint16_t filter_count;
|
||||||
int16_t filter[8];
|
int16_t filter[8];
|
||||||
|
|
||||||
__attribute__((aligned(16))) union {
|
union {
|
||||||
int16_t as_s16[DMEM_BUF_SIZE / sizeof(int16_t)];
|
int16_t as_s16[DMEM_BUF_SIZE / sizeof(int16_t)];
|
||||||
uint8_t as_u8[DMEM_BUF_SIZE];
|
uint8_t as_u8[DMEM_BUF_SIZE];
|
||||||
} buf;
|
} buf;
|
||||||
|
|
|
@ -346,8 +346,7 @@ uint8_t ResourceFactoryXMLAudioSampleV0::CodecStrToInt(const char* str, const ch
|
||||||
return CODEC_S16;
|
return CODEC_S16;
|
||||||
} else {
|
} else {
|
||||||
char buff[2048];
|
char buff[2048];
|
||||||
snprintf(buff, 2048,
|
snprintf(buff, 2048, "Invalid codec in %s. Got %s, expected ADPCM, S8, S16MEM, ADPCMSMALL, REVERB, S16.", file,
|
||||||
"Invalid codec in %s. Got %s, expected ADPCM, S8, S16MEM, ADPCMSMALL, REVERB, S16.", file,
|
|
||||||
str);
|
str);
|
||||||
throw std::runtime_error(buff);
|
throw std::runtime_error(buff);
|
||||||
}
|
}
|
||||||
|
|
|
@ -854,8 +854,7 @@ Acmd* AudioSynth_ProcessNote(s32 noteIndex, NoteSubEu* noteSubEu, NoteSynthesisS
|
||||||
goto skip;
|
goto skip;
|
||||||
case CODEC_S16:
|
case CODEC_S16:
|
||||||
case CODEC_OPUS:
|
case CODEC_OPUS:
|
||||||
AudioSynth_ClearBuffer(cmd++, DMEM_UNCOMPRESSED_NOTE,
|
AudioSynth_ClearBuffer(cmd++, DMEM_UNCOMPRESSED_NOTE, (samplesLenAdjusted + 16) * 2);
|
||||||
(samplesLenAdjusted + 16) * 2);
|
|
||||||
flags = A_CONTINUE;
|
flags = A_CONTINUE;
|
||||||
skipBytes = 0;
|
skipBytes = 0;
|
||||||
size_t bytesToRead;
|
size_t bytesToRead;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue