Ejemplo n.º 1
0
        /// <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);
        }
Ejemplo n.º 2
0
 /// <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);
 }
Ejemplo n.º 3
0
 /// <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);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DirectSound"/> class.
 /// </summary>
 public DirectSound() : base(IntPtr.Zero)
 {
     DSound.Create8(null, this, null);
 }
Ejemplo n.º 5
0
 /// <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);
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:SharpDX.DirectSound.DirectSoundCapture" /> class.
 /// </summary>
 public DirectSoundCapture()
 {
     DSound.CaptureCreate8(null, this, null);
 }