From: Darren S. <li...@yo...> - 2010-07-18 22:48:49
|
# HG changeset patch # User Darren Salt <li...@yo...> # Date 1279492803 -3600 # Node ID d217ddbb1151c96ee3821be3435e777c301a510b # Parent 71fc1575be89b4dc3f17b1cb2bedbefee9aff002 Recognise ScreamTracker files. ST3 is untested. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,7 @@ * Report stream buffer stats to the application. * Recognise and handle the WebM container format. (VP8 video is not yet supported.) + * Recognise ScreamTracker 2 & 3 files. (ST3 untested.) xine-lib (1.1.18.1) 2010-03-06 * Oops. compat.c (for DXR3 support) was omitted. diff --git a/src/demuxers/demux_mod.c b/src/demuxers/demux_mod.c --- a/src/demuxers/demux_mod.c +++ b/src/demuxers/demux_mod.c @@ -123,6 +123,14 @@ case FOURCC_32('3', '2', 'C', 'N'): /* 32-channel Taketracker module sound data */ return 1; } + + /* ScreamTracker 2 */ + if (!memcmp (header.buffer + 20, "!Scream!", 7)) + return 1; + + /* ScreamTracker 3 */ + if (_X_ABE_32(header.values + 0x2C / sizeof (uint32_t)) == FOURCC_32('S', 'C', 'R', 'M')) + return 1; return 0; } |