Update Cryville.Audio.

This commit is contained in:
2023-03-30 10:37:08 +08:00
parent c685e634d5
commit 578e10bbd7
5 changed files with 815 additions and 395 deletions

View File

@@ -74,9 +74,6 @@ namespace Cryville.Crtr {
ffmpeg.RootPath = "";
#else
#error No FFmpeg search path.
#endif
#if UNITY_ANDROID
Cryville.Audio.OpenSL.OutputClient.CallbackFunction = audioCallback;
#endif
while (true) {
try {
@@ -147,13 +144,6 @@ namespace Cryville.Crtr {
Logger.Log("main", 1, "Game", "Initialized");
}
#if UNITY_ANDROID
[MonoPInvokeCallback(typeof(OpenSL.Native.slBufferQueueCallback))]
static void audioCallback(IntPtr caller, IntPtr context) {
Cryville.Audio.OpenSL.OutputClient.Callback(caller, context);
}
#endif
static bool _shutdown;
public static void Shutdown() {
if (_shutdown) return;
@@ -161,8 +151,8 @@ namespace Cryville.Crtr {
Logger.Log("main", 1, "Game", "Shutting down");
try {
AudioSequencer.Dispose();
AudioClient.Dispose();
AudioSequencer.Dispose();
AudioManager.Dispose();
}
catch (Exception ex) {