SWF::SoundStream - SWF Sound Stream class
use SWF::SoundStream; my $soundstream = new SWF::SoundStream("wau.mp3"); print $soundstream->getDuration(); ## print $soundstream->getFrames(); # won't work until it belongs to movie $movie->setSoundStream($soundstream); print $soundstream->getFrames(); # but _now_ it is okay
SWF::SoundStream is a helper class useful for adding sound into SWF applications.
Creates a SWF::SoundStream object. If the file can't be opened the constructor will return an undef value of course. The filename is the valid name of any mp3 or flv file.
getDuration()
This function returns the duration of a given stream in ms. Works for streams of mp3, flv types only. On other cases it returns 0.
getFrames()
The number of movie frames for a given sound stream. This function returns the number of movie frames necessary to play the full sound stream. For this reason it works only if the sound stream object was added to a movie. It works for streams of mp3 -files only.
developers of ming.sourceforge.net, Albrecht Kleine
SWF, SWF:: Movie, SWF::MovieClip, SWF::Button, SWF::Sound, SWF::SoundInstance, SWF::Constants, SWF::Videostream