Added GFX - DefineExternalSound and DefineExternalStreamSound basic tag info

This commit is contained in:
Jindra Petřík
2023-01-09 21:37:06 +01:00
parent ce73845949
commit 6468242f42
2 changed files with 24 additions and 0 deletions
@@ -19,6 +19,7 @@ package com.jpexs.decompiler.flash.tags.gfx;
import com.jpexs.decompiler.flash.SWF;
import com.jpexs.decompiler.flash.SWFInputStream;
import com.jpexs.decompiler.flash.SWFOutputStream;
import com.jpexs.decompiler.flash.tags.TagInfo;
import com.jpexs.decompiler.flash.tags.base.CharacterTag;
import com.jpexs.decompiler.flash.tags.base.SoundTag;
import com.jpexs.decompiler.flash.types.sound.SoundExportFormat;
@@ -232,4 +233,15 @@ public class DefineExternalSound extends CharacterTag implements SoundTag {
final int[] rateMap = {5512, 11025, 22050, 44100};
this.sampleRate = rateMap[soundRate];
}
@Override
public void getTagInfo(TagInfo tagInfo) {
super.getTagInfo(tagInfo);
SoundFormat soundFormat = getSoundFormat();
tagInfo.addInfo("general", "codecName", soundFormat.getFormatName());
tagInfo.addInfo("general", "exportFormat", soundFormat.getNativeExportFormat());
tagInfo.addInfo("general", "samplingRate", soundFormat.samplingRate);
tagInfo.addInfo("general", "stereo", soundFormat.stereo);
tagInfo.addInfo("general", "sampleCount", sampleCount);
}
}
@@ -20,6 +20,7 @@ import com.jpexs.decompiler.flash.SWF;
import com.jpexs.decompiler.flash.SWFInputStream;
import com.jpexs.decompiler.flash.SWFOutputStream;
import com.jpexs.decompiler.flash.tags.Tag;
import com.jpexs.decompiler.flash.tags.TagInfo;
import com.jpexs.decompiler.flash.tags.base.CharacterIdTag;
import com.jpexs.decompiler.flash.tags.base.SoundTag;
import com.jpexs.decompiler.flash.types.annotations.Internal;
@@ -244,4 +245,15 @@ public class DefineExternalStreamSound extends Tag implements CharacterIdTag, So
public String toString() {
return getName() + (virtualCharacterId > 0 ? " (" + virtualCharacterId + ")" : "");
}
@Override
public void getTagInfo(TagInfo tagInfo) {
super.getTagInfo(tagInfo);
SoundFormat soundFormat = getSoundFormat();
tagInfo.addInfo("general", "codecName", soundFormat.getFormatName());
tagInfo.addInfo("general", "exportFormat", soundFormat.getNativeExportFormat());
tagInfo.addInfo("general", "samplingRate", soundFormat.samplingRate);
tagInfo.addInfo("general", "stereo", soundFormat.stereo);
tagInfo.addInfo("general", "sampleCount", sampleCount);
}
}