/// <summary> /// Sets up a new Sound based on an <see cref="XSound"/> asset. /// </summary> /// <param name="sound">The <see cref="XSound"/> asset to get the audio data from.</param> public Sound3D(XSound sound) : base(sound) { #region Sanity checks if (sound == null) { throw new ArgumentNullException(nameof(sound)); } #endregion _buffer3D = new SoundBuffer3D(SoundBuffer); }
public XSoundGroup(SharpDX.XAudio2.XAudio2 device, IEnumerable <string> fileNames, int groupId) { _device = device; _groupId = groupId; _sounds = new List <XSound>(); foreach (var fileName in fileNames) { var snd = new XSound(device, fileName, groupId); _sounds.Add(snd); } }
/// <summary> /// Sets up a new Sound based on an <see cref="XSound"/> asset. /// </summary> /// <param name="sound">The <see cref="XSound"/> asset to get the audio data from.</param> public Sound(XSound sound) { #region Sanity checks if (sound == null) { throw new ArgumentNullException(nameof(sound)); } #endregion Asset = sound; Asset.HoldReference(); }