@@ -75,8 +75,8 @@ static void OpenBankFile(const std::string &filename)
|
||||
|
||||
/* Read riff tags */
|
||||
for (;;) {
|
||||
uint32 tag = original_sound_file->ReadDword();
|
||||
uint32 size = original_sound_file->ReadDword();
|
||||
uint32_t tag = original_sound_file->ReadDword();
|
||||
uint32_t size = original_sound_file->ReadDword();
|
||||
|
||||
if (tag == ' tmf') {
|
||||
original_sound_file->ReadWord(); // wFormatTag
|
||||
@@ -132,7 +132,7 @@ static bool SetBankSource(MixerChannel *mc, const SoundEntry *sound)
|
||||
return false;
|
||||
}
|
||||
|
||||
int8 *mem = MallocT<int8>(sound->file_size + 2);
|
||||
int8_t *mem = MallocT<int8_t>(sound->file_size + 2);
|
||||
/* Add two extra bytes so rate conversion can read these
|
||||
* without reading out of its input buffer. */
|
||||
mem[sound->file_size ] = 0;
|
||||
@@ -152,7 +152,7 @@ static bool SetBankSource(MixerChannel *mc, const SoundEntry *sound)
|
||||
#if TTD_ENDIAN == TTD_BIG_ENDIAN
|
||||
if (sound->bits_per_sample == 16) {
|
||||
uint num_samples = sound->file_size / 2;
|
||||
int16 *samples = (int16 *)mem;
|
||||
int16_t *samples = (int16_t *)mem;
|
||||
for (uint i = 0; i < num_samples; i++) {
|
||||
samples[i] = BSWAP16(samples[i]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user