C# 클래스 SFML.Audio.SoundRecorder

SoundRecorder is an interface for capturing sound data, it is meant to be used as a base class
상속: SFML.System.ObjectBase
파일 보기 프로젝트 열기: SFML/SFML.Net

공개 메소드들

메소드 설명
GetDevice ( ) : string

Get the name of the current audio capture device

SetDevice ( string Name ) : bool

Set the audio capture device

SoundRecorder ( ) : System

Default constructor

Start ( ) : bool

Start the capture using the default sample rate (44100 Hz). Please note that only one capture can happen at the same time.

Start ( uint sampleRate ) : bool

Start the capture. The sampleRate parameter defines the number of audio samples captured per second. The higher, the better the quality (for example, 44100 samples/sec is CD quality). This function uses its own thread so that it doesn't block the rest of the program while the capture runs. Please note that only one capture can happen at the same time.

Stop ( ) : void

Stop the capture

ToString ( ) : string

Provide a string describing the object

보호된 메소드들

메소드 설명
Destroy ( bool disposing ) : void

Handle the destruction of the object

OnProcessSamples ( short samples ) : bool

Process a new chunk of recorded samples. This virtual function is called every time a new chunk of recorded data is available. The derived class can then do whatever it wants with it (storing it, playing it, sending it over the network, etc.).

OnStart ( ) : bool

Start capturing audio data. This virtual function may be overridden by a derived class if something has to be done every time a new capture starts. If not, this function can be ignored; the default implementation does nothing.

OnStop ( ) : void

Stop capturing audio data. This virtual function may be overridden by a derived class if something has to be done every time the capture ends. If not, this function can be ignored; the default implementation does nothing.

SetProcessingInterval ( Time interval ) : void

The processing interval controls the period between calls to the onProcessSamples function. You may want to use a small interval if you want to process the recorded data in real time, for example. Note: this is only a hint, the actual period may vary. So don't rely on this parameter to implement precise timing. The default processing interval is 100 ms.

비공개 메소드들

메소드 설명
ProcessSamples ( IntPtr samples, uint nbSamples, IntPtr userData ) : bool

Function called directly by the C library ; convert arguments and forward them to the internal virtual function

sfSoundRecorder_create ( StartCallback OnStart, ProcessCallback OnProcess, StopCallback OnStop, IntPtr UserData ) : IntPtr
sfSoundRecorder_destroy ( IntPtr SoundRecorder ) : void
sfSoundRecorder_getAvailableDevices ( uint &Count ) : IntPtr*
sfSoundRecorder_getChannelCount ( IntPtr SoundRecorder ) : uint
sfSoundRecorder_getDefaultDevice ( ) : IntPtr
sfSoundRecorder_getDevice ( IntPtr SoundRecorder ) : IntPtr
sfSoundRecorder_getSampleRate ( IntPtr SoundRecorder ) : uint
sfSoundRecorder_isAvailable ( ) : bool
sfSoundRecorder_setChannelCount ( IntPtr SoundRecorder, uint channelCount ) : void
sfSoundRecorder_setDevice ( IntPtr SoundRecorder, string Name ) : bool
sfSoundRecorder_setProcessingInterval ( IntPtr SoundRecorder, Time Interval ) : void
sfSoundRecorder_start ( IntPtr SoundRecorder, uint SampleRate ) : bool
sfSoundRecorder_stop ( IntPtr SoundRecorder ) : void

메소드 상세

Destroy() 보호된 메소드

Handle the destruction of the object
protected Destroy ( bool disposing ) : void
disposing bool Is the GC disposing the object, or is it an explicit call ?
리턴 void

GetDevice() 공개 메소드

Get the name of the current audio capture device
public GetDevice ( ) : string
리턴 string

OnProcessSamples() 보호된 추상적인 메소드

Process a new chunk of recorded samples. This virtual function is called every time a new chunk of recorded data is available. The derived class can then do whatever it wants with it (storing it, playing it, sending it over the network, etc.).
protected abstract OnProcessSamples ( short samples ) : bool
samples short Array of samples to process
리턴 bool

OnStart() 보호된 메소드

Start capturing audio data. This virtual function may be overridden by a derived class if something has to be done every time a new capture starts. If not, this function can be ignored; the default implementation does nothing.
protected OnStart ( ) : bool
리턴 bool

OnStop() 보호된 메소드

Stop capturing audio data. This virtual function may be overridden by a derived class if something has to be done every time the capture ends. If not, this function can be ignored; the default implementation does nothing.
protected OnStop ( ) : void
리턴 void

SetDevice() 공개 메소드

Set the audio capture device
public SetDevice ( string Name ) : bool
Name string The name of the audio capture device
리턴 bool

SetProcessingInterval() 보호된 메소드

The processing interval controls the period between calls to the onProcessSamples function. You may want to use a small interval if you want to process the recorded data in real time, for example. Note: this is only a hint, the actual period may vary. So don't rely on this parameter to implement precise timing. The default processing interval is 100 ms.
protected SetProcessingInterval ( Time interval ) : void
interval Time
리턴 void

SoundRecorder() 공개 메소드

Default constructor
public SoundRecorder ( ) : System
리턴 System

Start() 공개 메소드

Start the capture using the default sample rate (44100 Hz). Please note that only one capture can happen at the same time.
public Start ( ) : bool
리턴 bool

Start() 공개 메소드

Start the capture. The sampleRate parameter defines the number of audio samples captured per second. The higher, the better the quality (for example, 44100 samples/sec is CD quality). This function uses its own thread so that it doesn't block the rest of the program while the capture runs. Please note that only one capture can happen at the same time.
public Start ( uint sampleRate ) : bool
sampleRate uint Sound frequency; the more samples, the higher the quality (44100 by default = CD quality)
리턴 bool

Stop() 공개 메소드

Stop the capture
public Stop ( ) : void
리턴 void

ToString() 공개 메소드

Provide a string describing the object
public ToString ( ) : string
리턴 string