zoukankan      html  css  js  c++  java
  • Echoprint系列--编译

    近期要做一个音乐相关的client。当中一个功能是音乐识别。搜索了一些资料选择Echoprint来开发。Echoprint是开源免费的,并且多种client都支持能节约非常多时间,今天主要下载和编译源代码以及測试。

    (备注:我的开发环境是Mac,所以以下以及之后都是Mac的环境)

    1、官网

    官网地址:http://echoprint.me

    2、安装依赖环境

    • 首先安装HomeBrew
    • 安装依赖库 

      brew install ffmpeg boost taglib

      安装的文件夹都在

      /usr/local/Cellar

    3、下载源代码

    git clone -b release-4.12 git://github.com/echonest/echoprint-codegen.git


    下载完源代码后进入src并打开Makefile

    adsl-172-10-1-12:~ zhangjie$ cd echoprint-codegen

    adsl-172-10-1-12:echoprint-codegen zhangjie$ cd src/

    adsl-172-10-1-12:src zhangjie$ vim Makefile 

    改动当中变量BOOST_CFLAGS为你当前安装的boost文件夹

    BOOST_CFLAGS=-I/usr/local/Cellar/boost/1.58.0/include

    改动

     34 libcodegen: $(MODULES_LIB)

     35 ifeq ($(UNAME),Darwin)

     36         libtool -dynamic -flat_namespace -install_name libcodegen.$(VERSION).dylib -lSystem -compatibility_version $(VERSION_COMPAT)

     37                 -macosx_version_min 10.6 -current_version $(VERSION) -o libcodegen.$(VERSION).dylib -undefined suppress

     38             $(MODULES_LIB) -framework vecLib -framework Accelerate

     39 else

     40         $(CXX) -shared -fPIC -Wl,-soname,$(SONAME) -o $(LIBNAME).$(VERSION) $(MODULES_LIB) -lz

     41 endif

    假设38行中有-framework vecLib则去掉

    变为例如以下:

     34 libcodegen: $(MODULES_LIB)

     35 ifeq ($(UNAME),Darwin)

     36         libtool -dynamic -flat_namespace -install_name libcodegen.$(VERSION).dylib -lSystem -compatibility_version $(VERSION_COMPAT)

     37                 -macosx_version_min 10.6 -current_version $(VERSION) -o libcodegen.$(VERSION).dylib -undefined suppress

     38             $(MODULES_LIB)  -framework Accelerate

     39 else

     40         $(CXX) -shared -fPIC -Wl,-soname,$(SONAME) -o $(LIBNAME).$(VERSION) $(MODULES_LIB) -lz

     41 endif

    4、编译

    adsl-172-10-1-12:src zhangjie$ vim Makefile 

    adsl-172-10-1-12:src zhangjie$ make

    g++ -Wall -I/usr/local/Cellar/boost/1.58.0/include `taglib-config --cflags` -fPIC -O3 -DBOOST_UBLAS_NDEBUG -DNDEBUG -c -o Codegen.o Codegen.cxx

    In file included from Codegen.cxx:12:

    In file included from ./AudioBufferInput.h:14:

    ./AudioStreamInput.h:53:10: warning: 'StdinStreamInput::ProcessFile' hides overloaded virtual function [-Woverloaded-virtual]

        bool ProcessFile(const char* filename){ return ProcessStandardInput();}

             ^

    ./AudioStreamInput.h:26:18: note: hidden overloaded virtual function 'AudioStreamInput::ProcessFile' declared here: different number of parameters (3 vs 1)

        virtual bool ProcessFile(const char* filename, int offset_s=0, int seconds=0);

                     ^

    1 warning generated.

    g++ -Wall -I/usr/local/Cellar/boost/1.58.0/include `taglib-config --cflags` -fPIC -O3 -DBOOST_UBLAS_NDEBUG -DNDEBUG -c -o Fingerprint.o Fingerprint.cxx

    g++ -Wall -I/usr/local/Cellar/boost/1.58.0/include `taglib-config --cflags` -fPIC -O3 -DBOOST_UBLAS_NDEBUG -DNDEBUG -c -o MatrixUtility.o MatrixUtility.cxx

    g++ -Wall -I/usr/local/Cellar/boost/1.58.0/include `taglib-config --cflags` -fPIC -O3 -DBOOST_UBLAS_NDEBUG -DNDEBUG -c -o SubbandAnalysis.o SubbandAnalysis.cxx

    In file included from SubbandAnalysis.cxx:8:

    ./AudioStreamInput.h:53:10: warning: 'StdinStreamInput::ProcessFile' hides overloaded virtual function [-Woverloaded-virtual]

        bool ProcessFile(const char* filename){ return ProcessStandardInput();}

             ^

    ./AudioStreamInput.h:26:18: note: hidden overloaded virtual function 'AudioStreamInput::ProcessFile' declared here: different number of parameters (3 vs 1)

        virtual bool ProcessFile(const char* filename, int offset_s=0, int seconds=0);

                     ^

    1 warning generated.

    g++ -Wall -I/usr/local/Cellar/boost/1.58.0/include `taglib-config --cflags` -fPIC -O3 -DBOOST_UBLAS_NDEBUG -DNDEBUG -c -o Whitening.o Whitening.cxx

    查看全文

  • 相关阅读:
    一年后重翻javascript
    针对thinkphp 5框架存储过程bug而重写的存储过程的扩展类
    移动应用端的支付宝支付php开发流程
    android studio 开发中启动android项目报错sdk版本不一致解决方案
    正则表达式(一)
    linux下memcached安装以及启动
    linux如何添加服务为系统服务快速启动或关闭
    js或者jquery直接下载网页上的图片代码
    onethink多图上传
    php+redis实现多台服务器内网存储session并读取
  • 原文地址:https://www.cnblogs.com/lxjshuju/p/6790006.html
Copyright © 2011-2022 走看看