Assembly: Bass.Net (in Bass.Net.dll) Version: 220.127.116.11
public override bool Start( ENCODEPROC proc, IntPtr user, bool paused )
Public Overrides Function Start ( proc As ENCODEPROC, user As IntPtr, paused As Boolean ) As Boolean
public: virtual bool Start( ENCODEPROC^ proc, IntPtr user, bool paused ) override
abstract Start : proc : ENCODEPROC * user : IntPtr * paused : bool -> bool override Start : proc : ENCODEPROC * user : IntPtr * paused : bool -> bool
- Type: Un4seen.Bass.AddOn.EncENCODEPROC
Optional callback function to receive the encoded data... = no callback.
- Type: SystemIntPtr
User instance data to pass to the callback function.
- Type: SystemBoolean
Start the encoder paused? If , you might use Pause(Boolean) to unpause (and really start the encoder).
Return ValueType: Boolean
Returns , if the encoder was successfully started - else is returned.
ImplementsIBaseEncoderStart(ENCODEPROC, IntPtr, Boolean)
If you have specified a file name for InputFile (instead of ), a default stream using BASS_StreamCreateFile(String, Int64, Int64, BASSFlag) will be created internally and all it's data will immediately be encoded (meaning the paused flag will have no effect).
The proc is only used, if you have set the WMA_UseNetwork property to and are encoding to STDOUT (OutputFile must be ). If in such case the proc is invoked you need to be aware of one special WMA case: When encoding begins, an initial header is given. When encoding is completed, an updated header is given (the initial header should be replaced by the updated one). The WMA header can be recognized by a negative 'length' parameter, whereas positive 'length' values will indicate plain WMA encoded data.
Internally, the sending of sample data to the encoder is implemented via a DSP callback on the channel. That means when you play the channel (or call BASS_ChannelGetData(Int32, IntPtr, Int32) if it's a decoding channel), the sample data will be sent to the encoder at the same time. So in contrast to the standard BASSwma implementation there is no need to manually feed (write) any sample data to the encoder.
If an encoder stops running prematurely, Stop should still be called to release resources that were allocated for the encoding. You might use the WMA_Notify property to get informed when this happens.