C# 클래스 HCS_Encoder.Inputs.Buffers.AudioBufferMono

상속: IEncoderBuffer
파일 보기 프로젝트 열기: i-e-b/HLS---Smooth-Encoder 1 사용 예제들

공개 메소드들

메소드 설명
AudioBufferMono ( int SampleRate, int Channels ) : System

Prepare an audio frame buffer. Sample rate and channels should match INCOMING signal (from capture device). Always outputs 44.1kHz 16 bit PCM mono audio.

HandleCapturedSamples ( object sender, AudioDataEventArgs e ) : void

Respond to capture event. This should return as fast as possible.

LoadToFrame ( MediaFrame &Frame ) : void

Load the buffer into a MediaFrame for the encoder. IMPORTANT: You must call UnloadFrame after this method is called. For effciency, unload as soon as possible.

RebufferCapturedFrames ( ) : void

Not yet implemented.

RegisterPlugin ( IAudioProcessor PlugIn ) : void
RegisterPlugin ( IVideoProcessor PlugIn ) : void
UnloadFrame ( MediaFrame &Frame ) : void

Release memory previously locked by LoadToFrame()

WipeBuffer ( ) : void

Emergency frame drop. Removes all waiting samples.

WipeBufferUntil ( double AbandonTime ) : void

비공개 메소드들

메소드 설명
MergeFirstSample ( ) : void

Join the first two samples together, making a large first sample. Resulting sample retains first sample's timecode.

PrependUnusedSamples ( MediaFrame Frame ) : void

Add unused samples back into the sample buffer.

Time stamps need to be properly re-integrated!

ResampleBuffer ( AudioDataEventArgs e, double sample_sec ) : short[]

Error based resampler. Only works for MONO.

ResampleStereo ( AudioDataEventArgs e, double sample_sec ) : short[]

Handles the more complex case of resampling interleaved stereo samples to mono

메소드 상세

AudioBufferMono() 공개 메소드

Prepare an audio frame buffer. Sample rate and channels should match INCOMING signal (from capture device). Always outputs 44.1kHz 16 bit PCM mono audio.
public AudioBufferMono ( int SampleRate, int Channels ) : System
SampleRate int
Channels int
리턴 System

HandleCapturedSamples() 공개 메소드

Respond to capture event. This should return as fast as possible.
public HandleCapturedSamples ( object sender, AudioDataEventArgs e ) : void
sender object
e AudioDataEventArgs
리턴 void

LoadToFrame() 공개 메소드

Load the buffer into a MediaFrame for the encoder. IMPORTANT: You must call UnloadFrame after this method is called. For effciency, unload as soon as possible.
public LoadToFrame ( MediaFrame &Frame ) : void
Frame MediaFrame
리턴 void

RebufferCapturedFrames() 공개 메소드

Not yet implemented.
public RebufferCapturedFrames ( ) : void
리턴 void

RegisterPlugin() 공개 메소드

public RegisterPlugin ( IAudioProcessor PlugIn ) : void
PlugIn IAudioProcessor
리턴 void

RegisterPlugin() 공개 메소드

public RegisterPlugin ( IVideoProcessor PlugIn ) : void
PlugIn IVideoProcessor
리턴 void

UnloadFrame() 공개 메소드

Release memory previously locked by LoadToFrame()
public UnloadFrame ( MediaFrame &Frame ) : void
Frame MediaFrame
리턴 void

WipeBuffer() 공개 메소드

Emergency frame drop. Removes all waiting samples.
public WipeBuffer ( ) : void
리턴 void

WipeBufferUntil() 공개 메소드

public WipeBufferUntil ( double AbandonTime ) : void
AbandonTime double
리턴 void