8#ifndef _NIM_TOOLS_SDK_CPP_AUDIO_H_
9#define _NIM_TOOLS_SDK_CPP_AUDIO_H_
36 static bool Init(
const std::wstring& user_data_parent_path,
const std::wstring& dll_path = L
"");
52 static bool PlayAudio(
const wchar_t* file_path,
const char* call_id,
const char* res_id,
nim_audio_type audio_format);
63 static bool PlayAudio(
const wchar_t* file_path,
const char* call_id,
const char* res_id,
nim_audio_type audio_format,
int seek);
119 const wchar_t* capture_device =
nullptr);
147 template <
typename F>
NIM 提供的语音录制和播放接口
Definition nim_audio_cpp.h:28
static HINSTANCE instance_audio_
Definition nim_audio_cpp.h:155
static bool RegStartCaptureCb(nim_rescode_cb cb)
Definition nim_audio_cpp.cpp:89
static bool Init(const std::wstring &user_data_parent_path, const std::wstring &dll_path=L"")
Definition nim_audio_cpp.cpp:39
static bool StopPlayAudio()
Definition nim_audio_cpp.cpp:74
static bool StartCapture(const char *call_id, const char *res_id, nim_audio_type audio_format=AAC, int volume=180, const wchar_t *capture_device=nullptr)
Definition nim_audio_cpp.cpp:104
static bool RegStartPlayCb(nim_rescode_id_cb cb)
Definition nim_audio_cpp.cpp:79
static bool RegEnumCaptureDeviceCb(nim_enum_capture_device_cb cb)
Definition nim_audio_cpp.cpp:123
static bool PlayAudio(const wchar_t *file_path, const char *call_id, const char *res_id, nim_audio_type audio_format)
Definition nim_audio_cpp.cpp:66
static void Cleanup()
Definition nim_audio_cpp.cpp:57
static bool StopCapture()
Definition nim_audio_cpp.cpp:113
static bool CancelAudio(const wchar_t *file_path)
Definition nim_audio_cpp.cpp:118
static bool RegStopPlayCb(nim_rescode_id_cb cb)
Definition nim_audio_cpp.cpp:84
static F Function(const char *function_name)
Definition nim_audio_cpp.h:148
static bool RegCancelAudioCb(nim_rescode_cb cb)
Definition nim_audio_cpp.cpp:99
static bool EnumCaptureDevice()
Definition nim_audio_cpp.cpp:128
static bool RegStopCaptureCb(nim_stop_capture_cb cb)
Definition nim_audio_cpp.cpp:94
NIM提供的语音播放工具
Definition nim_audio_cpp.cpp:10
NIM 提供的语音录制和播放工具接口的相关定义的头文件
void(* nim_stop_capture_cb)(int rescode, const char *call_id, const char *res_id, const char *file_path, const char *file_ext, long file_size, int audio_duration)
Definition nim_audio_def.h:74
void(* nim_rescode_cb)(int)
Definition nim_audio_def.h:47
void(* nim_rescode_id_cb)(int rescode, const char *file_path, const char *call_id, const char *res_id)
Definition nim_audio_def.h:56
void(* nim_enum_capture_device_cb)(int rescode, const wchar_t *device_list)
Definition nim_audio_def.h:87
nim_audio_type
Definition nim_audio_def.h:36
@ AAC
aac格式
Definition nim_audio_def.h:38