SHA256
Apply AudioSource Playback Control To Voices
This commit is contained in:
1 parent
cb0fd1bd96
commit
5055e4dfbb
3 files changed
+141
-6
No files matched your search
@@ -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;
|
||||
|
||||
|
||||
Reference in new issue
Block a user