C# Class Gablarski.Client.ClientSourceHandler

Inheritance: IClientSourceHandler
显示文件 Open project: ermau/Gablarski Class Usage Examples

Public Methods

Method Description
BeginSending ( AudioSource source ) : void
CreateFake ( string name, AudioFormat format, short frameSize ) : AudioSource
EndSending ( AudioSource source ) : void
GetEnumerator ( ) : IEnumerator
GetIsIgnored ( AudioSource source ) : bool
Receive ( AudioSource source, byte audio ) : void
Request ( string name, AudioFormat format, short frameSize, int targetBitrate ) : void

Requests a source.

The server may not agree with the bitrate you request, do not set up audio based on this target, but on the bitrate of the source you actually receive.

Reset ( ) : void
SendAudioDataAsync ( AudioSource source, TargetType targetType, int targetIds, byte data ) : Task
ToggleIgnore ( AudioSource source ) : bool
ToggleMute ( AudioSource source ) : void
this ( int id ) : AudioSource
this ( IUserInfo user ) : IEnumerable

Protected Methods

Method Description
ClientSourceHandler ( IGablarskiClientContext context, IClientSourceManager manager ) : System
OnAudioSourceMuted ( AudioSourceMutedEventArgs e ) : void
OnAudioSourceStarted ( AudioSourceEventArgs e ) : void
OnAudioSourceStopped ( AudioSourceEventArgs e ) : void
OnReceivedAudio ( ReceivedAudioEventArgs e ) : void
OnReceivedSource ( ReceivedAudioSourceEventArgs e ) : void
OnReceivedSourceList ( ReceivedListEventArgs e ) : void
OnSourcesRemoved ( ReceivedListEventArgs e ) : void

Private Methods

Method Description
IEnumerable ( ) : IEnumerator
OnAudioSourceStateChangedMessage ( MessageEventArgs e ) : void
OnMutedMessage ( int sourceId, bool unmuted ) : void
OnServerAudioDataMessage ( MessageEventArgs e ) : void
OnSourceListReceivedMessage ( MessageEventArgs e ) : void
OnSourceMutedMessage ( MessageEventArgs e ) : void
OnSourceResultMessage ( MessageEventArgs e ) : void
OnSourcesRemovedMessage ( MessageEventArgs e ) : void

Method Details

BeginSending() public method

public BeginSending ( AudioSource source ) : void
source AudioSource
return void

ClientSourceHandler() protected method

protected ClientSourceHandler ( IGablarskiClientContext context, IClientSourceManager manager ) : System
context IGablarskiClientContext
manager IClientSourceManager
return System

CreateFake() public method

public CreateFake ( string name, AudioFormat format, short frameSize ) : AudioSource
name string
format AudioFormat
frameSize short
return AudioSource

EndSending() public method

public EndSending ( AudioSource source ) : void
source AudioSource
return void

GetEnumerator() public method

public GetEnumerator ( ) : IEnumerator
return IEnumerator

GetIsIgnored() public method

public GetIsIgnored ( AudioSource source ) : bool
source AudioSource
return bool

OnAudioSourceMuted() protected method

protected OnAudioSourceMuted ( AudioSourceMutedEventArgs e ) : void
e AudioSourceMutedEventArgs
return void

OnAudioSourceStarted() protected method

protected OnAudioSourceStarted ( AudioSourceEventArgs e ) : void
e Gablarski.Audio.AudioSourceEventArgs
return void

OnAudioSourceStopped() protected method

protected OnAudioSourceStopped ( AudioSourceEventArgs e ) : void
e Gablarski.Audio.AudioSourceEventArgs
return void

OnReceivedAudio() protected method

protected OnReceivedAudio ( ReceivedAudioEventArgs e ) : void
e Gablarski.Audio.ReceivedAudioEventArgs
return void

OnReceivedSource() protected method

protected OnReceivedSource ( ReceivedAudioSourceEventArgs e ) : void
e ReceivedAudioSourceEventArgs
return void

OnReceivedSourceList() protected method

protected OnReceivedSourceList ( ReceivedListEventArgs e ) : void
e ReceivedListEventArgs
return void

OnSourcesRemoved() protected method

protected OnSourcesRemoved ( ReceivedListEventArgs e ) : void
e ReceivedListEventArgs
return void

Receive() public method

public Receive ( AudioSource source, byte audio ) : void
source AudioSource
audio byte
return void

Request() public method

Requests a source.
The server may not agree with the bitrate you request, do not set up audio based on this target, but on the bitrate of the source you actually receive.
public Request ( string name, AudioFormat format, short frameSize, int targetBitrate ) : void
name string The user-local name of the source, used to identify the source later.
format AudioFormat
frameSize short
targetBitrate int The target bitrate to request.
return void

Reset() public method

public Reset ( ) : void
return void

SendAudioDataAsync() public method

public SendAudioDataAsync ( AudioSource source, TargetType targetType, int targetIds, byte data ) : Task
source AudioSource
targetType TargetType
targetIds int
data byte
return Task

ToggleIgnore() public method

public ToggleIgnore ( AudioSource source ) : bool
source AudioSource
return bool

ToggleMute() public method

public ToggleMute ( AudioSource source ) : void
source AudioSource
return void

this() public method

public this ( int id ) : AudioSource
id int
return AudioSource

this() public method

public this ( IUserInfo user ) : IEnumerable
user IUserInfo
return IEnumerable