Update DUMB to revision f5f34570905e87f1933a0220d71d0d48c05b9b49

- Added a workaround for bad sample offsets in STM files
    - Disabled inserting note cut commands in STM files, as there is no such command in the format



SVN r4084 (trunk)
This commit is contained in:
Randy Heit 2013-02-08 00:33:10 +00:00
parent 277c233f5d
commit e66f50fb76

View file

@ -134,10 +134,6 @@ static int it_stm_read_pattern( IT_PATTERN *pattern, DUMBFILE *f, unsigned char
entry->effectvalue = buffer[ pos + 3 ]; entry->effectvalue = buffer[ pos + 3 ];
if ( entry->instrument && entry->instrument < 32 ) if ( entry->instrument && entry->instrument < 32 )
entry->mask |= IT_ENTRY_INSTRUMENT; entry->mask |= IT_ENTRY_INSTRUMENT;
if ( note == 0xFC || note == 0xFE ) {
entry->mask |= IT_ENTRY_NOTE;
entry->note = IT_NOTE_CUT;
}
if ( note < 251 ) { if ( note < 251 ) {
entry->mask |= IT_ENTRY_NOTE; entry->mask |= IT_ENTRY_NOTE;
entry->note = ( note >> 4 ) * 12 + ( note & 0x0F ); entry->note = ( note >> 4 ) * 12 + ( note & 0x0F );
@ -362,8 +358,15 @@ static DUMB_IT_SIGDATA *it_stm_load_sigdata(DUMBFILE *f, int * version)
} }
} }
dumbfile_skip( f, o - dumbfile_pos( f ) ); q = o - dumbfile_pos( f );
if ( dumbfile_getnc( (char*)data_block, p - o, f ) != p - o ) { p -= o;
o = 0;
if ( q >= 0 ) dumbfile_skip( f, q );
else {
o = -q;
memset ( data_block, 0, o );
}
if ( dumbfile_getnc( (char*)data_block + o, p - o, f ) != p - o ) {
free( data_block ); free( data_block );
_dumb_it_unload_sigdata( sigdata ); _dumb_it_unload_sigdata( sigdata );
return NULL; return NULL;