mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 06:53:40 +00:00
Update DUMB to revision 71ecdc7274a7fa33af0a0dea915eb3a294b0b04a
- Fixed IT stereo samples SVN r4089 (trunk)
This commit is contained in:
parent
86690be58b
commit
778bfd679b
2 changed files with 32 additions and 9 deletions
|
@ -54,7 +54,7 @@ sigdata->flags & IT_COMPATIBLE_GXX
|
|||
* handle ambiguities in the format specification. The correct code in each
|
||||
* case will be determined most likely by experimentation.
|
||||
*/
|
||||
#define STEREO_SAMPLES_COUNT_AS_TWO
|
||||
//#define STEREO_SAMPLES_COUNT_AS_TWO
|
||||
#define INVALID_ORDERS_END_SONG
|
||||
#define INVALID_NOTES_CAUSE_NOTE_CUT
|
||||
#define SUSTAIN_LOOP_OVERRIDES_NORMAL_LOOP
|
||||
|
@ -899,4 +899,6 @@ void _dumb_it_ptm_convert_effect(int effect, int value, IT_ENTRY *entry);
|
|||
|
||||
int32 _dumb_it_read_sample_data_adpcm4(IT_SAMPLE *sample, DUMBFILE *f);
|
||||
|
||||
void _dumb_it_interleave_stereo_sample(IT_SAMPLE *sample);
|
||||
|
||||
#endif /* INTERNAL_IT_H */
|
||||
|
|
|
@ -684,15 +684,36 @@ static int32 it_read_sample_data(int cmwt, IT_SAMPLE *sample, unsigned char conv
|
|||
else
|
||||
decompress8(f, sample->data, datasize, ((cmwt >= 0x215) && (convert & 4)));
|
||||
} else if (sample->flags & IT_SAMPLE_16BIT) {
|
||||
if (sample->flags & IT_SAMPLE_STEREO) {
|
||||
if (convert & 2) {
|
||||
for (n = 0; n < datasize; n += 2)
|
||||
((short *)sample->data)[n] = dumbfile_mgetw(f);
|
||||
for (n = 1; n < datasize; n += 2)
|
||||
((short *)sample->data)[n] = dumbfile_mgetw(f);
|
||||
} else {
|
||||
for (n = 0; n < datasize; n += 2)
|
||||
((short *)sample->data)[n] = dumbfile_igetw(f);
|
||||
for (n = 1; n < datasize; n += 2)
|
||||
((short *)sample->data)[n] = dumbfile_igetw(f);
|
||||
}
|
||||
} else {
|
||||
if (convert & 2)
|
||||
for (n = 0; n < datasize; n++)
|
||||
((short *)sample->data)[n] = dumbfile_mgetw(f);
|
||||
else
|
||||
for (n = 0; n < datasize; n++)
|
||||
((short *)sample->data)[n] = dumbfile_igetw(f);
|
||||
}
|
||||
} else {
|
||||
if (sample->flags & IT_SAMPLE_STEREO) {
|
||||
for (n = 0; n < datasize; n += 2)
|
||||
((signed char *)sample->data)[n] = dumbfile_getc(f);
|
||||
for (n = 1; n < datasize; n += 2)
|
||||
((signed char *)sample->data)[n] = dumbfile_getc(f);
|
||||
} else
|
||||
for (n = 0; n < datasize; n++)
|
||||
((signed char *)sample->data)[n] = dumbfile_getc(f);
|
||||
}
|
||||
|
||||
if (dumbfile_error(f))
|
||||
return -1;
|
||||
|
|
Loading…
Reference in a new issue