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> /// <p>Creates a new <strong>XAudio2</strong> object and returns a reference to its <strong><see cref="SharpDX.XAudio2.XAudio2"/></strong> interface.</p> /// </summary> /// <param name="xAudio2Out">No documentation.</param> /// <param name="flags">No documentation.</param> /// <param name="xAudio2Processor">No documentation.</param> /// <returns><p>Returns <see cref="SharpDX.Result.Ok"/> if successful, an error code otherwise. See <strong>XAudio2 Error Codes</strong> for descriptions of XAudio2 specific error codes. </p></returns> /// <remarks> /// <p>The DirectX SDK versions of XAUDIO2 supported a flag <strong><see cref="SharpDX.XAudio2.XAudio2Flags.DebugEngine"/></strong> to select between the release and 'checked' version. This flag is not supported or defined in the Windows 8 version of XAUDIO2. </p><p><strong>Note</strong>??No versions of the DirectX SDK contain the xaudio2.lib import library. DirectX SDK versions use COM to create a new <strong>XAudio2</strong> object.</p> /// </remarks> /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='XAudio2Create']/*"/> /// <msdn-id>microsoft.directx_sdk.xaudio2.xaudio2create</msdn-id> /// <unmanaged>HRESULT XAudio2Create([Out, Fast] IXAudio2** ppXAudio2,[In] unsigned int Flags,[In] unsigned int XAudio2Processor)</unmanaged> /// <unmanaged-short>XAudio2Create</unmanaged-short> public static void XAudio2Create(SharpDX.XAudio2.XAudio2 xAudio2Out, int flags, int xAudio2Processor) { unsafe { IntPtr xAudio2Out_ = IntPtr.Zero; SharpDX.Result __result__; __result__ = XAudio2Create_(&xAudio2Out_, flags, xAudio2Processor); ((SharpDX.XAudio2.XAudio2)xAudio2Out).NativePointer = xAudio2Out_; __result__.CheckError(); } }
private void Dispose(bool disposing) { if (disposing) { if (this.InternalMasteringVoice != null) { this.InternalMasteringVoice.Dispose(); this.InternalMasteringVoice = null; } if (this.InternalDevice != null) { this.InternalDevice.Dispose(); this.InternalDevice = null; } } }
/// <summary> /// Initializes a new instance of the <see cref="Echo"/> class. /// </summary> public Echo(SharpDX.XAudio2.XAudio2 device) : base(device) { XAPOFx.CreateFX(device, XAPOFx.CLSID_FXEcho, this); }
/// <summary> /// Initializes a new instance of the <see cref="Reverb"/> class. /// </summary> public Reverb(SharpDX.XAudio2.XAudio2 device) : base(device) { XAPOFx.CreateFX(device, XAPOFx.CLSID_FXReverb, this); }
/// <summary> /// Initializes a new instance of the <see cref="Equalizer"/> class. /// </summary> public Equalizer(SharpDX.XAudio2.XAudio2 device) : base(device) { XAPOFx.CreateFX(device, XAPOFx.CLSID_FXEQ, this); }
static AudioDevice() { mEngine = new SharpDX.XAudio2.XAudio2(); mDevice = new SharpDX.XAudio2.MasteringVoice(mEngine); }
public void CreateDevice() { this.InternalDevice = new SharpDX.XAudio2.XAudio2(); this.InternalMasteringVoice = new SharpDX.XAudio2.MasteringVoice(this.InternalDevice); }
/// <summary> /// Initializes a new instance of the <see cref="MasteringLimiter"/> class. /// </summary> public MasteringLimiter(SharpDX.XAudio2.XAudio2 device) : base(device) { XAPOFx.CreateFX(device, XAPOFx.CLSID_FXMasteringLimiter, this); }
public AudioDevice() { audio = new SharpDX.XAudio2.XAudio2 (); audio.StartEngine (); }
public XSoundGroup(IList <XSound> sounds, int groupId) { _device = sounds.First().Device; _groupId = groupId; _sounds = sounds; }