BASS.NET API for the Un4seen BASS Audio LibraryBassWmaBASS_WMA_EncodeSetNotify Method BASS.NET API for the Un4seen BASS Audio Library
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.12.0
Syntax

[DllImportAttribute("basswma.dll", CharSet = CharSet.Auto)]
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: Boolean
If succesful, is returned, else is returned. Use BASS_ErrorGetCode to get the error code.
Remarks

A previously set notification callback can be changed (or removed) at any time, by calling this function again.

ERROR CODEDescription
BASS_ERROR_HANDLEhandle is not valid.
BASS_ERROR_NOTAVAILThe encoder is not a network encoder, so no port is being used.

Examples

VB
Private _myClientConnectProc As CLIENTCONNECTPROC
...
' set the notification callback
_myClientConnectProc = New CLIENTCONNECTPROC(AddressOf MyClientConnectNotify)
BassWma.BASS_WMA_EncodeSetNotify(encoder, _myClientConnectProc, IntPtr.Zero)
...
' the recording callback
Private Sub MyClientConnectNotify(handle As Integer, connect As Boolean, ip As String, user As IntPtr)
  If connect Then
    Console.Writeln("Connected: {0} at {1}", ip, DateTime.Now)
  Else
    Console.Writeln("Disconnected: {0} at {1}", ip, DateTime.Now)
  End If
End Sub
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

Reference