Linux/Mac

Prerequisites

First you have to ensure some prerequisites:

  • Debian or Debian-based Linux operating system (e.g. Ubuntu) recommended

  • Matlab + mex-compiler

  • packages (install with apt-get, aptitude, synaptic, macports, …)

    • make
    • g++ (at least version 4.7.3)
    • libsndfile1-dev
    • libxml2-dev
    • libfftw3-dev
  • get SoundScape Renderer (location will be denoted as SSR_DIR)

    git clone https://github.com/TWOEARS/twoears-ssr.git SSR_DIR
    git checkout origin/master -b master
    

Compile MEX Binaries

  • switch to directory containing the mex-files

    cd SSR_DIR/mex/
    
  • if you are using a Mac and installed Matlab at /Applications/Matlab_R2013a.app

    export PATH="/Applications/Matlab_R2013a.app/bin:$PATH"
    export CPPFLAGS="-I/Applications/Matlab_R2013a.app/extern/include"
    
  • generate mex-files

    make matlab
    
  • If you get an error saying that the version of GLIBCXX is not correct this is due to the usage of the Matlab provided libstdc++ which is for an older gcc version. You can solve this by deleting linking it to your system libstdc++ via

    ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.<LIBSTDC-VERSION> \
          /usr/local/Matlab/Matlab-VERSION/bin/glnxa64/libstdc++.so.6
    
  • open Matlab and add SSR_DIR/mex/ to Matlab-path using pathtool or addpath

That’s all, now you should be able to use the Two!Ears Binaural Simulator.