diff --git a/README.md b/README.md index 86007d08..70d32b70 100644 --- a/README.md +++ b/README.md @@ -8,14 +8,14 @@ * Cmake of Windows version - * visual studio 2013 + * visual studio 2015(also support vs2013 and vs2017) - * QT 5.9.2(msvc2015) if you need UI + * QT 5.9.2(msvc2015, any version QT adjust to visual studio version) if you need UI * Version - * agora sdk windows version 2.9.0 and above(x86). - * obs studio 21.1b and above(x86). + * agora sdk windows version 2.9.0 and above(x86), also support x64. + * obs studio 21.1b and above(x86), also support x64. * Build project with CMake-gui: @@ -24,10 +24,10 @@ * Set variables in windows environment: * DepsPath - The path where win32 is located after decompressing dedependencies2013.zip + The path where win32 or win64 is located after decompressing dedependencies2015.zip(dedependencies2013.zip or dedependencies2017.zip). dedependencies2013 not support win64. * QTDir - The path where win32 is loacted after installed QT 5.8 + The path where win32 is loacted after installed QT 5.9.2 * Uncheck ENABLE\_SCRIPTING * After configure is ok,then click generate, vs project can be generated. diff --git a/UI/window-basic-main.cpp b/UI/window-basic-main.cpp index b9f67503..8ea80b63 100644 --- a/UI/window-basic-main.cpp +++ b/UI/window-basic-main.cpp @@ -6262,17 +6262,17 @@ void OBSBasic::InitAgoraServiceSettings() { obs_data_t* settings = obs_service_get_settings(agoraService); std::string rtmpcustom = "rtmp_custonm"; - if (rtmpcustom.compare( obs_service_get_type(service) )== 0) + if (rtmpcustom.compare(obs_service_get_type(service)) == 0) { obs_data_set_string(settings, "agora_url", obs_service_get_url(service)); obs_data_set_string(settings, "agora_key", obs_service_get_key(service)); } - + obs_data_set_int(settings, "agora_video_bitrate", 2400); int out_cx = config_get_uint(basicConfig, "Video", "OutputCX"); int out_cy = config_get_uint(basicConfig, "Video", "OutputCY"); - + obs_data_set_int(settings, "agora_out_cx", out_cx); obs_data_set_int(settings, "agora_out_cy", out_cy); @@ -6761,4 +6761,4 @@ void OBSBasic::OnJoinChannelSuccess(QString channel, long long uid, long long el void OBSBasic::OnError(int err, const char* msg) { -} \ No newline at end of file +} diff --git a/dependencies2015.zip b/dependencies2015.zip index 2124dfbe..fb7702b3 100644 Binary files a/dependencies2015.zip and b/dependencies2015.zip differ diff --git a/dependencies2017.zip b/dependencies2017.zip index 80cfd45d..9808c15a 100644 Binary files a/dependencies2017.zip and b/dependencies2017.zip differ diff --git a/plugins/win-agora/Agora/ExtendAudioFrameObserver.cpp b/plugins/win-agora/Agora/ExtendAudioFrameObserver.cpp index 9fb17557..1321748a 100644 --- a/plugins/win-agora/Agora/ExtendAudioFrameObserver.cpp +++ b/plugins/win-agora/Agora/ExtendAudioFrameObserver.cpp @@ -68,10 +68,10 @@ bool CExtendAudioFrameObserver::onRecordAudioFrame(AudioFrame& audioFrame) unsigned int datalen = 0; pCircleBuffer->readBuffer(this->pPlayerData, nSize, &datalen); + if (nSize > 0 && datalen == nSize) + { + if (agora_sdk_captrue_mic_audio) { - if (agora_sdk_captrue_mic_audio) { - if (nSize > 0 && datalen == nSize) - { //int nMixLen = datalen > nSize ? nSize : datalen; int len = datalen / sizeof(int16_t); for (int i = 0; i < len; i++) { @@ -86,8 +86,8 @@ bool CExtendAudioFrameObserver::onRecordAudioFrame(AudioFrame& audioFrame) *obsbuffer = mix; } memcpy(audioFrame.buffer, pPlayerData, datalen); - } + } else memcpy(audioFrame.buffer, pPlayerData, datalen); } diff --git a/readme.zh.md b/readme.zh.md index c0968fea..b7f6625f 100644 --- a/readme.zh.md +++ b/readme.zh.md @@ -2,17 +2,17 @@ *English: [English](README.md)* -* 编译基于win32(x86) -* agora sdk版本2.2.1 +* 编译基于win32(x86),也支持x64 +* agora sdk版本2.9.0 * obs stduio 版本21.1 ## 编译环境 * CMake 2.8.12以上 -* vs2013 -* QT 5.8(可选,如果不需要界面,可以不需要QT。默认是有界面的) +* vs2015 +* QT 5.9.2(可选,如果不需要界面,可以不需要QT。默认是有界面的。任何适配对应的visual stduio版本的QT) -配好环境,CMake上选择源码路径和生成路径,编译器选择vs2013,编译即可生成vs解决方案。 +配好环境,CMake上选择源码路径和生成路径,编译器选择vs2015,编译即可生成vs解决方案。 ## 使用CMake-gui 构建vs项目: @@ -22,10 +22,10 @@ * 设置windows环境变量: * DepsPath - **解压dedependencies2013.zip** 之后的目录下有个win32文件夹,作为路径。(vs2015对应dedependencies2015.zip,vs2017对应dedependencies2017.zip) + **解压dedependencies2015.zip** 之后的目录下有个win32或者win64文件夹,作为路径。(vs2015对应dedependencies2013.zip,vs2017对应dedependencies2017.zip) 。dedependencies2013目前不支持win64。 * QTDir - QT 5.8 目录下的msvc2013。其他5.0以上版本的QT也可以,只要支持对应的vs版本即可。比如:QT5.8对应的vs2013的版本应该选择msvc2013。QT 5.9对应的vs2015是msvc_2015。 + QT 5.8 目录下的msvc2013。其他5.0以上版本的QT也可以,只要支持对应的vs版本即可。比如:QT5.8对应的vs2013的版本应该选择msvc2013。QT 5.9.2对应的vs2015是msvc_2015。 * 取消 ENABLE\_SCRIPTING 如果不需要使用python或者lua脚本调用obs库接口,可以取消。