Managing Waveform-Audio Recording

冯泓
2023-12-01





 


Managing Waveform-Audio Recording


After you open a waveform-audio input device, you can begin recording waveform-audio data. Waveform-audio data is recorded into application-supplied buffers specified by a WAVEHDR structure. These data blocks must be prepared before they are used; for more information, see Audio Data Blocks.


Windows provides the following functions to manage waveform-audio recording.



















FunctionDescription
waveInAddBufferSends a buffer to the device driver so it can be filled with recorded waveform-audio data.
waveInResetStops waveform-audio recording and marks all pending buffers as done.
waveInStartStarts waveform-audio recording.
waveInStopStops waveform-audio recording.


Use the waveInAddBuffer function to send buffers to the device driver. As the buffers are filled with recorded waveform-audio data, the application is notified with a window message, callback message, thread message, or event, depending on the flag specified when the device was opened.


Before you begin recording by using waveInStart, you should send at least one buffer to the driver, or incoming data could be lost.


Before closing the device using waveInClose, call waveInReset to mark any pending data blocks as being done.



 



 类似资料:

相关阅读

相关文章

相关问答