BUG: WAVEHDR.dwBytesRecorded Set to Zero in Win32sID: Q147430
|
When you are using the Multimedia low-level Wave input functions in Win32s for recording purposes, the dwBytesRecorded member of the WAVEHDR structure is set to zero when you handle the MM_WIM_DATA message.
Win32s does not copy the dwBytesRecorded member as it should when handling the MM_WIM_DATA message.
You will have to call waveInUnprepareHeader() before you examine the
dwBytesRecorded member in the WAVEHDR structure when you are handling the
MM_WIM_DATA message. Then you will get the correct result.
Note that the dwBytesRecorded value will be non-zero when you handle the
MM_WIM_DATA message the second time or later. This non-zero value is still
incorrect as it corresponds to the value of the dwBytesRecored from the
previous attempt. Therefore, you should always call waveInUnprepareHeader()
to get the correct result from dwBytesRecorded member in the MM_WIM_DATA
message. This means you will need to call waveInPrepareHeader() again if
recording is continued and the buffer is sent back to the driver.
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
Additional query words: win32s winmm low level wave
Keywords : kbmm kbWin32s
Version : 1.30
Platform : WINDOWS
Issue type :
Last Reviewed: March 8, 1999