Skip to content

Commit

Permalink
Fix audioparams for playglobal (#5437)
Browse files Browse the repository at this point in the history
  • Loading branch information
metalgearsloth authored Sep 12, 2024
1 parent 45b7500 commit f7287b1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Robust.Shared/Audio/Systems/SharedAudioSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ public TimeSpan GetAudioLength(string filename)
[return: NotNullIfNotNull("sound")]
public (EntityUid Entity, Components.AudioComponent Component)? PlayGlobal(SoundSpecifier? sound, Filter playerFilter, bool recordReplay, AudioParams? audioParams = null)
{
return sound == null ? null : PlayGlobal(GetSound(sound), playerFilter, recordReplay, sound.Params);
return sound == null ? null : PlayGlobal(GetSound(sound), playerFilter, recordReplay, audioParams ?? sound.Params);
}

/// <summary>
Expand All @@ -445,9 +445,9 @@ public TimeSpan GetAudioLength(string filename)
/// <param name="sound">The sound specifier that points the audio file(s) that should be played.</param>
/// <param name="recipient">The player that will hear the sound.</param>
[return: NotNullIfNotNull("sound")]
public (EntityUid Entity, Components.AudioComponent Component)? PlayGlobal(SoundSpecifier? sound, ICommonSession recipient)
public (EntityUid Entity, Components.AudioComponent Component)? PlayGlobal(SoundSpecifier? sound, ICommonSession recipient, AudioParams? audioParams = null)
{
return sound == null ? null : PlayGlobal(GetSound(sound), recipient, sound.Params);
return sound == null ? null : PlayGlobal(GetSound(sound), recipient, audioParams ?? sound.Params);
}

public abstract void LoadStream<T>(Entity<AudioComponent> entity, T stream);
Expand All @@ -468,7 +468,7 @@ public TimeSpan GetAudioLength(string filename)
[return: NotNullIfNotNull("sound")]
public (EntityUid Entity, Components.AudioComponent Component)? PlayGlobal(SoundSpecifier? sound, EntityUid recipient, AudioParams? audioParams = null)
{
return sound == null ? null : PlayGlobal(GetSound(sound), recipient, sound.Params);
return sound == null ? null : PlayGlobal(GetSound(sound), recipient, audioParams ?? sound.Params);
}

/// <summary>
Expand Down

0 comments on commit f7287b1

Please sign in to comment.