01: /*
02: * $Id: MP3SoundStreamBlock.java,v 1.2 2002/02/15 23:44:28 skavish Exp $
03: *
04: * ===========================================================================
05: *
06: */
07:
08: package org.openlaszlo.iv.flash.api.sound;
09:
10: import java.io.PrintStream;
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: public int sampleCount; // MP3StreamSoundData.SampleCount
17:
18: public int delaySeek; // MP3SoundData.DelaySeek
19: public DataMarker data; // MP3SoundData.MP3Frames
20:
21: public void write(FlashOutput fob) {
22: fob.writeTag(getTag(), 2 + 2 + data.length());
23:
24: fob.writeWord(sampleCount);
25:
26: fob.writeWord(delaySeek);
27:
28: data.write(fob);
29: }
30:
31: public boolean isConstant() {
32: return true;
33: }
34:
35: protected FlashItem copyInto(FlashItem item, ScriptCopier copier) {
36: super .copyInto(item, copier);
37:
38: ((MP3SoundStreamBlock) item).sampleCount = sampleCount;
39: ((MP3SoundStreamBlock) item).delaySeek = delaySeek;
40:
41: ((MP3SoundStreamBlock) item).data = data;
42:
43: return item;
44: }
45:
46: public FlashItem getCopy(ScriptCopier copier) {
47: return copyInto(new MP3SoundStreamBlock(), copier);
48: }
49: }
|