@@ -5,6 +5,7 @@ namespace STS2RitsuLib.Audio
55{
66 /// <summary>
77 /// Tracks named channels and tagged playback groups for higher-level replacement and bulk stop semantics.
8+ /// 跟踪命名通道和带标签的播放组,用于更高层的替换和批量停止语义。
89 /// </summary>
910 public sealed class AudioChannelRegistry
1011 {
@@ -19,11 +20,13 @@ private AudioChannelRegistry()
1920
2021 /// <summary>
2122 /// Shared singleton registry.
23+ /// 共享的单例注册表。
2224 /// </summary>
2325 public static AudioChannelRegistry Shared { get ; } = new ( ) ;
2426
2527 /// <summary>
2628 /// Claims a named channel for a handle, optionally replacing the currently attached playback.
29+ /// 为句柄占用命名通道,并可选择替换当前附加的播放。
2730 /// </summary>
2831 public bool TryClaimChannel ( string channel , IAudioHandle handle , AudioChannelMode mode , bool allowFadeOut )
2932 {
@@ -52,6 +55,7 @@ public bool TryClaimChannel(string channel, IAudioHandle handle, AudioChannelMod
5255
5356 /// <summary>
5457 /// Removes a handle from any named channel it currently owns.
58+ /// 从句柄当前拥有的任何命名通道中移除该句柄。
5559 /// </summary>
5660 public void ReleaseChannel ( IAudioHandle handle )
5761 {
@@ -62,6 +66,7 @@ public void ReleaseChannel(IAudioHandle handle)
6266
6367 /// <summary>
6468 /// Attaches a handle to a tag group for later bulk stop operations.
69+ /// 将句柄附加到标签组,以便稍后执行批量停止操作。
6570 /// </summary>
6671 public void AttachTag ( string tag , IAudioHandle handle )
6772 {
@@ -71,6 +76,7 @@ public void AttachTag(string tag, IAudioHandle handle)
7176
7277 /// <summary>
7378 /// Removes a handle from all tracked channels and tag groups.
79+ /// 从所有已跟踪通道和标签组中移除句柄。
7480 /// </summary>
7581 public void Detach ( IAudioHandle handle )
7682 {
@@ -81,6 +87,7 @@ public void Detach(IAudioHandle handle)
8187
8288 /// <summary>
8389 /// Stops and releases every handle attached to a tag group.
90+ /// 停止并释放附加到标签组的每个句柄。
8491 /// </summary>
8592 public bool StopTag ( string tag , bool allowFadeOut = true )
8693 {
@@ -101,6 +108,7 @@ public bool StopTag(string tag, bool allowFadeOut = true)
101108
102109 /// <summary>
103110 /// Stops and releases the handle currently attached to a named channel.
111+ /// 停止并释放当前附加到命名通道的句柄。
104112 /// </summary>
105113 public bool StopChannel ( string channel , bool allowFadeOut = true )
106114 {
0 commit comments