Apply AudioSource Playback Control To Voices

This commit is contained in:
copecone committed 2026-10-13 11:57:07 +09:00
1 parent cb0fd1bd96
commit 5055e4dfbb
3 files changed
+141 -6

No files matched your search

+7
View File
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Threading;
using ADOFAIRenderer.Util.Audio.Clip;
namespace ADOFAIRenderer.Util.Audio.Mixer;
@@ -64,6 +65,12 @@ internal sealed class Voice
internal bool Loop;
internal bool Finished;
/// <summary>
/// Playback has ended and the voice was released by the render thread. Readable from any thread;
/// the value can lag behind the render thread.
/// </summary>
public bool IsFinished => Volatile.Read(ref Finished);
/// <summary>Loop length in frames at the output sample rate (source duration * output rate).</summary>
internal double Period;