diff --git a/src/Audio/AudioDevice.cs b/src/Audio/AudioDevice.cs index 3a6a9f9e..2edfe3e4 100644 --- a/src/Audio/AudioDevice.cs +++ b/src/Audio/AudioDevice.cs @@ -30,7 +30,7 @@ namespace MoonWorks.Audio private readonly HashSet resources = new HashSet(); private readonly List autoUpdateStreamingSoundReferences = new List(); private readonly List autoFreeStaticSoundInstanceReferences = new List(); - private readonly List> soundQueueReferences = new List>(); + private readonly List> soundSequenceReferences = new List>(); private AudioTweenManager AudioTweenManager; @@ -185,15 +185,15 @@ namespace MoonWorks.Audio } } - for (var i = soundQueueReferences.Count - 1; i >= 0; i -= 1) + for (var i = soundSequenceReferences.Count - 1; i >= 0; i -= 1) { - if (soundQueueReferences[i].TryGetTarget(out var soundQueue)) + if (soundSequenceReferences[i].TryGetTarget(out var soundSequence)) { - soundQueue.Update(); + soundSequence.Update(); } else { - soundQueueReferences.RemoveAt(i); + soundSequenceReferences.RemoveAt(i); } } @@ -269,9 +269,9 @@ namespace MoonWorks.Audio autoFreeStaticSoundInstanceReferences.Add(instance); } - internal void AddSoundQueueReference(SoundQueue queue) + internal void AddSoundSequenceReference(SoundSequence sequence) { - soundQueueReferences.Add(new WeakReference(queue)); + soundSequenceReferences.Add(new WeakReference(sequence)); } protected virtual void Dispose(bool disposing) diff --git a/src/Audio/SoundQueue.cs b/src/Audio/SoundQueue.cs index 68e17de5..d098ecfa 100644 --- a/src/Audio/SoundQueue.cs +++ b/src/Audio/SoundQueue.cs @@ -2,8 +2,8 @@ using System; namespace MoonWorks.Audio { - // NOTE: all sounds played with a SoundQueue must have the same audio format! - public class SoundQueue : SoundInstance + // NOTE: all sounds played with a SoundSequence must have the same audio format! + public class SoundSequence : SoundInstance { public int NeedSoundThreshold = 0; public delegate void OnSoundNeededFunc(); @@ -11,14 +11,14 @@ namespace MoonWorks.Audio private object StateLock = new object(); - public SoundQueue(AudioDevice device, ushort formatTag, ushort bitsPerSample, ushort blockAlign, ushort channels, uint samplesPerSecond) : base(device, formatTag, bitsPerSample, blockAlign, channels, samplesPerSecond) + public SoundSequence(AudioDevice device, ushort formatTag, ushort bitsPerSample, ushort blockAlign, ushort channels, uint samplesPerSecond) : base(device, formatTag, bitsPerSample, blockAlign, channels, samplesPerSecond) { - device.AddSoundQueueReference(this); + device.AddSoundSequenceReference(this); } - public SoundQueue(AudioDevice device, StaticSound templateSound) : base(device, templateSound.FormatTag, templateSound.BitsPerSample, templateSound.BlockAlign, templateSound.Channels, templateSound.SamplesPerSecond) + public SoundSequence(AudioDevice device, StaticSound templateSound) : base(device, templateSound.FormatTag, templateSound.BitsPerSample, templateSound.BlockAlign, templateSound.Channels, templateSound.SamplesPerSecond) { - device.AddSoundQueueReference(this); + device.AddSoundSequenceReference(this); } public void Update()