X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fswfdump.c;h=e7764031f326f0b1bce5dd13f0a724e8f16e1442;hb=5f9742beec4337b37cf365afbea5b5c682847ccf;hp=a4d9c5e2893f693024f6890c0e74c3b1e2a673a1;hpb=84b771ec731d95fd65541076e6b8da430f620e2b;p=swftools.git diff --git a/src/swfdump.c b/src/swfdump.c index a4d9c5e..e776403 100644 --- a/src/swfdump.c +++ b/src/swfdump.c @@ -250,6 +250,29 @@ void handleText(TAG*tag) swf_FontExtract_DefineTextCallback(-1,0,tag,4, textcallback); } +void handleDefineSound(TAG*tag) +{ + U16 id = swf_GetU16(tag); + U8 flags = swf_GetU8(tag); + int compression = (flags>>4)&3; + int rate = (flags>>2)&3; + int bits = flags&2?16:8; + int stereo = flags&1; + printf(" ("); + if(compression == 0) printf("Raw "); + else if(compression == 1) printf("ADPCM "); + else if(compression == 2) printf("MP3 "); + else printf("? "); + if(rate == 0) printf("5.5Khz "); + if(rate == 1) printf("11Khz "); + if(rate == 2) printf("22Khz "); + if(rate == 3) printf("44Khz "); + printf("%dBit ", bits); + if(stereo) printf("stereo"); + else printf("mono"); + printf(")"); +} + void handleDefineBits(TAG*tag) { U16 id; @@ -643,11 +666,22 @@ int main (int argc,char ** argv) if(!issprite) {mainframe++; framelabel = 0;} } + if(tag->id == ST_SETBACKGROUNDCOLOR) { + U8 r = swf_GetU8(tag); + U8 g = swf_GetU8(tag); + U8 b = swf_GetU8(tag); + printf(" (%02x/%02x/%02x)",r,g,b); + } + if(tag->id == ST_DEFINEBITSLOSSLESS || tag->id == ST_DEFINEBITSLOSSLESS2) { handleDefineBits(tag); printf("\n"); } + else if(tag->id == ST_DEFINESOUND) { + handleDefineSound(tag); + printf("\n"); + } else if(tag->id == ST_DEFINEEDITTEXT) { handleEditText(tag); printf("\n");