private void FixSoundReference_Scale(int originalIndex, IWriter buffer)
        {
            var scale = _container.FindSoundScale(originalIndex);

            int newIndex;

            if (!_soundScales.TryGetValue(scale, out newIndex))
            {
                newIndex = _soundResources.Scales.FindIndex(c => c.Equals(scale.Source));
                if (newIndex == -1)
                {
                    newIndex = _soundResources.Scales.Count;
                    _soundResources.Scales.Add(scale.Source);
                }
                _soundScales[scale] = newIndex;
            }
            buffer.SeekTo(_soundLayout.GetFieldOffset("scale index"));
            buffer.WriteInt16((short)newIndex);
        }