Sets a client connection notification callback on a network encoder.
Namespace: Un4seen.Bass.AddOn.Wma
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax
[DllImportAttribute("basswma")] public static bool BASS_WMA_EncodeSetNotify( int handle, CLIENTCONNECTPROC proc, IntPtr user )
Parameters
- handle
- Type: SystemInt32
The encoder handle. - proc
- Type: Un4seen.Bass.AddOn.WmaCLIENTCONNECTPROC
User defined notification function... = disable notifications. - user
- Type: SystemIntPtr
User instance data to pass to the callback function.
Return Value
Type: BooleanIf succesful, is returned, else is returned. Use BASS_ErrorGetCode to get the error code.
Remarks
ERROR CODE | Description |
---|---|
BASS_ERROR_HANDLE | handle is not valid. |
BASS_ERROR_NOTAVAIL | The encoder is not a network encoder, so no port is being used. |
Examples
private CLIENTCONNECTPROC _myClientConnectProc; ... // set the notification callback _myClientConnectProc = new CLIENTCONNECTPROC(MyClientConnectNotify); BassWma.BASS_WMA_EncodeSetNotify(encoder, _myClientConnectProc, IntPtr.Zero); ... // the recording callback private void MyClientConnectNotify(int handle, bool connect, string ip, IntPtr user) { if (connect) Console.Writeln( "Connected: {0} at {1}", ip, DateTime.Now ); else Console.Writeln( "Disconnected: {0} at {1}", ip, DateTime.Now ); }
See Also