BitmapViewSaveToMemory method |
|
Remarks
Creates a view (in form of memory bitmap referenced by a HBITMAP) of the waveform for the recorded sound: the view can represent the full sound's waveform or portions of it.
Before calling this method it's mandatory performing a previous sound's analysis through a call to the AnalyzeSoundFromFile or AnalyzeSoundFromFileRaw methods and waiting its completion through the WaveAnalysisDone event.
Syntax
[Visual Basic] Public Function BitmapViewSaveToMemory ( nStartPos as Int32, nEndPos as Int32, nBitmapWidth as Int32, nBitmapHeight as Int32, nWaveformType as enumWaveformTypes ) as IntPtr |
[C#] public IntPtr BitmapViewSaveToMemory ( Int32 nStartPos, Int32 nEndPos, Int32 nBitmapWidth, Int32 nBitmapHeight, enumWaveformTypes nWaveformType ); |
[C++] public: IntPtr BitmapViewSaveToMemory ( Int32 nStartPos, Int32 nEndPos, Int32 nBitmapWidth, Int32 nBitmapHeight, enumWaveformTypes nWaveformType ); |
Parameter |
Description |
||||||||||||
|
|
||||||||||||
nStartPos |
Number representing the sound's position, expressed in milliseconds, where the waveform visualization begins. The value 0 represents the sound's beginning. |
||||||||||||
nEndPos |
Number representing the sound's position, expressed in milliseconds, where the waveform visualization ends. The value -1 represents the sound's end. |
||||||||||||
nBitmapWidth |
Number representing the generated bitmap width, expressed in pixels. A value of -1 indicates no width constraints: in this case the control will generate a bitmap large enough in order to contain the full sound's waveform. |
||||||||||||
nBitmapHeight |
Number representing the generated bitmap height, expressed in pixels. |
||||||||||||
nWaveformType |
The type of rendered waveform, related to the sound's channels. Supported values are the following:
|
Return value
Value |
Meaning |
|
|
Negative value |
An error occurred (see the LastError property for further error details) |
enumWanErrorCodes.ERR_WAN_NOERROR (0) |
The method call was successful and the returned value represents the handle (HBITMAP) of the waveform's bitmap stored in memory. When the returned HBITMAP is no more needed or before exiting the container application, in order to avoid memory leaks this handle should be deleted using the DeleteObject Windows API. |