C# 클래스 NAudio.Wave.DirectSoundOut

NativeDirectSoundOut using DirectSound COM interop. Contact author: Alexandre Mutel - alexandre_mutel at yahoo.fr Modified by: Graham "Gee" Plumb
상속: IWavePlayer
파일 보기 프로젝트 열기: jishi/Jishi.StreamToSonos 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
DSDEVID_DefaultCapture System.Guid
DSDEVID_DefaultPlayback System.Guid
DSDEVID_DefaultVoiceCapture System.Guid
DSDEVID_DefaultVoicePlayback System.Guid

공개 메소드들

메소드 설명
DirectSoundOut ( ) : System

Initializes a new instance of the DirectSoundOut class.

DirectSoundOut ( System.Guid device ) : System

Initializes a new instance of the DirectSoundOut class.

DirectSoundOut ( System.Guid device, int latency ) : System

Initializes a new instance of the DirectSoundOut class. (40ms seems to work under Vista).

DirectSoundOut ( int latency ) : System

Initializes a new instance of the DirectSoundOut class.

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

GetPosition ( ) : long

Gets the current position in bytes from the wave output device. (n.b. this is not the same thing as the position within your reader stream)

Init ( IWaveProvider waveProvider ) : void

Initialise playback

Pause ( ) : void

Pause Playback

Play ( ) : void

Begin playback

Stop ( ) : void

Stop playback

비공개 메소드들

메소드 설명
DirectSoundCreate ( System.Guid &GUID, [ directSound, IntPtr pUnkOuter ) : void
DirectSoundEnumerate ( DSEnumCallback lpDSEnumCallback, IntPtr lpContext ) : void
EnumCallback ( IntPtr lpGuid, IntPtr lpcstrDescription, IntPtr lpcstrModule, IntPtr lpContext ) : bool
Feed ( int bytesToCopy ) : int

Feeds the SecondaryBuffer with the WaveStream

GetDesktopWindow ( ) : IntPtr
InitializeDirectSound ( ) : void
IsBufferLost ( ) : bool

Determines whether the SecondaryBuffer is lost.

MsToBytes ( int ms ) : int

Convert ms to bytes size according to WaveFormat

PlaybackThreadFunc ( ) : void

Processes the samples in a separate thread.

RaisePlaybackStopped ( Exception e ) : void
StopPlayback ( ) : void

Stop playback

메소드 상세

DirectSoundOut() 공개 메소드

Initializes a new instance of the DirectSoundOut class.
public DirectSoundOut ( ) : System
리턴 System

DirectSoundOut() 공개 메소드

Initializes a new instance of the DirectSoundOut class.
public DirectSoundOut ( System.Guid device ) : System
device System.Guid
리턴 System

DirectSoundOut() 공개 메소드

Initializes a new instance of the DirectSoundOut class. (40ms seems to work under Vista).
public DirectSoundOut ( System.Guid device, int latency ) : System
device System.Guid Selected device
latency int The latency.
리턴 System

DirectSoundOut() 공개 메소드

Initializes a new instance of the DirectSoundOut class.
public DirectSoundOut ( int latency ) : System
latency int
리턴 System

Dispose() 공개 메소드

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
리턴 void

GetPosition() 공개 메소드

Gets the current position in bytes from the wave output device. (n.b. this is not the same thing as the position within your reader stream)
public GetPosition ( ) : long
리턴 long

Init() 공개 메소드

Initialise playback
public Init ( IWaveProvider waveProvider ) : void
waveProvider IWaveProvider The waveprovider to be played
리턴 void

Pause() 공개 메소드

Pause Playback
public Pause ( ) : void
리턴 void

Play() 공개 메소드

Begin playback
public Play ( ) : void
리턴 void

Stop() 공개 메소드

Stop playback
public Stop ( ) : void
리턴 void

프로퍼티 상세

DSDEVID_DefaultCapture 공개적으로 정적으로 프로퍼티

DirectSound default capture device GUID
public static Guid,System DSDEVID_DefaultCapture
리턴 System.Guid

DSDEVID_DefaultPlayback 공개적으로 정적으로 프로퍼티

DirectSound default playback device GUID
public static Guid,System DSDEVID_DefaultPlayback
리턴 System.Guid

DSDEVID_DefaultVoiceCapture 공개적으로 정적으로 프로퍼티

DirectSound default device for voice capture
public static Guid,System DSDEVID_DefaultVoiceCapture
리턴 System.Guid

DSDEVID_DefaultVoicePlayback 공개적으로 정적으로 프로퍼티

DirectSound default device for voice playback
public static Guid,System DSDEVID_DefaultVoicePlayback
리턴 System.Guid