SHA256
Fix Preset Save
This commit is contained in:
5 files changed
+79
-70
No files matched your search
@@ -12,7 +12,7 @@ namespace ADOFAIRenderer.Patch.Engine
|
||||
[HarmonyPrefix]
|
||||
public static bool Prefix(string snd, double time, AudioMixerGroup group, float volume, int priority)
|
||||
{
|
||||
if (RenderManager.IsCapturingActive && RenderManager.Instance.Configuration.RenderAudio)
|
||||
if (RenderManager.IsCapturingActive && RenderManager.Instance.Configuration.AudioConfig.RenderAudio)
|
||||
{
|
||||
// Cache the clip on the main thread
|
||||
RenderManager.Instance.AudioMixer?.CacheClip(snd);
|
||||
@@ -23,7 +23,7 @@ namespace ADOFAIRenderer.Patch.Engine
|
||||
[HarmonyPostfix]
|
||||
public static void Postfix(AudioSource __result, string snd, double time, AudioMixerGroup group, float volume, int priority)
|
||||
{
|
||||
if (RenderManager.IsCapturingActive && RenderManager.Instance.Configuration.RenderAudio && __result != null)
|
||||
if (RenderManager.IsCapturingActive && RenderManager.Instance.Configuration.AudioConfig.RenderAudio && __result != null)
|
||||
{
|
||||
// Convert absolute DSP time to relative time in seconds from render start
|
||||
double relativeStartTime = time - RenderManager.Instance.dspTimeBase;
|
||||
@@ -40,7 +40,7 @@ namespace ADOFAIRenderer.Patch.Engine
|
||||
[HarmonyPrefix]
|
||||
public static bool Prefix(string snd, double time, double endTime, float volume, int priority)
|
||||
{
|
||||
if (RenderManager.IsCapturingActive && RenderManager.Instance.Configuration.RenderAudio)
|
||||
if (RenderManager.IsCapturingActive && RenderManager.Instance.Configuration.AudioConfig.RenderAudio)
|
||||
{
|
||||
var mixer = RenderManager.Instance.AudioMixer;
|
||||
if (mixer != null)
|
||||
@@ -67,7 +67,7 @@ namespace ADOFAIRenderer.Patch.Engine
|
||||
// ReSharper disable once InconsistentNaming
|
||||
public static void Postfix(AudioSource __instance, float value)
|
||||
{
|
||||
if (RenderManager.IsCapturingActive && RenderManager.Instance.Configuration.RenderAudio)
|
||||
if (RenderManager.IsCapturingActive && RenderManager.Instance.Configuration.AudioConfig.RenderAudio)
|
||||
{
|
||||
var mixer = RenderManager.Instance.AudioMixer;
|
||||
if (mixer != null && mixer.TryGetSoundEvent(__instance, out var soundEvent))
|
||||
@@ -86,7 +86,7 @@ namespace ADOFAIRenderer.Patch.Engine
|
||||
[HarmonyPostfix]
|
||||
public static void Postfix(AudioSource __instance, double time)
|
||||
{
|
||||
if (RenderManager.IsCapturingActive && RenderManager.Instance.Configuration.RenderAudio)
|
||||
if (RenderManager.IsCapturingActive && RenderManager.Instance.Configuration.AudioConfig.RenderAudio)
|
||||
{
|
||||
var mixer = RenderManager.Instance.AudioMixer;
|
||||
if (mixer != null && mixer.TryGetSoundEvent(__instance, out var soundEvent))
|
||||
@@ -103,7 +103,7 @@ namespace ADOFAIRenderer.Patch.Engine
|
||||
[HarmonyPostfix]
|
||||
public static void Postfix(AudioSource __instance)
|
||||
{
|
||||
if (RenderManager.IsCapturingActive && RenderManager.Instance.Configuration.RenderAudio)
|
||||
if (RenderManager.IsCapturingActive && RenderManager.Instance.Configuration.AudioConfig.RenderAudio)
|
||||
{
|
||||
RenderManager.Instance.AudioMixer?.RemoveSourceMapping(__instance);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user