/// <summary> /// Enumerates the DirectSound devices installed in the system. /// </summary> /// <returns>A collection of the devices found.</returns> public static List <DeviceInformation> GetDevices() { var callback = new EnumDelegateCallback(); DSound.EnumerateW(callback.NativePointer, IntPtr.Zero); return(callback.Informations); }
/// <summary> /// Initializes a new instance of the <see cref="T:SharpDX.DirectSound.FullDuplex" /> class. /// </summary> /// <param name="captureDevice" /> /// <param name="playbackDevice" /> /// <param name="captureDescription" /> /// <param name="bufferDescription" /> /// <param name="windowHandle" /> /// <param name="level" /> /// <param name="captureBuffer" /> /// <param name="secondaryBuffer" /> public FullDuplex(Guid captureDevice, Guid playbackDevice, CaptureBufferDescription captureDescription, SoundBufferDescription bufferDescription, IntPtr windowHandle, CooperativeLevel level, out CaptureBuffer captureBuffer, out SecondarySoundBuffer secondaryBuffer) { DSound.FullDuplexCreate(captureDevice, playbackDevice, captureDescription, bufferDescription, windowHandle, (int)level, this, out captureBuffer, out secondaryBuffer, null); }
/// <summary> /// Initializes a new instance of the <see cref="DirectSound"/> class. /// </summary> /// <param name="driverGuid">The driver GUID.</param> public DirectSound(Guid driverGuid) : base(IntPtr.Zero) { DSound.Create8(driverGuid, this, null); }
/// <summary> /// Initializes a new instance of the <see cref="DirectSound"/> class. /// </summary> public DirectSound() : base(IntPtr.Zero) { DSound.Create8(null, this, null); }
/// <summary> /// Initializes a new instance of the <see cref="T:SharpDX.DirectSound.DirectSoundCapture" /> class. /// </summary> /// <param name="device" /> /// <returns /> public DirectSoundCapture(Guid device) { DSound.CaptureCreate8(device, this, null); }
/// <summary> /// Initializes a new instance of the <see cref="T:SharpDX.DirectSound.DirectSoundCapture" /> class. /// </summary> public DirectSoundCapture() { DSound.CaptureCreate8(null, this, null); }