BASS.NET API for the Un4seen BASS Audio LibraryWaveFormRenderStartRecording Method (Int32, Single, Single)BASS.NET API for the Un4seen BASS Audio Library
Start a live recording rendering process for the specified stream handle (peak levels will not be scanned at this point).

Namespace: Un4seen.Bass.Misc
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.12.0
Syntax

public bool RenderStartRecording(
	int recordingStream,
	float initLength,
	float nextLength
)

Parameters

recordingStream
Type: SystemInt32
The HRECORD or HSTREAM stream for which to render the WaveForm (e.g. as returned by BASS_RecordStart(Int32, Int32, BASSFlag, RECORDPROC, IntPtr)).
initLength
Type: SystemSingle
The initial rendering buffer length in seconds (e.g. 10sec. - minimum is 1sec.).
nextLength
Type: SystemSingle
The next block in seconds when the recording buffer length needs to be increased (e.g. 5sec. - minimum is 1sec. or specify 0 to define a cycle buffer).

Return Value

Type: Boolean
, if live recording rendering was started successfully, else .
Remarks

The recordingStream handle might be any stream channel. Just make sure, that you DO NOT use the RenderRecording method overload (which takes no parameters) with a decoding stream.

When rendering a WaveForm for live recording the total length of the recording is unknown. Therefore a dynamic buffer is used internally which is initialized with a length of initLength seconds. When the buffer needs to be extended (e.g. the recording exceeds the initial length) it is incremented nextLength seconds. When you finally stop the live rendering recording with RenderStopRecording the total buffer size is at least initLength seconds big or a multiple of nextLength seconds.

Make sure you started recording via BASS_RecordStart(Int32, Int32, BASSFlag, RECORDPROC, IntPtr) before calling any live rendering recording method.

After live rendering recorded has been started you might call RenderRecording to actual render the recorded sample data.

When you specify 0 (zero) for the nextLength parameter a cycle buffer is created. Meaning the rendered WaveForm buffer size will only be initLength long. When the buffer is filled, it starts at the beginning again (position 0)- overwriting the oldest rendered data.

See Also

Reference