1.::SWF::SoundStream(3)User Contributed Perl Documentation.::SWF::SoundStream(3)
2
3
4
6 SWF::SoundStream - SWF Sound Stream class
7
9 use SWF::SoundStream;
10 my $soundstream = new SWF::SoundStream("wau.mp3");
11 print $soundstream->getDuration();
12 ## print $soundstream->getFrames(); # won't work until it belongs to movie
13 $movie->setSoundStream($soundstream);
14 print $soundstream->getFrames(); # but _now_ it is okay (but anyway deprecated)
15
17 SWF::SoundStream is a helper class useful for adding sound into SWF
18 applications.
19
21 $soundstream = new SWF::SoundStream($filename)
22 Creates a SWF::SoundStream object. If the file can't be opened the
23 constructor will return an undef value of course. The filename is
24 the valid name of any mp3 or flv file.
25
26 $dura = $soundstream->getDuration()
27 This function returns the duration of a given stream in ms. Works
28 for streams of mp3, flv types only. On other cases it returns 0.
29
30 $frames = $soundstream->getFrames()
31 Using getFrames() is deprecated, better use getDuration().
32 getFrames() returns the number of movie frames necessary to play
33 the full sound stream. For this reason it works only if the sound
34 stream object was added to a movie, and also only for streams of
35 mp3 -files.
36
38 developers of ming.sourceforge.net, Albrecht Kleine
39
41 SWF, SWF:: Movie, SWF::MovieClip, SWF::Button, SWF::Sound,
42 SWF::SoundInstance, SWF::Constants, SWF::Videostream
43
44
45
46perl v5.28.1 2018-11-12 .::SWF::SoundStream(3)