Added #2259 Optional resampling sound to 44kHz on playback and on export

This commit is contained in:
Jindra Petřík
2024-07-20 20:53:27 +02:00
parent 502d44b06d
commit 6d8b631383
29 changed files with 317 additions and 72 deletions

View File

@@ -3251,8 +3251,8 @@ public final class SWF implements SWFContainerItem, Timelined, Openable {
}
}
public void putToCache(SOUNDINFO soundInfo, SoundTag soundTag, byte[] data) {
SoundInfoSoundCacheEntry key = new SoundInfoSoundCacheEntry(soundInfo, soundTag);
public void putToCache(SOUNDINFO soundInfo, SoundTag soundTag, boolean resample, byte[] data) {
SoundInfoSoundCacheEntry key = new SoundInfoSoundCacheEntry(soundInfo, soundTag, resample);
soundCache.put(key, data);
}
@@ -3399,8 +3399,8 @@ public final class SWF implements SWFContainerItem, Timelined, Openable {
return null;
}
public byte[] getFromCache(SOUNDINFO soundInfo, SoundTag soundTag) {
SoundInfoSoundCacheEntry key = new SoundInfoSoundCacheEntry(soundInfo, soundTag);
public byte[] getFromCache(SOUNDINFO soundInfo, SoundTag soundTag, boolean resample) {
SoundInfoSoundCacheEntry key = new SoundInfoSoundCacheEntry(soundInfo, soundTag, resample);
if (soundCache.contains(key)) {
return soundCache.get(key);
}