Skip to content

Commit

Permalink
fix: Minor changes based on review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
freezy committed Jan 16, 2025
1 parent c258871 commit 6f2428a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ private bool AllTargetsSupportLoopingSoundAssets()

protected void InfiniteLoopHelpBox(VisualElement container)
{
var soundAssetProp = serializedObject.FindProperty("_soundAsset");
var helpBox = new HelpBox("The assigned sound asset loops, but this component " +
"provides no mechanism to stop it or is not configured to do so. Either assign" +
" a sound asset that does not loop or (if possible) configure this component to" +
Expand Down
3 changes: 1 addition & 2 deletions VisualPinball.Unity/VisualPinball.Unity/Sound/SoundAsset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ private enum SelectionMethod

public void ConfigureAudioSource(AudioSource audioSource, float volume = 1)
{
audioSource.volume = Random.Range(_volumeRange.x, _volumeRange.y);
audioSource.volume *= volume;
audioSource.volume = volume * Random.Range(_volumeRange.x, _volumeRange.y);
audioSource.pitch = Random.Range(_pitchRange.x, _pitchRange.y);
audioSource.loop = _loop;
audioSource.clip = GetClip();
Expand Down

0 comments on commit 6f2428a

Please sign in to comment.