/// <summary>
        ///     Saves the sound resource table back to the file.
        /// </summary>
        /// <param name="table">The sound resource table to save.</param>
        /// <param name="stream">The stream to save to.</param>
        public void SaveSoundResourceTable(SoundResourceTable table, IStream stream)
        {
            if (_gestalt == null)
            {
                return;
            }

            _gestalt.SaveCodecs(table.Codecs, stream);
            _gestalt.SavePlaybacks(table.Playbacks, stream);
            _gestalt.SaveScales(table.Scales, stream);
            _gestalt.SaveCustomPlaybacks(table.CustomPlaybacks, stream);
            _gestalt.SaveExtraInfos(table.ExtraInfos, stream);
            _gestalt.SavePitchRanges(table.PitchRanges, stream);
            _gestalt.SaveLanguageDurations(table.LanguageDurations, stream);
            _gestalt.SavePromotions(table.Promotions, stream);
        }
        /// <summary>
        ///     Loads the sound resource table from the cache file.
        /// </summary>
        /// <param name="reader">The stream to read from.</param>
        /// <returns>
        ///     The loaded sound resource table, or <c>null</c> if loading failed.
        /// </returns>
        public SoundResourceTable LoadSoundResourceTable(IReader reader)
        {
            if (_gestalt == null)
            {
                return(null);
            }

            var result = new SoundResourceTable();

            result.Codecs.AddRange(_gestalt.LoadCodecs(reader));
            result.Playbacks.AddRange(_gestalt.LoadPlaybacks(reader));
            result.Scales.AddRange(_gestalt.LoadScales(reader));
            result.CustomPlaybacks.AddRange(_gestalt.LoadCustomPlaybacks(_tags, reader));
            result.ExtraInfos.AddRange(_gestalt.LoadExtraInfos(reader));
            result.PitchRanges.AddRange(_gestalt.LoadPitchRanges(reader));
            result.LanguageDurations.AddRange(_gestalt.LoadLanguageDurations(reader));
            result.Promotions.AddRange(_gestalt.LoadPromotions(reader));
            return(result);
        }