BASS.NET API for the Un4seen BASS Audio Library

BassWmaBASS_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.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: 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

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