mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-27 23:00:45 +00:00
Added GFX - DefineExternalSound and DefineExternalStreamSound basic tag info
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
+12
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user