Changes the reference count of a stream, MOD music or recording channel.
Namespace: Un4seen.Bass
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.18.0
Syntax
[DllImportAttribute("bass", CharSet = CharSet.Unicode)] public static bool BASS_ChannelRef( int handle, bool inc )
Parameters
- handle
- Type: SystemInt32
The channel handle... a HMUSIC, HSTREAM or HRECORD handle. - inc
- Type: SystemBoolean
Increment or decrement the reference count... = increment, u = decrement.
Return Value
Type: BooleanIf succesful, then is returned, else is returned. Use BASS_ErrorGetCode to get the error code.
Remarks
This can be useful when accessing the channel's memory (eg. tags) to ensure that it is not freed in the meantime by another thread. The reference count can be incremented and decremented by different threads.
| ERROR CODE | Description |
|---|---|
| BASS_ERROR_HANDLE | handle is not a valid channel. |
| BASS_ERROR_ALREADY | The channel already has a 0 reference count so cannot be decremented. |
| BASS_ERROR_FREEING | The channel's reference count cannot be incremented because it is being freed. |
See Also