#define WINVER 0x0500有什么意思?起什么作用?

WINVER>=0X500指Win2000以上。有些API或常数只有在Win2000以上才支持。

#pragma once #ifndef WINVER #define WINVER 0x0400 // Specifies that the minimum required platform is Windows 95 and Windows NT 4.0. #endif #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0500 // Specifies that the minimum required platform is Windows 2000 #endif #ifndef _WIN32_WINDOWS #define _WIN32_WINDOWS 0x0410 // Specifies that the minimum required platform is Windows 98 #endif #ifdef UNICODE #pragma comment(lib,"EasyXw.lib") #else #pragma comment(lib,"EasyXa.lib") #endif #ifndef __cplusplus #error EasyX is only for C++ #endif #include <windows.h> #include <tchar.h> // EasyX Window Properties #define EX_SHOWCONSOLE 1 // Maintain the console window when creating a graphics window #define EX_NOCLOSE 2 // Disable the close button #define EX_NOMINIMIZE 4 // Disable the minimize button #define EX_DBLCLKS 8 // Support double-click events // Color constant #define BLACK 0 #define BLUE 0xAA0000 #define GREEN 0x00AA00 #define CYAN 0xAAAA00 #define RED 0x0000AA #define MAGENTA 0xAA00AA #define BROWN 0x0055AA #define LIGHTGRAY 0xAAAAAA #define DARKGRAY 0x555555 #define LIGHTBLUE 0xFF5555 #define LIGHTGREEN 0x55FF55 #define LIGHTCYAN 0xFFFF55 #define LIGHTRED 0x5555FF #define LIGHTMAGENTA 0xFF55FF #define YELLOW 0x55FFFF #define WHITE 0xFFFFFF // Color conversion macro #define BGR(color) ( (((color) & 0xFF) << 16) | ((color) & 0xFF00FF00) | (((color) & 0xFF0000) >> 16) ) class IMAGE; // Line style class class LINESTYLE { public: LINESTYLE(); LINESTYLE(const LINESTYLE &style); LINESTYLE& operator = (const LINESTYLE &style); virtual ~LINESTYLE(); DWORD style; DWORD thickness; DWORD *puserstyle; DWORD userstylecount; }; // Fill style class class FILLSTYLE { public: FILLSTYLE(); FILLSTYLE(const FILLSTYLE &style); FILLSTYLE& operator = (const FILLSTYLE &style); virtual ~FILLSTYLE(); int style; // Fill style long hatch; // Hatch pattern IMAGE* ppattern; // Fill image }; // Image class class IMAGE { public: int getwidth() const; // Get the width of the image int getheight() const; // Get the height of the image private: int width, height; // Width and height of the image HBITMAP m_hBmp; HDC m_hMemDC; float m_data[6]; COLORREF m_LineColor; // Current line color COLORREF m_FillColor; // Current fill color COLORREF m_TextColor; // Current text color COLORREF m_BkColor; // Current background color DWORD* m_pBuffer; // Memory buffer of the image LINESTYLE m_LineStyle; // Current line style FILLSTYLE m_FillStyle; // Current fill style virtual void SetDefault(); // Set the graphics environment as default public: IMAGE(int _width = 0, int _height = 0); IMAGE(const IMAGE &img); IMAGE& operator = (const IMAGE &img); virtual ~IMAGE(); virtual void Resize(int _width, int _height); // Resize image }; // Graphics window related functions HWND initgraph(int width, int height, int flag = 0); // Create graphics window void closegraph(); // Close graphics window // Graphics environment related functions void cleardevice(); // Clear device void setcliprgn(HRGN hrgn); // Set clip region void clearcliprgn(); // Clear clip region void getlinestyle(LINESTYLE* pstyle); // Get line style void setlinestyle(const LINESTYLE* pstyle); // Set line style void setlinestyle(int style, int thickness = 1, const DWORD *puserstyle = NULL, DWORD userstylecount = 0); // Set line style void getfillstyle(FILLSTYLE* pstyle); // Get fill style void setfillstyle(const FILLSTYLE* pstyle); // Set fill style void setfillstyle(int style, long hatch = NULL, IMAGE* ppattern = NULL); // Set fill style void setfillstyle(BYTE* ppattern8x8); // Set fill style void setorigin(int x, int y); // Set coordinate origin void getaspectratio(float *pxasp, float *pyasp); // Get aspect ratio void setaspectratio(float xasp, float yasp); // Set aspect ratio int getrop2(); // Get binary raster operation mode void setrop2(int mode); // Set binary raster operation mode int getpolyfillmode(); // Get polygon fill mode void setpolyfillmode(int mode); // Set polygon fill mode void graphdefaults(); // Reset the graphics environment as default COLORREF getlinecolor(); // Get line color void setlinecolor(COLORREF color); // Set line color COLORREF gettextcolor(); // Get text color void settextcolor(COLORREF color); // Set text color COLORREF getfillcolor(); // Get fill color void setfillcolor(COLORREF color); // Set fill color COLORREF getbkcolor(); // Get background color void setbkcolor(COLORREF color); // Set background color int getbkmode(); // Get background mode void setbkmode(int mode); // Set background mode // Color model transformation related functions COLORREF RGBtoGRAY(COLORREF rgb); void RGBtoHSL(COLORREF rgb, float *H, float *S, float *L); void RGBtoHSV(COLORREF rgb, float *H, float *S, float *V); COLORREF HSLtoRGB(float H, float S, float L); COLORREF HSVtoRGB(float H, float S, float V); // Drawing related functions COLORREF getpixel(int x, int y); // Get pixel color void putpixel(int x, int y, COLORREF color); // Set pixel color void line(int x1, int y1, int x2, int y2); // Draw a line void rectangle (int left, int top, int right, int bottom); // Draw a rectangle without filling void fillrectangle (int left, int top, int right, int bottom); // Draw a filled rectangle with a border void solidrectangle(int left, int top, int right, int bottom); // Draw a filled rectangle without a border void clearrectangle(int left, int top, int right, int bottom); // Clear a rectangular region void circle (int x, int y, int radius); // Draw a circle without filling void fillcircle (int x, int y, int radius); // Draw a filled circle with a border void solidcircle(int x, int y, int radius); // Draw a filled circle without a border void clearcircle(int x, int y, int radius); // Clear a circular region void ellipse (int left, int top, int right, int bottom); // Draw an ellipse without filling void fillellipse (int left, int top, int right, int bottom); // Draw a filled ellipse with a border void solidellipse(int left, int top, int right, int bottom); // Draw a filled ellipse without a border void clearellipse(int left, int top, int right, int bottom); // Clear an elliptical region void roundrect (int left, int top, int right, int bottom, int ellipsewidth, int ellipseheight); // Draw a rounded rectangle without filling void fillroundrect (int left, int top, int right, int bottom, int ellipsewidth, int ellipseheight); // Draw a filled rounded rectangle with a border void solidroundrect(int left, int top, int right, int bottom, int ellipsewidth, int ellipseheight); // Draw a filled rounded rectangle without a border void clearroundrect(int left, int top, int right, int bottom, int ellipsewidth, int ellipseheight); // Clear a rounded rectangular region void arc (int left, int top, int right, int bottom, double stangle, double endangle); // Draw an arc void pie (int left, int top, int right, int bottom, double stangle, double endangle); // Draw a sector without filling void fillpie (int left, int top, int right, int bottom, double stangle, double endangle); // Draw a filled sector with a border void solidpie(int left, int top, int right, int bottom, double stangle, double endangle); // Draw a filled sector without a border void clearpie(int left, int top, int right, int bottom, double stangle, double endangle); // Clear a rounded rectangular region void polyline (const POINT *points, int num); // Draw multiple consecutive lines void polygon (const POINT *points, int num); // Draw a polygon without filling void fillpolygon (const POINT *points, int num); // Draw a filled polygon with a border void solidpolygon(const POINT *points, int num); // Draw a filled polygon without a border void clearpolygon(const POINT *points, int num); // Clear a polygon region void polybezier(const POINT *points, int num); // Draw three square Bezier curves void floodfill(int x, int y, COLORREF color, int filltype = FLOODFILLBORDER); // Fill the area // Text related functions void outtextxy(int x, int y, LPCTSTR str); // Output a string at the specified location void outtextxy(int x, int y, TCHAR c); // Output a char at the specified location int textwidth(LPCTSTR str); // Get the width of a string int textwidth(TCHAR c); // Get the width of a char int textheight(LPCTSTR str); // Get the height of a string int textheight(TCHAR c); // Get the height of a char int drawtext(LPCTSTR str, RECT* pRect, UINT uFormat); // Output a string in the specified format within the specified area. int drawtext(TCHAR c, RECT* pRect, UINT uFormat); // Output a char in the specified format within the specified area. // Set current text style. // nHeight: The height of the text // nWidth: The average width of the character. If 0, the scale is adaptive. // lpszFace: The font name // nEscapement: The writing angle of the string, 0.1 degrees, defaults to 0. // nOrientation: The writing angle of each character, 0.1 degrees, defaults to 0. // nWeight: The stroke weight of the character // bItalic: Specify whether the font is italic // bUnderline: Specify whether the font is underlined // bStrikeOut: Specify whether the font has a strikeout // fbCharSet: Specifies the character set // fbOutPrecision: Specifies the output accuracy of the text // fbClipPrecision: Specifies the clip accuracy of the text // fbQuality: Specifies the output quality of the text // fbPitchAndFamily: Specifies a font family that describes a font in a general way void settextstyle(int nHeight, int nWidth, LPCTSTR lpszFace); void settextstyle(int nHeight, int nWidth, LPCTSTR lpszFace, int nEscapement, int nOrientation, int nWeight, bool bItalic, bool bUnderline, bool bStrikeOut); void settextstyle(int nHeight, int nWidth, LPCTSTR lpszFace, int nEscapement, int nOrientation, int nWeight, bool bItalic, bool bUnderline, bool bStrikeOut, BYTE fbCharSet, BYTE fbOutPrecision, BYTE fbClipPrecision, BYTE fbQuality, BYTE fbPitchAndFamily); void settextstyle(const LOGFONT *font); // Set current text style void gettextstyle(LOGFONT *font); // Get current text style // Image related functions void loadimage(IMAGE *pDstImg, LPCTSTR pImgFile, int nWidth = 0, int nHeight = 0, bool bResize = false); // Load image from a file (bmp/gif/jpg/png/tif/emf/wmf/ico) void loadimage(IMAGE *pDstImg, LPCTSTR pResType, LPCTSTR pResName, int nWidth = 0, int nHeight = 0, bool bResize = false); // Load image from resources (bmp/gif/jpg/png/tif/emf/wmf/ico) void saveimage(LPCTSTR pImgFile, IMAGE* pImg = NULL); // Save image to a file (bmp/gif/jpg/png/tif) void getimage(IMAGE *pDstImg, int srcX, int srcY, int srcWidth, int srcHeight); // Get image from device void putimage(int dstX, int dstY, const IMAGE *pSrcImg, DWORD dwRop = SRCCOPY); // Put image to device void putimage(int dstX, int dstY, int dstWidth, int dstHeight, const IMAGE *pSrcImg, int srcX, int srcY, DWORD dwRop = SRCCOPY); // Put image to device void rotateimage(IMAGE *dstimg, IMAGE *srcimg, double radian, COLORREF bkcolor = BLACK, bool autosize = false, bool highquality = true);// Rotate image void Resize(IMAGE* pImg, int width, int height); // Resize the device DWORD* GetImageBuffer(IMAGE* pImg = NULL); // Get the display buffer of the graphics device IMAGE* GetWorkingImage(); // Get current graphics device void SetWorkingImage(IMAGE* pImg = NULL); // Set current graphics device HDC GetImageHDC(IMAGE* pImg = NULL); // Get the graphics device handle // Other functions int getwidth(); // Get the width of current graphics device int getheight(); // Get the height of current graphics device void BeginBatchDraw(); // Begin batch drawing mode void FlushBatchDraw(); // Refreshes the undisplayed drawing void FlushBatchDraw(int left, int top, int right, int bottom); // Refreshes the undisplayed drawing void EndBatchDraw(); // End batch drawing mode and refreshes the undisplayed drawing void EndBatchDraw(int left, int top, int right, int bottom); // End batch drawing mode and refreshes the undisplayed drawing HWND GetHWnd(); // Get the handle of the graphics window const TCHAR* GetEasyXVer(); // Get version of EasyX library // Get user input as a dialog box bool InputBox(LPTSTR pString, int nMaxCount, LPCTSTR pPrompt = NULL, LPCTSTR pTitle = NULL, LPCTSTR pDefault = NULL, int width = 0, int height = 0, bool bOnlyOK = true); // Message // // Category Type Description // // EX_MOUSE WM_MOUSEMOVE Mouse moves // WM_MOUSEWHEEL Mouse wheel is rotated // WM_LBUTTONDOWN Left mouse button is pressed // WM_LBUTTONUP Left mouse button is released // WM_LBUTTONDBLCLK Left mouse button is double-clicked // WM_MBUTTONDOWN Middle mouse button is pressed // WM_MBUTTONUP Middle mouse button is released // WM_MBUTTONDBLCLK Middle mouse button is double-clicked // WM_RBUTTONDOWN Right mouse button is pressed // WM_RBUTTONUP Right mouse button is released // WM_RBUTTONDBLCLK Right mouse button is double-clicked // // EX_KEY WM_KEYDOWN A key is pressed // WM_KEYUP A key is released // // EX_CHAR WM_CHAR // // EX_WINDOW WM_ACTIVATE The window is activated or deactivated // WM_MOVE The window has been moved // WM_SIZE The size of window has changed // Message Category #define EX_MOUSE 1 #define EX_KEY 2 #define EX_CHAR 4 #define EX_WINDOW 8 // Message Structure struct ExMessage { USHORT message; // The message identifier union { // Data of the mouse message struct { bool ctrl :1; // Indicates whether the CTRL key is pressed bool shift :1; // Indicates whether the SHIFT key is pressed bool lbutton :1; // Indicates whether the left mouse button is pressed bool mbutton :1; // Indicates whether the middle mouse button is pressed bool rbutton :1; // Indicates whether the right mouse button is pressed short x; // The x-coordinate of the cursor short y; // The y-coordinate of the cursor short wheel; // The distance the wheel is rotated, expressed in multiples or divisions of 120 }; // Data of the key message struct { BYTE vkcode; // The virtual-key code of the key BYTE scancode; // The scan code of the key. The value depends on the OEM bool extended :1; // Indicates whether the key is an extended key, such as a function key or a key on the numeric keypad. The value is true if the key is an extended key; otherwise, it is false. bool prevdown :1; // Indicates whether the key is previously up or down }; // Data of the char message TCHAR ch; // Data of the window message struct { WPARAM wParam; LPARAM lParam; }; }; }; // Message Function ExMessage getmessage(BYTE filter = -1); // Get a message until a message is available for retrieval void getmessage(ExMessage *msg, BYTE filter = -1); // Get a message until a message is available for retrieval bool peekmessage(ExMessage *msg, BYTE filter = -1, bool removemsg = true); // Get a message if any exist, otherwise return false void flushmessage(BYTE filter = -1); // Flush the message buffer 把这个代码用C++重新编写easyx.h,并适当添加中文注释,能和前面的代码兼容
06-08
将以下代码转vb6.0 #ifndef __ECS_INCLUDE__ #define __ECS_INCLUDE__ #ifndef WINVER #define WINVER 0x0501 #endif #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0501 #endif #include <windows.h> #define ECS_VERSION "1.1" #define ECS_VERSION_MAJOR (1) #define ECS_VERSION_MINOR (0) #define ECS_VERSION_PATCH (0) #ifdef __cplusplus extern "C" { #endif #ifndef WIN32 #define ECSSDKLIBAPI #else #define ECSSDKLIBAPI WINAPI #endif typedef enum ENUM_ECS_VOICE_CODER { VOICE_PCM = 0, VOICE_ALAW = 1, VOICE_MP3 = 2, VOICE_ULAW = 3, }ECS_VOICE_CODER; enum PHONE_STATE { BT_CONNECT = 0, //蓝牙连接 BT_DISCONNECT = 1, //蓝牙断开连接 PHONE_CALLOUT = 2, // 电话呼出 PHONE_CALLIN = 3, //电话呼入 PHONE_RING = 4, //电话振铃 PHONE_HANGUP = 5, //电话挂断 PHONE_ACTIVE = 6, //电话通话中 PHONE_NUMBER = 7, //电话号码 MEDIA_VOLUME = 8, //多媒体播放音量 param2: 为音量值 TALK_VOLUME = 9, //通话音量 param2: 为音量值 VOICE_MEDIA_CHANGE = 10, //语音通道切换 pram2=255, 断开语音通道,切换到手机;param2=其它值 切换蓝牙设备里 }; typedef enum ENUM_ECS_EVENT { EVENT_NEW_LINE_CONNECTED = 1, //检测到设备连接, EVENT_DEVICE_DISCONNECTED = 2, //检测到设备断开连接, EVENT_PHONE_STATUS = 3, //设备状态,param1的值 参考PHONE_STATE EVENT_ONLINE_UPGRADE = 4, //在线升级事件, param1的值参考ENUM_ECS_UPDATE_STATUS EVENT_PLAY_END = 5, // EVENT_RECORD_INFO = 6, //录音信息 data1: 录音原始数据大小(字节), data2: 录音时长(单位秒),szData3:录音文件名, data4: 录音文件实际大小(字节) //mp3格式的录音文件, 1秒2K字节。 EVENT_PLAY_ERROR = 7, EVENT_RECORD_VOICE = 8, }ECS_EVENT; typedef enum ENUM_ECS_UPDATE_STATUS { UPDATE_CHECK_PACKET_ERR = 1, UPDATE_CHECK_HEAD_ERR = 2, UPDATE_ONLINING = 3, //正在升级 UPDATE_SUCCESS = 4, UPDATE_CRC_ERR = 5, UPDATE_FAILED = 6, UPDATE_NET_FILE_FAILED = 7, UPDATE_SYS_FAILED = 8, UPDATE_WRITE_FILE_FAILED = 9, } ECS_UPDATE_STATUS; typedef enum ENUM_ECS_ERROR_CODE { ECS_SUCCESS = 0, //操作成功 ECS_ERR_SYSTEM = -1, //系统错误 ECS_ERR_NO_DEVICE = -2, //没有这个设备 ECS_ERR_INVALID_INSTANCE = -3, //instance错误 ECS_ERR_CALL = -4, //输入参数错误 ECS_ERR_WITH_EXCEPTION = -5, //发生异常 ECS_ERR_INVALID_CODER = -6, //不支持的语音编码 ECS_ERR_CANNOT_CREATE_DIR = -7, //未能创建录音目录。 ECS_ERR_CANNOT_CREATE_FILE = -8, //未能创建录音文件 ECS_ERR_MULTIPLE_RECORD = -9, //正在录音中,未停止录音,再次调用录音失败。 ECS_ERR_USING = -10, //不支持该功能,错误使用 ECS_ERR_OPEN_FILE = -11, //打开文件失败 }ECS_ERROR_CODE; typedef enum ENUM_ECS_DEVICE_MODEL { USB_EBT = 1, }ECS_DEVICE_MODEL; typedef enum ENUM_ECS_VOICE_DIRECTION //语音方向 { LOCAL_PORT_VOICE = 1, FAR_PORT_VOICE = 2, TWO_WAY_VOICE = 3, }ECS_VOICE_DIRECTION; //事件回调函数 typedef void (CALLBACK* eCsEventCallBack)( unsigned long eventId //事件Id , int instance ////事例ID , unsigned long data1 // , unsigned long data2 , char* szData3 , unsigned long data4 ); typedef struct __AEC_CONFIG { unsigned char mic_again; //DAC增益,default:31(0~31) unsigned char dac_again; //MIC增益,default:20(0~31) unsigned char aec_mode; //AEC模式,AEC_EN:BIT(0) NLP_EN:BIT(1) NS_EN:BIT(2) AGC_EN:BIT(4) DNS_EN:BIT(5) unsigned char ul_eq_en; //上行EQ使能,default:enable(disable(0), enable(1)) /*AGC*/ float ndt_fade_in; //单端讲话淡入步进default: 1.3f(0.1 ~ 5 dB) float ndt_fade_out; //单端讲话淡出步进default: 0.7f(0.1 ~ 5 dB) float dt_fade_in; //双端讲话淡入步进default: 1.3f(0.1 ~ 5 dB) float dt_fade_out; //双端讲话淡出步进default: 0.7f(0.1 ~ 5 dB) float ndt_max_gain; //单端讲话放大上限,default: 12.f(0 ~ 24 dB) float ndt_min_gain; //单端讲话放大下限,default: 0.f(-20 ~ 24 dB) float ndt_speech_thr; //单端讲话放大阈值,default: -50.f(-70 ~ -40 dB) float dt_max_gain; //双端讲话放大上限,default: 12.f(0 ~ 24 dB) float dt_min_gain; //双端讲话放大下限,default: 0.f(-20 ~ 24 dB) float dt_speech_thr; //双端讲话放大阈值,default: -40.f(-70 ~ -40 dB) float echo_present_thr; //单端双端讲话阈值,default:-70.f(-70 ~ -40 dB) /*AEC*/ float aec_dt_aggress; //原音回音追踪等级, default: 1.0f(1 ~ 5) float aec_refengthr; //进入回音消除参考值, default: -70.0f(-90 ~ -60 dB) /*NLP*/ float nlp_aggress_factor;//回音前级动态压制,越小越强,default: -3.0f(-1 ~ -5) float nlp_min_suppress; //回音后级静态压制,越大越强,default: 4.f(0 ~ 10) /*ANS*/ float ans_aggress; //噪声前级动态压制,越大越强default: 1.25f(1 ~ 2) float ans_suppress; //噪声后级静态压制,越小越强default: 0.04f(0 ~ 1) /*DNS*/ float dns_gain_floor; //增益最小值控制, 越小降噪越强, default: 0.1f(0 ~ 1.0) float dns_over_drive; //降噪强度, 越大降噪越强, default: 1.0f(0 ~ 6.0) unsigned char output_way; unsigned char dst_delay; unsigned char hw_delay_offset; unsigned char mic_volume; } AEC_CONFIG; int ECSSDKLIBAPI ecsInit(int nType, eCsEventCallBack cb); void ECSSDKLIBAPI ecsExit(void); const char* ECSSDKLIBAPI ecsGetLibVersion(); const char* ECSSDKLIBAPI ecsGetDevVersion(int instance); int ECSSDKLIBAPI ecsStartRecordFile(int instance, int coder, const char* filename); int ECSSDKLIBAPI ecsStartRecordVoice(int instance, int direction, int coder); int ECSSDKLIBAPI ecsStopRecord(int instance); int ECSSDKLIBAPI ecsPlayFile(int instance, const char* filename, int position); int ECSSDKLIBAPI ecsStopPlay(int instance); int ECSSDKLIBAPI ecsPausePlay(int instance); int ECSSDKLIBAPI ecsSeekPlayFile(int instance, int position); int ECSSDKLIBAPI ecsPlayVoiceInTalk(int instance, char* pVoice, long size, int coder); int ECSSDKLIBAPI ecsPlayFileInTalk(int instance, const char* filename, float scale); int ECSSDKLIBAPI ecsStopPlayInTalk(int instance); const char* ECSSDKLIBAPI ecsGetUserId(int instance); const char* ECSSDKLIBAPI ecsGetDeviceId(int instance); int ECSSDKLIBAPI ecsGetDeviceModel(int instance); void ECSSDKLIBAPI ecsOpenLogFile(const char* dir, long level); void ECSSDKLIBAPI ecsCloseLogFile(); int ECSSDKLIBAPI ecsDialPhoneNumber(int instance, char* phonenumber); int ECSSDKLIBAPI ecsCallReject(int instance); int ECSSDKLIBAPI ecsCallOffHook(int instance); int ECSSDKLIBAPI ecsCallOnHook(int instance); int ECSSDKLIBAPI ecsBtReconnectPhone(int instance); int ECSSDKLIBAPI ecsBtDisconnectPhone(int instance); int ECSSDKLIBAPI ecsSetBtName(int instance, char* name, int len); int ECSSDKLIBAPI ecsSetBtAddr(int instance, char* addr, int len); int ECSSDKLIBAPI ecsRebootDev(int instance); int ECSSDKLIBAPI ecsRestoreConfig(int instance); int ECSSDKLIBAPI ecsSetAecConfig(int instance, AEC_CONFIG config); int ECSSDKLIBAPI ecsDevOnlineUpgrade(int instance, const char* filename); int ECSSDKLIBAPI ecsSetVoiceRoute(int instance, int mode); //mode 0: 通话语音从手机输出和输入, 1:通话语音从设备输出 默认语音输出从设备输出和输入 /* 设置音量,nType值不同,设置不同的音量类型 nType vol范围 默认值 0(通话中mic gain, 远端听到的) 0-100 100 1(通话中dac gain, 本地听到的) 0-5 1 //此参数无效 2(通话的音量, 本地听到的,和手机音量同步) 0-100 */ int ECSSDKLIBAPI ecsSetVolume(int instance, int nType, float vol); int ECSSDKLIBAPI ecsGetVolume(int instance, int nType); int ECSSDKLIBAPI ecsSendDtmfTone(int instance, char* dtmfs, int len); //耳机自检测试, 对着MIC说话,耳机喇叭能够听到自己说话的声音,用于判断耳机是不是美标耳机,或者用于检测耳机是不是好的 //mode: 1, 启动自检测试, 0:关闭自检测试 int ECSSDKLIBAPI ecsEarPhoneSelfTest(int instance, int mode); #ifdef __cplusplus } #endif #endif
06-13
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值