1 #include <mingpp.h> 2 #include <cstdlib> 3 main()4int main() 5 { 6 try { 7 SWFMovie *m = new SWFMovie(7); 8 SWFSound *sound, *sound2; 9 int i; 10 FILE *file; 11 12 file = fopen(MEDIADIR "/sound1.mp3", "rb"); 13 if(!file) { 14 return EXIT_FAILURE; 15 } 16 17 sound = new SWFSound(file, SWF_SOUND_MP3_COMPRESSED); 18 m->addExport(sound, "sound1.mp3"); 19 m->startSound(sound); 20 21 sound2 = new SWFSound(file, SWF_SOUND_MP3_COMPRESSED); 22 sound2->delaySeek(2048); 23 m->addExport(sound2, "delaySeeked"); 24 25 m->save("test03.swf"); 26 } 27 catch(SWFException &e) 28 { 29 std::cerr << "SWFException: " << e.what() << std::endl << std::endl; 30 return EXIT_FAILURE; 31 } 32 return 0; 33 } 34