Starts encoding on a channel.
Namespace: Un4seen.Bass.AddOn.Enc
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax
public static int BASS_Encode_StartCAFile( int handle, int ftype, int atype, BASSEncode flags, int bitrate, string filename )
Parameters
- handle
- Type: SystemInt32
The channel handle... a HSTREAM, HMUSIC, or HRECORD. - ftype
- Type: SystemInt32
The file type to use. - atype
- Type: SystemInt32
The audio type to use. - flags
- Type: Un4seen.Bass.AddOn.EncBASSEncode
A combination of these flags (see BASSEncode):BASS_ENCODE_FP_8BIT, BASS_ENCODE_FP_16BIT, BASS_ENCODE_FP_24BIT, BASS_ENCODE_FP_32BIT When you want to encode a floating-point channel, but the encoder does not support 32-bit floating-point sample data, then you can use one of these flags to have the sample data converted to 8/16/24/32 bit integer data before it's passed on to the encoder. These flags are ignored if the channel's sample data isn't floating-point. BASS_ENCODE_FP_AUTO Convert floating-point sample data back to the channel's format (8/16 bit integer) if the data is only floating-point due to the BASS_CONFIG_FLOATDSP option being enabled. BASS_ENCODE_DITHER Apply dither (TPDF) when converting floating-point sample data to integer. BASS_ENCODE_QUEUE Queue data to feed the encoder asynchronously. This prevents the data source (DSP system or BASS_Encode_Write(Int32, IntPtr, Int32) call) getting blocked by the encoder, but if data is queud more quickly than the encoder can process it, that could result in lost data. BASS_ENCODE_LIMIT Limit the data rate to real-time speed, by introducing a delay when the rate is too high. With BASS 2.4.6 or above, this flag is ignored when the encoder is fed in a playback buffer update cycle (including BASS_Update(Int32) and BASS_ChannelUpdate(Int32, Int32) calls), to avoid possibly causing playback buffer underruns. Except for in those instances, this flag is applied automatically when the encoder is feeding a Shoutcast or Icecast server. BASS_ENCODE_CAST_NOLIMIT Don't limit the data rate (to real-time speed) when sending to a Shoutcast or Icecast server. BASS_ENCODE_PAUSE Start the encoder paused. BASS_ENCODE_MONO Convert to mono (if not already). BASS_ENCODE_AUTOFREE Automatically free the encoder when the source channel is freed. BASS_UNICODE cmdline is Unicode (16-bit characters) (not needed here, since the overloads already take care of it). - bitrate
- Type: SystemInt32
The bitrate to use (bits per second). - filename
- Type: SystemString
The target filename.
Return Value
Type: Int32The encoder process handle is returned if the encoder is successfully started, else 0 is returned.
See Also