internal USoundWave(PackageReader reader, Stream ubulk, long ubulkOffset) : base(reader) { bCooked = reader.ReadInt32() != 0; if (this.TryGetValue("bStreaming", out var v) && v is BoolProperty b) { bStreaming = b.Value; } if (!bStreaming) { if (bCooked) { CompressedFormatData = new FFormatContainer[reader.ReadInt32()]; for (int i = 0; i < CompressedFormatData.Length; i++) { CompressedFormatData[i] = new FFormatContainer(reader, ubulk, ubulkOffset); } AudioFormat = CompressedFormatData[^ 1].FormatName;
internal USoundWave(PackageReader reader, Stream ubulk, long ubulkOffset) : base(reader) { // if UE4.25+ && Windows -> True bStreaming = FModel.Globals.Game.Version >= EPakVersion.PATH_HASH_INDEX ? true : false; bCooked = reader.ReadInt32() != 0; if (this.TryGetValue("bStreaming", out var v) && v is BoolProperty b) { bStreaming = b.Value; } if (!bStreaming) { if (bCooked) { CompressedFormatData = new FFormatContainer[reader.ReadInt32()]; for (int i = 0; i < CompressedFormatData.Length; i++) { CompressedFormatData[i] = new FFormatContainer(reader, ubulk, ubulkOffset); } AudioFormat = CompressedFormatData[^ 1].FormatName;
private void Serialize(PackageReader reader, Stream ubulk, long ubulkOffset) { bCooked = reader.ReadInt32() != 0; if (this.TryGetValue("bStreaming", out var v) && v is BoolProperty b) { bStreaming = b.Value; } else if (this.TryGetValue("LoadingBehavior", out var e) && e is EnumProperty loadingBehavior) { bStreaming = !loadingBehavior.Value.IsNone && loadingBehavior.Value.String != "ESoundWaveLoadingBehavior::ForceInline"; } if (!bStreaming) { if (bCooked) { CompressedFormatData = new FFormatContainer[reader.ReadInt32()]; for (int i = 0; i < CompressedFormatData.Length; i++) { CompressedFormatData[i] = new FFormatContainer(reader, ubulk, ubulkOffset); } AudioFormat = CompressedFormatData[^ 1].FormatName;