internal void Reconstruct(sound_cache_file_gestalt_group gestalt, sound_gestalt_permutations_block gestalt_perm) { int index = gestalt_perm.Name.Value; if (index != -1) { this.Name.Handle = gestalt.ImportNames[index].ImportName.Handle; } // TODO: do the tools actually "encode" these values or just cast them? this.SkipFraction.Value = (float)gestalt_perm.EncodedSkipFraction.Value; this.Gain.Value = (float)gestalt_perm.EncodedGain.Value; this.SamplesSize = gestalt_perm.SampleSize.Value; //RawInfo = PermutationInfoIndex? // TODO: do the tools multiply this by a constant (ie, 30) or leave it the same? this.LanguageNeutralMilliseconds.Value = gestalt_perm.LanguageNeutralTime.Value; index = gestalt_perm.FirstChunk.Value; if (index != -1) { int count = gestalt_perm.ChunkCount.Value; for (int x = 0; x < count; x++) { this.Chunks.AddElement(gestalt.Chunks[index + x].Clone(this.Chunks) as sound_permutation_chunk_block); } } }
internal void Reconstruct(sound_cache_file_gestalt_group gestalt, sound_gestalt_permutations_block gestalt_perm) { int index = gestalt_perm.Name.Value; if (index != -1) this.Name.Handle = gestalt.ImportNames[index].ImportName.Handle; // TODO: do the tools actually "encode" these values or just cast them? this.SkipFraction.Value = (float)gestalt_perm.EncodedSkipFraction.Value; this.Gain.Value = (float)gestalt_perm.EncodedGain.Value; this.SamplesSize = gestalt_perm.SampleSize.Value; //RawInfo = PermutationInfoIndex? // TODO: do the tools multiply this by a constant (ie, 30) or leave it the same? this.LanguageNeutralMilliseconds.Value = gestalt_perm.LanguageNeutralTime.Value; index = gestalt_perm.FirstChunk.Value; if (index != -1) { int count = gestalt_perm.ChunkCount.Value; for (int x = 0; x < count; x++) this.Chunks.AddElement(gestalt.Chunks[index+x].Clone(this.Chunks) as sound_permutation_chunk_block); } }