uhh im pushing this before i update the FFmpeg builds

* fix audio crunch (hopefully) this time
This commit is contained in:
colorplease 2024-02-13 21:04:51 -08:00
parent d8ae96b928
commit 0db9789ef1
7 changed files with 461 additions and 42 deletions

View file

@ -118,7 +118,6 @@ public class AudioRenderer : MonoBehaviour
// for debugging only
Debug.Log("Finished saving to " + filename + ".");
}
result.State = Status.SUCCESS;
}
else

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -87,6 +87,6 @@ Material:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _ColorAlpha: {r: 1, g: 1, b: 1, a: 1}
- _ColorBravo: {r: 1, g: 1, b: 1, a: 1}
- _ColorDelta: {r: 0.03921569, g: 0.0627451, b: 0.2352941, a: 1}
- _ColorDelta: {r: 0.11764706, g: 0.11764706, b: 0.11764706, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
m_BuildTextureStacks: []

View file

@ -36316,7 +36316,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: 0, y: 91.30613}
m_AnchoredPosition: {x: 0, y: 91.30612}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 1}
--- !u!222 &1154875945
@ -49046,7 +49046,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 1150ae7143196054bba8378d288fc1c3, type: 3}
m_Name:
m_EditorClassIdentifier:
SAMPLE_RATE: 48000
SAMPLE_RATE: 44100
recorderBegin: 0
Rendering: 0
--- !u!1 &1700641149

View file

@ -26,6 +26,7 @@ public class HeavenRecorderController : MonoBehaviour
float endBeatRecorder;
float startBeatRecorder;
float prevStartBeat;
float prevVolume;
// Start is called before the first frame update
void Start()
{
@ -67,8 +68,8 @@ public class HeavenRecorderController : MonoBehaviour
_session.Close();
_session.Dispose();
_session = null;
File.Delete(pathHeavenRecorder + "temp.wav");
File.Delete(pathHeavenRecorder + "temp.mp4");
// File.Delete(pathHeavenRecorder + "temp.wav");
// File.Delete(pathHeavenRecorder + "temp.mp4");
}
public void GetUsablePath()
@ -138,7 +139,9 @@ public class HeavenRecorderController : MonoBehaviour
audioRenderer.SAMPLE_RATE = PersistentDataManager.gameSettings.sampleRate;
recorder.width = PersistentDataManager.gameSettings.resolutionWidth;
recorder.height = PersistentDataManager.gameSettings.resolutionHeight;
prevVolume = PersistentDataManager.gameSettings.masterVolume;
dialog.RecordingIndicator(true);
GlobalGameManager.ChangeMasterVolume(0.6f);
if(!recorder.enabled)
{
if(File.Exists(pathHeavenRecorder + "temp.wav"))
@ -174,6 +177,7 @@ public class HeavenRecorderController : MonoBehaviour
timeline.PlayCheck(true);
// Conductor.instance.SetBeat(prevStartBeat);
dialog.RecordingIndicator(false);
GlobalGameManager.ChangeMasterVolume(prevVolume);
}
}