TpRecordInterface 类
V0.2.1TpExtUtils
2025-11-14
基础信息
| 头文件: | include <TpRecordInterface.h> |
|---|---|
| Cmake: | None |
| 发布版本: | V0.2.1 |
| 继承类: | |
| 派生类: |
Public 成员函数
| TpRecordInterface(const TpString &device="default") | ||
|---|---|---|
| ~TpRecordInterface() | ||
| openDevice() | 打开录音设备 | |
| closeDevice() | 关闭录音设备 | |
| isOpen() | 判断设备是否打开 | |
| recordStart(TpString &file, AudioType type=TP_RECORD_TYPE_WAV, AudioBitRate rate=TP_AUDIO_BITRATE_128K) | 录音开始 | |
| recordStart(const char *file, AudioType type=TP_RECORD_TYPE_WAV, AudioBitRate rate=TP_AUDIO_BITRATE_128K) | ||
| getStream(tpUInt8 *data) | ||
| recordContinue() | 继续录音 | |
| recordPause() | 暂停录音 | |
| recordStop() | 录音结束 |
成员函数说明
TpRecordInterface::TpRecordInterface(const TpString &device="default")
暂无注释...
TpRecordInterface::~TpRecordInterface()
暂无注释...
int TpRecordInterface::openDevice()
打开录音设备...
打开录音设备
返回值:
int TpRecordInterface::closeDevice()
关闭录音设备...
关闭录音设备
返回值:
tpBool TpRecordInterface::isOpen()
判断设备是否打开...
判断设备是否打开
返回值:
int TpRecordInterface::recordStart(TpString &file, AudioType type=TP_RECORD_TYPE_WAV, AudioBitRate rate=TP_AUDIO_BITRATE_128K)
录音开始...
录音开始
参数:file: 录音文件名及路径
参数:type: 要录制保存的文件类型
参数:rate: 码率/比特率
返回值:
int TpRecordInterface::recordStart(const char *file, AudioType type=TP_RECORD_TYPE_WAV, AudioBitRate rate=TP_AUDIO_BITRATE_128K)
暂无注释...
int TpRecordInterface::getStream(tpUInt8 *data)
暂无注释...
int TpRecordInterface::recordContinue()
继续录音...
继续录音
返回值:
int TpRecordInterface::recordPause()
暂停录音...
暂停录音
返回值:
int TpRecordInterface::recordStop()
录音结束...
录音结束
返回值:
