Skip to content

Commit

Permalink
update for 1.31.0
Browse files Browse the repository at this point in the history
unfortunately the unity upgrade did not fix the `_dspTimeOffset` issue, so the workaround remains
  • Loading branch information
GalaxyMaster2 committed Jul 9, 2023
1 parent 0d39f06 commit 8df3a05
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace HitsoundTweaks.HarmonyPatches
* To fix this, we patch out the _dspTimeOffset update, and reimplement it to be a cumulative average of the target offset calculated each frame
* This reliably and consistently gets within a handful of audio samples after a few seconds, which is for all intents and purposes good enough
*/
[HarmonyPatch(typeof(AudioTimeSyncController), nameof(AudioTimeSyncController.Update))]
[HarmonyPatch(typeof(AudioTimeSyncController), "Update")]
internal class AudioTimeSyncController_dspTimeOffset_Patch
{
static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace HitsoundTweaks.HarmonyPatches
* By default, hitsounds are not played for chain elements
* These patches enable them and apply a volume multiplier based on config values
*/
[HarmonyPatch(typeof(NoteCutSoundEffectManager), nameof(NoteCutSoundEffectManager.IsSupportedNote))]
[HarmonyPatch(typeof(NoteCutSoundEffectManager), "IsSupportedNote")]
internal class NoteCutSoundEffectManager_Chain_Element_Hitsound_Patch
{
static void Postfix(NoteData noteData, ref bool __result)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace HitsoundTweaks.HarmonyPatches
* 2. AudioSource priorities are not managed very smoothly, which gives Unity little time to sort things out, leading to hitsounds cutting out, not playing, etc.
* This reworks priority assignment to smoothly scale priorities based on time relative to the note it's meant for, which greatly improves reliability
*/
[HarmonyPatch(typeof(NoteCutSoundEffect), nameof(NoteCutSoundEffect.LateUpdate))]
[HarmonyPatch(typeof(NoteCutSoundEffect), "LateUpdate")]
internal class Hitsound_Reliability_Patches
{
static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace HitsoundTweaks.HarmonyPatches
* This is likely intentional to keep hitsounds from cutting out entirely with the limited number of virtual voices available by default
* When the number of virtual voices is raised, it makes more sense to re-enable this check by setting the limit just below the number of virtual voices
*/
[HarmonyPatch(typeof(NoteCutSoundEffectManager), nameof(NoteCutSoundEffectManager.HandleNoteWasSpawned))]
[HarmonyPatch(typeof(NoteCutSoundEffectManager), "HandleNoteWasSpawned")]
internal class NoteCutSoundEffectManager_Max_Active_SoundEffects_Patch
{
static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace HitsoundTweaks.HarmonyPatches
* Chain elements and heads can be spawned out of order, which can cause hitsounds to be skipped if chain element hitsounds are enabled
* By making the time proximity check use an absolute value, we mitigate this issue
*/
[HarmonyPatch(typeof(NoteCutSoundEffectManager), nameof(NoteCutSoundEffectManager.HandleNoteWasSpawned))]
[HarmonyPatch(typeof(NoteCutSoundEffectManager), "HandleNoteWasSpawned")]
internal class NoteCutSoundEffectManager_Proximity_Check_Patch
{
static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ static void Postfix(NoteCutSoundEffect __instance, AudioSource ____audioSource,
}
}

[HarmonyPatch(typeof(NoteCutSoundEffect), nameof(NoteCutSoundEffect.LateUpdate))]
[HarmonyPatch(typeof(NoteCutSoundEffect), "LateUpdate")]
internal class NoteCutSoundEffect_Transform_Position_LateUpdate_Patch
{
static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
Expand Down
4 changes: 2 additions & 2 deletions HitsoundTweaks/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.1.2")]
[assembly: AssemblyFileVersion("1.1.2")]
[assembly: AssemblyVersion("1.1.3")]
[assembly: AssemblyFileVersion("1.1.3")]
8 changes: 4 additions & 4 deletions HitsoundTweaks/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"id": "HitsoundTweaks",
"name": "HitsoundTweaks",
"author": "GalaxyMaster",
"version": "1.1.2",
"version": "1.1.3",
"description": "Adds more configurability to hitsounds, and fixes several base game bugs to make them more reliable and consistent.",
"gameVersion": "1.21.0",
"gameVersion": "1.31.0",
"dependsOn": {
"BSIPA": "^4.2.0",
"BeatSaberMarkupLanguage": "^1.6.6"
"BSIPA": "^4.3.0",
"BeatSaberMarkupLanguage": "^1.7.6"
}
}

0 comments on commit 8df3a05

Please sign in to comment.