clear sound cache after replacing sound

This commit is contained in:
honfika@gmail.com
2016-08-07 15:20:32 +02:00
parent 21866da093
commit 9573a00c92
5 changed files with 2349 additions and 2362 deletions

View File

@@ -2513,6 +2513,10 @@ public final class SWF implements SWFContainerItem, Timelined {
}
}
public void clearSoundCache() {
soundCache.clear();
}
public void clearScriptCache() {
as2PcodeCache.clear();
as2Cache.clear();
@@ -2890,7 +2894,8 @@ public final class SWF implements SWFContainerItem, Timelined {
timelined.setModified(true);
timelined.resetTimeline();
} else // timeline should be always the swf here
if (removeDependencies) {
{
if (removeDependencies) {
removeTagWithDependenciesFromTimeline(tag, timelined.getTimeline());
timelined.setModified(true);
} else {
@@ -2899,6 +2904,7 @@ public final class SWF implements SWFContainerItem, Timelined {
timelined.setModified(true);
}
}
}
}
@Override

View File

@@ -1807,8 +1807,8 @@ public class XFLConverter {
}
format += 4; //quality best
try {
MP3SOUNDDATA s = new MP3SOUNDDATA(new SWFInputStream(swf, soundData), false);
//sis.readSI16();
SWFInputStream sis = new SWFInputStream(swf, soundData);
MP3SOUNDDATA s = new MP3SOUNDDATA(sis, false);
//MP3FRAME frame = new MP3FRAME(sis);
MP3FRAME frame = s.frames.get(0);
int bitRate = frame.getBitRate();