33
44namespace STS2RitsuLib . Audio
55{
6- /// <summary>Direct bus objects from FMOD Studio (parallel to strings in <see cref="FmodStudioRouting" />).</summary>
6+ /// <summary>
7+ /// Direct bus objects from FMOD Studio (parallel to strings in <see cref="FmodStudioRouting" />).
8+ /// </summary>
79 public static class FmodStudioBusAccess
810 {
911 private static readonly StringName GetVolume = new ( "get_volume" ) ;
1012 private static readonly StringName SetVolume = new ( "set_volume" ) ;
1113 private static readonly StringName SetMute = new ( "set_mute" ) ;
1214 private static readonly StringName SetPaused = new ( "set_paused" ) ;
1315
16+ /// <summary>
17+ /// Resolves a Studio bus object for <paramref name="busPath" />; null when the addon call fails.
18+ /// </summary>
1419 public static GodotObject ? TryGetBus ( string busPath )
1520 {
1621 return ! FmodStudioGateway . TryCall ( out var v , FmodStudioMethodNames . GetBus , busPath )
1722 ? null
1823 : v . AsGodotObject ( ) ;
1924 }
2025
26+ /// <summary>
27+ /// Reads linear volume for <paramref name="busPath" />; 0 when missing or on error.
28+ /// </summary>
2129 public static float TryGetVolume ( string busPath )
2230 {
2331 var bus = TryGetBus ( busPath ) ;
@@ -35,6 +43,9 @@ public static float TryGetVolume(string busPath)
3543 }
3644 }
3745
46+ /// <summary>
47+ /// Sets linear volume on the resolved bus.
48+ /// </summary>
3849 public static bool TrySetVolume ( string busPath , float linearVolume )
3950 {
4051 var bus = TryGetBus ( busPath ) ;
@@ -53,6 +64,9 @@ public static bool TrySetVolume(string busPath, float linearVolume)
5364 }
5465 }
5566
67+ /// <summary>
68+ /// Mutes or unmutes the bus.
69+ /// </summary>
5670 public static bool TrySetMute ( string busPath , bool muted )
5771 {
5872 var bus = TryGetBus ( busPath ) ;
@@ -71,6 +85,9 @@ public static bool TrySetMute(string busPath, bool muted)
7185 }
7286 }
7387
88+ /// <summary>
89+ /// Pauses or resumes the bus.
90+ /// </summary>
7491 public static bool TrySetPaused ( string busPath , bool paused )
7592 {
7693 var bus = TryGetBus ( busPath ) ;
0 commit comments