tweak some presets and fix the long running overflow error with spectre... maybe
This commit is contained in:
1 parent
92234e9b73
commit
61c8e0208b
16 files changed
+1375
-1079
No files matched your search
@@ -50,14 +50,31 @@ public class AudioSource : MonoBehaviour {
|
||||
}
|
||||
|
||||
public void ToggleCaptureType() {
|
||||
bool isLoopback = CaptureType == WasapiCaptureType.Loopback;
|
||||
if (isLoopback) {
|
||||
CaptureType = WasapiCaptureType.Microphone;
|
||||
preferences.SetUseLoopback(false);
|
||||
if (CaptureType == WasapiCaptureType.Loopback) {
|
||||
UseMicrophone();
|
||||
} else {
|
||||
CaptureType = WasapiCaptureType.Loopback;
|
||||
preferences.SetUseLoopback(true);
|
||||
UseLoopback();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void UseMicrophone() {
|
||||
CaptureType = WasapiCaptureType.Microphone;
|
||||
preferences.SetUseLoopback(false);
|
||||
try {
|
||||
Initialise();
|
||||
} catch {
|
||||
Debug.Log("Microphone unavailable");
|
||||
// prevents the StopListen check from
|
||||
// running on a half initialised object
|
||||
_wasapiAudio = null;
|
||||
UseLoopback();
|
||||
}
|
||||
}
|
||||
|
||||
void UseLoopback() {
|
||||
CaptureType = WasapiCaptureType.Loopback;
|
||||
preferences.SetUseLoopback(true);
|
||||
Initialise();
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,9 @@ public class Display : MonoBehaviour
|
||||
{
|
||||
public void SetWindowed(bool v) {
|
||||
// Toggle fullscreen
|
||||
if (!Screen.fullScreen) {
|
||||
Screen.SetResolution(Screen.currentResolution.width, Screen.currentResolution.height, true);
|
||||
}
|
||||
Screen.fullScreen = !Screen.fullScreen;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user