From 1c8dcfcec589b1af72f99ca841c40dae52250b60 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 2 Jul 2015 15:54:36 -0700 Subject: [PATCH] document dependencies in the readme --- README.md | 42 +++++++++++++++++++++++++++++------------- default.nix | 12 ------------ 2 files changed, 29 insertions(+), 25 deletions(-) delete mode 100644 default.nix diff --git a/README.md b/README.md index 40d928a..50a6f68 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ platform is wrong, the next backend is tried. ## Contributing -libsoundio is programmed in a tiny subset of C++: +libsoundio is programmed in a tiny subset of C++11: * No STL. * No `new` or `delete`. @@ -36,14 +36,25 @@ libsoundio is programmed in a tiny subset of C++: * No references. * No linking against libstdc++. +Don't get tricked - this is a *C library*, not a C++ library. We just take +advantage of a select few C++11 compiler features such as templates, and then +link against libc. + ### Building +Install the dependencies: + + * cmake + * ALSA library (optional) + * libjack2 (optional) + * libpulseaudio (optional) + ``` -$ mkdir build -$ cd build -$ cmake .. -$ make -$ sudo make install +mkdir build +cd build +cmake .. +make +sudo make install ``` ### Building With MXE @@ -53,19 +64,19 @@ You can build libsoundio with [mxe](http://mxe.cc/). Follow the packages necessary on your system. Then somewhere on your file system: ``` -$ git clone https://github.com/mxe/mxe -$ cd mxe -$ make gcc +git clone https://github.com/mxe/mxe +cd mxe +make gcc ``` Then in the libsoundio source directory (replace "/path/to/mxe" with the appropriate path): ``` -$ mkdir build-win -$ cd build-win -$ cmake .. -DCMAKE_TOOLCHAIN_FILE=/path/to/mxe/usr/i686-w64-mingw32.static/share/cmake/mxe-conf.cmake -$ make +mkdir build-win +cd build-win +cmake .. -DCMAKE_TOOLCHAIN_FILE=/path/to/mxe/usr/i686-w64-mingw32.static/share/cmake/mxe-conf.cmake +make ``` ## Roadmap @@ -78,6 +89,11 @@ $ make 0. ASIO (Windows) 0. DirectSound (Windows) 0. OSS (BSD) + 0. list devices example + 0. sine wave example + 0. record to playback example + 0. clean up API and improve documentation + 0. use a documentation generator and host the docs somewhere ## Planned Uses for libsoundio diff --git a/default.nix b/default.nix deleted file mode 100644 index 7b19f4f..0000000 --- a/default.nix +++ /dev/null @@ -1,12 +0,0 @@ -with import {}; { - libsoundioEnv = stdenv.mkDerivation { - name = "libsoundio"; - buildInputs = [ - alsaLib - cmake - gcc5 - libjack2 - libpulseaudio - ]; - }; -}