private SoundLooping ConvertSoundLooping(SoundLooping soundLooping) { soundLooping.Unused = null; soundLooping.SoundClass = ((int)soundLooping.SoundClass < 50) ? soundLooping.SoundClass : (soundLooping.SoundClass + 1); if (soundLooping.SoundClass == SoundLooping.SoundClassValue.FirstPersonInside) { soundLooping.SoundClass = SoundLooping.SoundClassValue.InsideSurroundTail; } if (soundLooping.SoundClass == SoundLooping.SoundClassValue.FirstPersonOutside) { soundLooping.SoundClass = SoundLooping.SoundClassValue.OutsideSurroundTail; } // // Fixes for looping sound (temporary and hacky) // if (soundLooping.SoundClass == SoundLooping.SoundClassValue.VehicleEngine || soundLooping.SoundClass == SoundLooping.SoundClassValue.VehicleEngineLod || soundLooping.SoundClass == SoundLooping.SoundClassValue.Music) { soundLooping.Unknown4 = 1; } return(soundLooping); }
private SoundLooping ConvertSoundLooping(SoundLooping soundLooping) { if (BlamSoundGestalt == null) { BlamSoundGestalt = PortingContextFactory.LoadSoundGestalt(CacheContext, ref BlamCache); } soundLooping.Unused = null; soundLooping.SoundClass = ((int)soundLooping.SoundClass < 50) ? soundLooping.SoundClass : (soundLooping.SoundClass + 1); if (soundLooping.SoundClass == SoundLooping.SoundClassValue.FirstPersonInside) { soundLooping.SoundClass = SoundLooping.SoundClassValue.InsideSurroundTail; } if (soundLooping.SoundClass == SoundLooping.SoundClassValue.FirstPersonOutside) { soundLooping.SoundClass = SoundLooping.SoundClassValue.OutsideSurroundTail; } /* unsuccessful hacks of death and suffering * foreach (var track in soundLooping.Tracks) * { * track.FadeInDuration *= 2f; * track.Unknown1 *= 2f; * track.FadeOutDuration *= 2f; * track.AlternateCrossfadeDuration *= 2f; * track.Unknown5 *= 2; * track.AlternateFadeOutDuration *= 2f; * track.Unknown6 *= 2f; * } * * foreach (var detailSound in soundLooping.DetailSounds) * detailSound.RandomPeriodBounds = new Bounds<float>( * detailSound.RandomPeriodBounds.Lower * 2f, * detailSound.RandomPeriodBounds.Upper * 2f);*/ return(soundLooping); }
private SoundLooping ConvertSoundLooping(SoundLooping soundLooping) { if (BlamSoundGestalt == null) { BlamSoundGestalt = PortingContextFactory.LoadSoundGestalt(CacheContext, ref BlamCache); } soundLooping.Unused = null; soundLooping.SoundClass = ((int)soundLooping.SoundClass < 50) ? soundLooping.SoundClass : (soundLooping.SoundClass + 1); if (soundLooping.SoundClass == SoundLooping.SoundClassValue.FirstPersonInside) { soundLooping.SoundClass = SoundLooping.SoundClassValue.InsideSurroundTail; } if (soundLooping.SoundClass == SoundLooping.SoundClassValue.FirstPersonOutside) { soundLooping.SoundClass = SoundLooping.SoundClassValue.OutsideSurroundTail; } // // Fixes for looping sound (temporary and hacky) // if (soundLooping.SoundClass == SoundLooping.SoundClassValue.VehicleEngine || soundLooping.SoundClass == SoundLooping.SoundClassValue.VehicleEngineLod || soundLooping.SoundClass == SoundLooping.SoundClassValue.Music) { soundLooping.Unknown4 = 1; } return(soundLooping); }