A game framework written with osu! in mind.

Add marker interface and move documentation

+24 -12
+17
osu.Framework/Audio/IHasAmplitudes.cs
···
··· 1 + // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. 2 + // See the LICENCE file in the repository root for full licence text. 3 + 4 + using osu.Framework.Audio.Track; 5 + 6 + namespace osu.Framework.Audio 7 + { 8 + public interface IHasAmplitudes 9 + { 10 + /// <summary> 11 + /// Current amplitude of stereo channels where 1 is full volume and 0 is silent. 12 + /// LeftChannel and RightChannel represent the maximum current amplitude of all of the left and right channels respectively. 13 + /// The most recent values are returned. Synchronisation between channels should not be expected. 14 + /// </summary> 15 + ChannelAmplitudes CurrentAmplitudes { get; } 16 + } 17 + }
+1 -1
osu.Framework/Audio/Sample/ISampleChannel.cs
··· 6 /// <summary> 7 /// A channel playing back an audio sample. 8 /// </summary> 9 - public interface ISampleChannel 10 { 11 /// <summary> 12 /// Start playback.
··· 6 /// <summary> 7 /// A channel playing back an audio sample. 8 /// </summary> 9 + public interface ISampleChannel : IHasAmplitudes 10 { 11 /// <summary> 12 /// Start playback.
-5
osu.Framework/Audio/Sample/SampleChannel.cs
··· 54 55 public override bool IsAlive => base.IsAlive && !Played; 56 57 - /// <summary> 58 - /// Current amplitude of stereo channels where 1 is full volume and 0 is silent. 59 - /// LeftChannel and RightChannel represent the maximum current amplitude of all of the left and right channels respectively. 60 - /// The most recent values are returned. Synchronisation between channels should not be expected. 61 - /// </summary> 62 public virtual ChannelAmplitudes CurrentAmplitudes { get; } = new ChannelAmplitudes(); 63 } 64 }
··· 54 55 public override bool IsAlive => base.IsAlive && !Played; 56 57 public virtual ChannelAmplitudes CurrentAmplitudes { get; } = new ChannelAmplitudes(); 58 } 59 }
+1 -1
osu.Framework/Audio/Track/ITrack.cs
··· 6 /// <summary> 7 /// An audio track. 8 /// </summary> 9 - public interface ITrack 10 { 11 /// <summary> 12 /// States if this track should repeat.
··· 6 /// <summary> 7 /// An audio track. 8 /// </summary> 9 + public interface ITrack : IHasAmplitudes 10 { 11 /// <summary> 12 /// States if this track should repeat.
-5
osu.Framework/Audio/Track/Track.cs
··· 112 113 public override bool HasCompleted => IsLoaded && !IsRunning && CurrentTime >= Length; 114 115 - /// <summary> 116 - /// Current amplitude of stereo channels where 1 is full volume and 0 is silent. 117 - /// LeftChannel and RightChannel represent the maximum current amplitude of all of the left and right channels respectively. 118 - /// The most recent values are returned. Synchronisation between channels should not be expected. 119 - /// </summary> 120 public virtual ChannelAmplitudes CurrentAmplitudes { get; } = new ChannelAmplitudes(); 121 122 protected override void UpdateState()
··· 112 113 public override bool HasCompleted => IsLoaded && !IsRunning && CurrentTime >= Length; 114 115 public virtual ChannelAmplitudes CurrentAmplitudes { get; } = new ChannelAmplitudes(); 116 117 protected override void UpdateState()
+3
osu.Framework/Graphics/Audio/DrawableSample.cs
··· 2 // See the LICENCE file in the repository root for full licence text. 3 4 using osu.Framework.Audio.Sample; 5 6 namespace osu.Framework.Graphics.Audio 7 { ··· 36 get => channel.Looping; 37 set => channel.Looping = value; 38 } 39 } 40 }
··· 2 // See the LICENCE file in the repository root for full licence text. 3 4 using osu.Framework.Audio.Sample; 5 + using osu.Framework.Audio.Track; 6 7 namespace osu.Framework.Graphics.Audio 8 { ··· 37 get => channel.Looping; 38 set => channel.Looping = value; 39 } 40 + 41 + public ChannelAmplitudes CurrentAmplitudes => channel.CurrentAmplitudes; 42 } 43 }
+2
osu.Framework/Graphics/Audio/DrawableTrack.cs
··· 56 public void Start() => track.Start(); 57 58 public void Stop() => track.Stop(); 59 } 60 }
··· 56 public void Start() => track.Start(); 57 58 public void Stop() => track.Stop(); 59 + 60 + public ChannelAmplitudes CurrentAmplitudes => track.CurrentAmplitudes; 61 } 62 }