Rename Stop to StopAnyPlaying for clarity

This commit is contained in:
Dean Herbert
2018-06-22 12:35:43 +09:00
parent 4b2b1f51f9
commit 73e13e2d63
4 changed files with 9 additions and 9 deletions

View File

@ -60,7 +60,7 @@ namespace osu.Game.Audio
}
/// <summary>
/// Stops the currently playing <see cref="PreviewTrack"/>.
/// Stops any currently playing <see cref="PreviewTrack"/>.
/// </summary>
/// <remarks>
/// Only the immediate owner (an object that implements <see cref="IPreviewTrackOwner"/>) of the playing <see cref="PreviewTrack"/>
@ -68,12 +68,12 @@ namespace osu.Game.Audio
/// can always stop the <see cref="PreviewTrack"/> themselves through <see cref="PreviewTrack.Stop()"/>.
/// </remarks>
/// <param name="source">The <see cref="IPreviewTrackOwner"/> which may be the owner of the <see cref="PreviewTrack"/>.</param>
public void Stop(IPreviewTrackOwner source)
public void StopAnyPlaying(IPreviewTrackOwner source)
{
if (current?.Owner != source)
if (current == null || current.Owner != source)
return;
current?.Stop();
current.Stop();
current = null;
}