+
+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;
+ U8 mode;
+ U16 width,height;
+ int bpp;
+ id = swf_GetU16(tag);
+ mode = swf_GetU8(tag);
+ width = swf_GetU16(tag);
+ height = swf_GetU16(tag);
+ printf(" image %dx%d",width,height);
+ if(mode == 3) printf(" (8 bpp)");
+ else if(mode == 4) printf(" (16 bpp)");
+ else if(mode == 5) printf(" (32 bpp)");
+ else printf(" (? bpp)");
+}