====== Downloading ====== ===== Getting the sources ===== You can either download the source package (link below), or get the sources directly from GIT repository. ==== Snapshot ==== To get the snapshot, download it from here: * Last source snapshot from github {{https://github.com/iimcz/iimavlib/archive/master.zip}} * Source package v1.1-13 (ZIP), 2014-03-19 {{:support:iimavlib:audiolib-v1.1-13-g98d9d56.zip|audiolib-v1.1-13-g98d9d56.zip}} * Source package v1.1-13 (ZIP), 2014-03-19 {{:support:iimavlib:audiolib-v1.1-13-g98d9d56.tar.bz2|audiolib-v1.1-13-g98d9d56.tar.bz2}} ---- * Source package v1.1 (ZIP), 2014-03-10 {{:support:iimavlib:audiolib-v1.1.zip|audiolib-v1.1.zip}} * Source package v1.1 (tar.bz2), 2014-03-10 {{:support:iimavlib:audiolib-v1.1.tar.bz2|audiolib-v1.1.tar.bz2}} ==== GIT repository ==== The address of GIT repository is **https://github.com/iimcz/iimavlib**. If you use graphical GIT client, simply enter **https://github.com/iimcz/iimavlib.git** as remote repository and clone it. To clone the repository type from command line (or GIT shell in windows), type: git clone https://github.com/iimcz/iimavlib.git And if you want to update it later to current version, type (from the directory with sources): git pull ===== Compiling ===== ==== Windows ==== You need to install following applications prior to compiling the code: * Visual Studio 2019 or newer (version 2019 and 2022 are tested regularly) * CMake Tools (available through the Visual Studio installer, or separately at [[https://cmake.org/download/#latest|cmake]]). If installed separately, make sure you enable putting cmake into the PATH for current user or all users during installation. - In the directory with unpacked sources, execute **prepare_win32.bat** or **prepare_win64.bat** from a developer command prompt (or PowerShell prompt), depending on whether your system is 32 or 64 bit, or analogous batch files for newer versions of Visual Studio. This will create folder **build** - Open solution (//iimav.sln//) from the build directory. This should open Visual Studio. - Change build type from **Debug** to **Release**. - Press F7 (or Ctrl+Shift+B in some versions) in visual studio, this should compile the code for a while and eventually print that it built 17 targets. === Testing === Open command window and navigate to the directory build inside the sources. The try following commands. (Replace Release with Debug, if you've compiled Debug version). bin\Release\enumerate_devices.exe Expected output is a list of all available audio devices. bin\Release\playback_sine.exe 440 Expected output is a tone at 440Hz being played out from you default audio output. bin\Release\record_wav.exe sound.wav And speak into a microfone. The expected output is a file //sound.wav// being created in the build directory. bin\Release\playback_wav.exe sound.wav The expected output is that the file //sound.wav// will be played out. bin\Release\sdl_window.exe The expected output is a window with the mandelbrot fractal and rotating objects. bin\Release\sdl_drums.exe And click using left, right and middle button into the window or press keys a, b and c. The expected output is a a black window changing color and playing sounds, based on the input. ==== Linux ==== You need to install following application before compiling sources: * g++ (C++ compilator) * cmake * libsdl - Graphical library. Install the libsdl-dev package, if your distribution has it. Under Ubuntu, type: sudo apt-get install g++ cmake libsdl-dev Under Gentoo, type (as a root): emerge cmake libsdl Then: - Open terminal and navigate to the directory with unpacked sources. - Then type: ./prepare_linux.sh cd build make === Testing === Open the terminal and navigate to the directory build inside the sources. The try following commands: bin/enumerate_devices Expected output is a list of all available audio devices. bin/playback_sine 440 Expected output is a tone at 440Hz being played out from you default audio output. bin/record_wav sound.wav And speak into a microfone. The expected output is a file //sound.wav// being created in the build directory. bin/playback_wav sound.wav The expected output is that the file //sound.wav// will be played out. bin/sdl_window The expected output is a window with the mandelbrot fractal and rotating objects. bin/sdl_drums And click using left, right and middle button into the window or press keys a, b and c. The expected output is a a black window changing color and playing sounds, based on the input.