[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xine-cvslog
Subject:    [xine-cvs] HG: xine-lib: Recognise ScreamTracker files. ST3 is
From:       Darren Salt <linux () youmustbejoking ! demon ! co ! uk>
Date:       2010-07-18 22:48:40
Message-ID: d217ddbb1151c96ee382.1279492803 () hg ! debian ! org
[Download RAW message or body]

# HG changeset patch
# User Darren Salt <linux@youmustbejoking.demon.co.uk>
# 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;
 }

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Xine-cvslog mailing list
Xine-cvslog@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xine-cvslog
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic