Managing Waveform-Audio Recording

本文介绍如何使用Windows API管理波形音频的录制过程,包括如何准备数据块、启动及停止录制,并通过waveInAddBuffer等函数发送缓冲区到设备驱动程序。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >





 


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.



 



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值