From e2c2516b07ca97ed68f890310a3998424ee3f5a1 Mon Sep 17 00:00:00 2001 From: kramm Date: Wed, 16 Jan 2002 13:56:03 +0000 Subject: [PATCH] cleaned up. --- lib/example/avi2swf.cc | 8 +++----- lib/example/sound.c | 6 ------ 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/lib/example/avi2swf.cc b/lib/example/avi2swf.cc index 6825217..a6efd41 100644 --- a/lib/example/avi2swf.cc +++ b/lib/example/avi2swf.cc @@ -1,7 +1,7 @@ /* avi2swf.cc Convert avi movie files into swf. - As soon as there's an algorithm implemented for writing the - data directly to disk, this file should maybe go to ../src. + As soon as the size of the generated swfs is reasonable, this file + will go to ../../src Part of the swftools package. @@ -19,6 +19,7 @@ extern "C" { #include "aviplay.h" /* +statistics: (for now) 37 bytes per shape (rectangle) 8-12 bytes per placeobject 4 bytes per removeobject2 @@ -655,9 +656,6 @@ int main (int argc,char ** argv) printf("\n"); destroydisplay(file); - printf("mp3 samples read:%d\n", mp3_sound_pos); - printf("mp3 samples read:%d\n", mp3_sound_pos); - tag = swf_InsertTag(NULL, ST_END); swf_WriteTag(file, tag); swf_DeleteTag(tag); diff --git a/lib/example/sound.c b/lib/example/sound.c index 8ddf34f..212ab9a 100644 --- a/lib/example/sound.c +++ b/lib/example/sound.c @@ -22,8 +22,6 @@ int main (int argc,char ** argv) S32 width=300,height = 300; U16 block[1152*2]; TAG * tag; - FILE* fi = fopen("test.mp3","wb"); - FILE* fi2 = fopen("test2.wav","wb"); int f,i,ls1,fs1; int count; @@ -55,12 +53,8 @@ int main (int argc,char ** argv) } swf_SetSoundStreamBlock(tag, block, 1152,1); swf_SetSoundStreamBlock(tag, &block[1152], 1152,0); - fwrite(&tag->data[4], tag->len-4, 1, fi); - fwrite(block, 1152*2*2, 1, fi2); tag = swf_InsertTag(tag, ST_SHOWFRAME); } - fclose(fi); - fclose(fi2); f = open("sound.swf",O_WRONLY|O_CREAT|O_TRUNC, 0644); if FAILED(swf_WriteSWF(f,&swf)) fprintf(stderr,"WriteSWF() failed.\n"); -- 1.7.10.4