Checks if an encoder is running on a channel.
Namespace: Un4seen.Bass.AddOn.Enc
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax
[DllImportAttribute("bassenc")] public static BASSActive BASS_Encode_IsActive( int handle )
Parameters
- handle
- Type: SystemInt32
The encoder or channel handle... a HENCODE, HSTREAM, HMUSIC, or HRECORD.
Return Value
Type: BASSActiveThe return value is one of the folowing (see BASSActive):
BASS_ACTIVE_STOPPED | No encoder is running on the channel. |
BASS_ACTIVE_PLAYING | There is an encoder running on the channel. |
BASS_ACTIVE_PAUSED | There is an encoder running on the channel, but it is paused. |
Remarks
When checking if there's an encoder running on a channel, and there are multiple encoders on the channel, BASS_ACTIVE_PLAYING will be returned if any of them are active.
If an encoder stops running prematurely, BASS_Encode_Stop(Int32) should still be called to release resources that were allocated for the encoding.
Examples
private bool RecordingCallback(int channel, IntPtr buffer, int length, IntPtr user) { // continue recording if encoder is alive return ( BassEnc.BASS_Encode_IsActive(channel) != BASSActive.BASS_ACTIVE_STOPPED ); }
See Also