首页
IT
登录
6mi
u
盘
搜
搜 索
IT
[Audacity][编译][步骤五]编译Audacity
[Audacity][编译][步骤五]编译Audacity
xiaoxiao
2021-03-25
159
1、配置可选功能
1)本地安装的帮助是可选的,但必须建立在Full-Release编译基础上,(安装程序中包含“帮助”文件夹,但zip发布版本中没有),Python库是必需的,可从http://www.python.org/download/下载。把python的安装路径需要添加到系统环境变量的path路径中。
在MS Visual Studio中启用“帮助”项目配置管理器(生成菜单),下载帮助手册到你本地的编译目录。如果需要更新本地已有手册,执行audacity\scripts\mw2html_audacity\wiki2htm.bat并re-build“帮助”项目。
2)如果需要支持除英语之外的其他语言,你需要配置并编译可选的 "locale" 项目,但必须建立在Full-Release编译基础上。此外你还需要下载 msgfmt.exe 下载地址:https://sourceforge.net/projects/cppcms/files/boost_locale/gettext_for_windows/。并把它丢在任意一个已经在环境变量Path可以找到的地方。例如C:\Windows
3) Audacity 中的部分功能在配置的时候设置为默认启用了,但运行的时候需要额外的第三方库依赖,如果想要调整配置,修改"win\configwin.h"即可。
4)增加ASIO支持,ASIO (from Steinberg) 是一种比标准的wmme速度更快的声卡接口协议,缺点是并不是所有的声卡驱动都支持ASIO协议。
ASIO是一个专有的、封闭的标准,我们并不能发布其SDK,也意味着我们无法发布支持ASIO的Audacity 版本,因为Audacity 基于GPL协议,我们需要发布所有的源代码。
你可以编译自己的支持ASIO的Audacity个人版本,抱歉,仅能供个人使用你无法违反协议发布。
ASIO SDK 下载 (http://www.steinberg.net/en/company/developers.html) 安装在本地之后设置一个变量名为ASIOSDK_DIR的环境变量指向该路径。
2、编译准备
1)Audacity 项目属性 - 》 VC++目录 -》包含目录 -》增加 $(WXWIN)\include
2)解决整形定义冲突
删除源码目录下所有的stdint.h文件
3)解决snprintf冲突
lib-src\portaudio-v19\src\hostapi\wdmks\pa_win_wdmks.c 修改
#ifdef _MSC_VER #define snprintf _snprintf #define vsnprintf _vsnprintf #endif
为
#if (defined(_MSC_VER) && (_MSC_VER < 1900)) #define snprintf _snprintf #define vsnprintf _vsnprintf #endif
lib-src\portaudio-v19\src\hostapi\jack\pa_jack.c 修改
#if defined(WIN32) #define snprintf _snprintf #endif
为
#if (defined(_MSC_VER) && (_MSC_VER < 1900)) #define snprintf _snprintf #endif
win\Projects\libsndfile\config.h修改
#define snprintf _snprintf
为
#if (defined(_MSC_VER) && (_MSC_VER < 1900)) #define snprintf _snprintf #endif
src\export\ExportFFmpeg.cpp修改
#if defined(WIN32) #define snprintf _snprintf #endif
为
#if (defined(_MSC_VER) && (_MSC_VER < 1900)) #define snprintf _snprintf #endif
lib-src\libnyquist\nyquist\sys\win\msvc\switches.h
#define snprintf _snprintf
为
#if (defined(_MSC_VER) && (_MSC_VER < 1900)) #define snprintf _snprintf #endif
C:\work\audacity-master\lib-src\lv2\lilv\src\lilv_internal.h 修改
#ifdef _WIN32 # include <windows.h> # define dlopen(path, flags) LoadLibrary(path) # define dlclose(lib) FreeLibrary((HMODULE)lib) # ifdef _MSC_VER # define __func__ __FUNCTION__ # define INFINITY DBL_MAX + DBL_MAX # define NAN INFINITY - INFINITY # define snprintf _snprintf # endif
为
#ifdef _WIN32 # include <windows.h> # define dlopen(path, flags) LoadLibrary(path) # define dlclose(lib) FreeLibrary((HMODULE)lib) # ifdef _MSC_VER # define __func__ __FUNCTION__ # define INFINITY DBL_MAX + DBL_MAX # define NAN INFINITY - INFINITY # if _MSC_VER < 1900 # define snprintf _snprintf # endif # endif
lv2项目属性-》c/c++-》预处理器-》删除 snprintf=_snprintf
3、修改Audacity源码
// // wxPanelWrapper.h // Audacity // // Created by Paul Licameli on 6/25/16. // // #ifndef __AUDACITY_WXPANEL_WRAPPER__ #define __AUDACITY_WXPANEL_WRAPPER__ #include "../MemoryX.h" #include <wx/panel.h> #include <wx/dialog.h> void wxTabTraversalWrapperCharHook(wxKeyEvent &event); // //template <typename Base> //class wxTabTraversalWrapper : public Base //{ //public: // template <typename... Args> // wxTabTraversalWrapper(Args&&... args) // : Base( std::forward<Args>(args)... ) // //: Base() // { // this->Bind(wxEVT_CHAR_HOOK, wxTabTraversalWrapperCharHook); // } // // ~wxTabTraversalWrapper() // { // this->Unbind(wxEVT_CHAR_HOOK, wxTabTraversalWrapperCharHook); // } //}; class wxPanel; //using wxPanelWrapper = wxTabTraversalWrapper<wxPanel>; class wxDialog; //using wxDialogWrapper = wxTabTraversalWrapper<wxDialog>; class wxDialogWrapper : public wxDialog { public: wxDialogWrapper() : wxDialog() { this->Bind(wxEVT_CHAR_HOOK, wxTabTraversalWrapperCharHook); } wxDialogWrapper(wxWindow *parent, wxWindowID id = wxID_ANY, const wxString& title = "", const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = wxDialogNameStr) : wxDialog(parent, id, title, pos, size, style, name) { this->Bind(wxEVT_CHAR_HOOK, wxTabTraversalWrapperCharHook); } ~wxDialogWrapper() { this->Unbind(wxEVT_CHAR_HOOK, wxTabTraversalWrapperCharHook); } }; class wxPanelWrapper : public wxPanel { public: template <typename... Args> wxPanelWrapper(Args&&... args) : wxPanel(std::forward<Args>(args)...) { this->Bind(wxEVT_CHAR_HOOK, wxTabTraversalWrapperCharHook); } ~wxPanelWrapper() { this->Unbind(wxEVT_CHAR_HOOK, wxTabTraversalWrapperCharHook); } }; #endif
4、编译Audacity
启动VS并打开"audacity\win\audacity.sln"。你可以选择如下方式编译你想要的版本
* "Release" unicode 发布版本 * "Debug" unico的调试版本
5、Enjoy your self
转载请注明原文地址: https://ju.6miu.com/read-7672.html
技术
最新回复
(
0
)