1 #include <mingpp.h> 2 #include <cstdlib> 3 #include <cstdio> 4 main()5int main() 6 { 7 try { 8 SWFMovie *m = new SWFMovie(7); 9 SWFSoundStream *stream; 10 int i; 11 FILE *file; 12 13 file = fopen(MEDIADIR "/mpeg1.mp3", "rb"); 14 if(!file) { 15 return EXIT_FAILURE; 16 } 17 18 stream = new SWFSoundStream(file); 19 m->setSoundStream(stream); 20 for(i = 0; i < 12; i++) 21 m->nextFrame(); 22 23 m->save("test04.swf"); 24 } 25 catch(SWFException &e) 26 { 27 std::cerr << "SWFException: " << e.what() << std::endl << std::endl; 28 return EXIT_FAILURE; 29 } 30 return 0; 31 } 32