KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > openlaszlo > iv > flash > api > sound > MP3SoundStreamBlock


1 /*
2  * $Id: MP3SoundStreamBlock.java,v 1.2 2002/02/15 23:44:28 skavish Exp $
3  *
4  * ===========================================================================
5  *
6  */

7
8 package org.openlaszlo.iv.flash.api.sound;
9
10 import java.io.PrintStream JavaDoc;
11 import org.openlaszlo.iv.flash.parser.*;
12 import org.openlaszlo.iv.flash.util.*;
13 import org.openlaszlo.iv.flash.api.*;
14
15 public class MP3SoundStreamBlock extends SoundStreamBlock
16 {
17     public int sampleCount; // MP3StreamSoundData.SampleCount
18

19     public int delaySeek; // MP3SoundData.DelaySeek
20
public DataMarker data; // MP3SoundData.MP3Frames
21

22     public void write( FlashOutput fob )
23     {
24         fob.writeTag( getTag(), 2 + 2 + data.length() );
25
26         fob.writeWord( sampleCount );
27
28         fob.writeWord( delaySeek );
29
30         data.write( fob );
31     }
32
33     public boolean isConstant()
34     {
35         return true;
36     }
37
38     protected FlashItem copyInto( FlashItem item, ScriptCopier copier )
39     {
40         super.copyInto( item, copier );
41
42         ( (MP3SoundStreamBlock) item ).sampleCount = sampleCount;
43         ( (MP3SoundStreamBlock) item ).delaySeek = delaySeek;
44
45         ( (MP3SoundStreamBlock) item ).data = data;
46
47         return item;
48     }
49     public FlashItem getCopy( ScriptCopier copier )
50     {
51         return copyInto( new MP3SoundStreamBlock(), copier );
52     }
53 }
54
Popular Tags