{"id":17046804,"url":"https://github.com/evpobr/libsndwave","last_synced_at":"2025-08-15T22:14:47.751Z","repository":{"id":93916516,"uuid":"299297783","full_name":"evpobr/libsndwave","owner":"evpobr","description":"A library for reading and writing audio files","archived":false,"fork":false,"pushed_at":"2020-10-10T05:17:33.000Z","size":31765,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-28T09:45:56.426Z","etag":null,"topics":["audio-library","c","cmake","libsndfile"],"latest_commit_sha":null,"homepage":"https://evpobr.github.io/libsndwave/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/evpobr.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-28T12:13:26.000Z","updated_at":"2023-10-24T14:20:43.000Z","dependencies_parsed_at":"2023-03-13T17:09:31.303Z","dependency_job_id":null,"html_url":"https://github.com/evpobr/libsndwave","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evpobr%2Flibsndwave","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evpobr%2Flibsndwave/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evpobr%2Flibsndwave/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evpobr%2Flibsndwave/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evpobr","download_url":"https://codeload.github.com/evpobr/libsndwave/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245052221,"owners_count":20553160,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio-library","c","cmake","libsndfile"],"created_at":"2024-10-14T09:47:29.913Z","updated_at":"2025-03-23T03:27:08.107Z","avatar_url":"https://github.com/evpobr.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# libsndwave\n\n![C/C++ CI](https://github.com/evpobr/libsndwave/workflows/C/C++%20CI/badge.svg)\n\nlibsndwave is a fork of [libsndfile](https://github.com/erikd/libsndfile),\na library for reading and writing audio files, developed by Erik de Castro Lopo.\n\nThe bifurcation point with libsndfile is at this [commit](https://github.com/erikd/libsndfile/commit/fe493272d2261e1f0b547cd39bd91e44ebc580bb).\n\nThe goal of this project is to speed up development and remove unnecessary and\noutdated dependencies.\n\nThis project is API compatible with libsndfile. The name of the library itself and\nthe header file has been changed to avoid conflicts with the upstream, but all the\nnames of public functions and types remained unchanged.\n\n**Contents:**\n\n* [Installation](#installation)\n* [Usage](#usage)\n* [Contributing](#contributing)\n* [Downloads](#downloads)\n* [Downloads](#downloads)\n\n## Installation\n\nThe canonical source code repository for libsndwave is at\n[https://github.com/evpobr/libsndwave/][github].\n\nYou can grab the source code using:\n\n    git clone git://github.com/evpobr/libsndwave.git\n\nSetting up a build environment for libsndwave on Debian or Ubuntu is as simple as:\n\n    sudo apt install build-essential cmake libasound2-dev libflac-dev libogg-dev \\\n        libvorbis-dev libopus-dev pkg-config\n\nFor other Linux distributions or any of the *BSDs, the setup should be similar\nalthough the package install tools and package names may be slightly different.\n\nSimilarly on Mac OS X, assuming [brew] is already installed:\n\n    brew install cmake flac libogg libtool libvorbis opus pkg-config\n\n### The CMake build system\n\nThe build process with CMake takes place in two stages. First, standard build files\nare created from configuration scripts. Then the platform's native build tools are\nused for the actual building. CMake can produce Microsoft Visual Studio project\nand solution files, Unix Makefiles, Xcode projects and [many more](https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html).\n\nSome IDE support CMake natively or with plugins, check you IDE documentation\n for details.\n\n### Requirements\n\n1. C99-compliant compiler toolchain (tested with GCC, Clang and Visual\n   Studio 2015)\n2. CMake 3.15 or newer\n\nThere are some recommended packages to enable all features of libsndwave:\n\n1. Ogg, Vorbis and FLAC libraries and headers to enable these formats support\n2. ALSA development package under Linux to build sndwave-play utility\n3. Sndio development package under BSD to build sndwave-play utility\n\n### Building from command line\n\nCMake can handle out-of-place builds, enabling several builds from\nthe same source tree, and cross-compilation. The ability to build a directory\ntree outside the source tree is a key feature, ensuring that if a build\ndirectory is removed, the source files remain unaffected.\n\n    mkdir CMakeBuild\n    cd CMakeBuild\n\nThen run `cmake` command with directory where CMakeLists.txt script is located\nas argument (relative paths are supported):\n\n    cmake ..\n\nThis command will configure and write build script or solution to CMakeBuild\ndirectory. CMake is smart enough to create Unix makefiles under Linux or Visual\nStudio solution if you have Visual Studio installed, but you can configure\n[generator](https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html)\nwith `-G` command line parameter:\n\n    cmake .. -G\"Unix Makefiles\"\n\nThe build procedure depends on the selected generator. With \"Unix Makefiles\" you\ncan type:\n\n    make \u0026 make install\n\nWith \"Visual Studio\" and some other generators you can open solution or project\nfrom `CMakeBuild` directory and build using IDE.\n\nFinally, you can use unified command:\n\n    cmake --build .\n\nCMake also provides Qt-based cross platform GUI, cmake-gui. Using it is trivial\nand does not require detailed explanations.\n\n### Configuring CMake\n\nYou can pass additional options with `/D\u003cparameter\u003e=\u003cvalue\u003e` when you run\n`cmake` command. Some useful system options:\n\n* `CMAKE_C_FLAGS` - additional C compiler flags\n* `CMAKE_BUILD_TYPE` - configuration type, `DEBUG`, `RELEASE`, `RELWITHDEBINFO`\n  or `MINSIZEREL`. `DEBUG` is default\n* `CMAKE_INSTALL_PREFIX` - build install location, the same as `--prefix` option\n  of `configure` script\n\n Useful libsndwave options:\n\n* `BUILD_SHARED_LIBS` - build shared library (DLL under Windows) when `ON`,\n  build static library othervise. This option is `OFF` by default.\n* `BUILD_PROGRAMS` - build libsndwave's utilities from `programs/` directory,\n  `ON` by default.\n* `BUILD_EXAMPLES` - build examples, `ON` by default.\n* `BUILD_TESTING` - build tests. Then you can run tests with `ctest` command,\n  `ON` by default. Setting `BUILD_SHARED_LIBS` to `ON` disables this option.\n* `ENABLE_EXTERNAL_LIBS` - enable Ogg, Vorbis, FLAC and Opus support. This\n  option is available and set to `ON` if all dependency libraries were found.\n* `ENABLE_CPU_CLIP` - enable tricky cpu specific clipper. Enabled and set to\n  `ON` when CPU clips negative\\positive. Don't touch it if you are not sure\n* `ENABLE_BOW_DOCS` - enable black-on-white documentation theme, `OFF` by\n  default.\n* `ENABLE_EXPERIMENTAL` - enable experimental code. Don't use it if you are\n  not sure. This option is `OFF` by default.\n* `ENABLE_CPACK` - enable [CPack](https://cmake.org/cmake/help/latest/module/CPack.html) support.\n  This option is `ON` by default.\n* `ENABLE_PACKAGE_CONFIG` - generate and install [package config file](https://cmake.org/cmake/help/latest/manual/cmake-packages.7.html#config-file-packages).\n* `INSTALL_PKGCONFIG_MODULE` - generate and install [pkg-config module](https://people.freedesktop.org/~dbn/pkg-config-guide.html).\n* `INSTALL_MANPAGES` - install [man pages](https://en.wikipedia.org/wiki/Man_page) for programs. This option is `ON` by  default\n\n## Usage\n\nFirst you need to add `FindOgg.cmake`, `FindVorbis.cmake`, `FindFLAC.cmake` and\n`FindOpus.cmake` files to some directory inside your CMake project (usually\n`cmake`) and add it to `CMAKE_MODULE_PATH`:\n\n    project(SomeApplication)\n    \n    list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)\n\nNow you can search `libsndwave` library from your `CMakeLists.txt`\n with this command:\n\n    find_package(SndWave)\n\n`SndWave_FOUND` is set to `ON` when library is found.\n\nIf `libsndwave` dependency is critical, you can add `REQUIRED` to\n `find_package`:\n\n    find_package(SndWave REQUIRED)\n\nWith with option `find_package` will terminate configuration process\n if `libsndwave` is not found.\n\nYou can also add version check:\n\n    find_package(SndWave 1.0.1)\n\n`find_package` will report error, if `libsndwave` version is \u003c 1.0.1.\n\nYou can combine `REQUIRED` and version if you need.\n\nTo link `libsndwave` library use:\n\n    target_link_libraries(my_application PRIVATE SndWave::sndwave)\n\nPreparation is complete! How you can include header:\n\n    #include \u003csndwave/sndwave.h\u003e\n\nand use libsndwave in your project.\n\n### Notes for Windows users\n\nSearching external libraries under Windows is a little bit tricky. The best way\nis to use [Vcpkg](https://github.com/Microsoft/vcpkg). You need to install\nstatic libogg, libvorbis, libflac and libopus libraries:\n\n    vcpkg install libogg:x64-windows-static libvorbis:x64-windows-static\n    libflac:x64-windows-static opus:x64-windows-static libogg:x86-windows-static\n    libvorbis:x86-windows-static libflac:x86-windows-static opus:x86-windows-static\n\nThen and add this parameter to cmake command line:\n\n    -DCMAKE_TOOLCHAIN_FILE=\u003cpath-to-vcpkg\u003e/scripts/buildsystems/vcpkg.cmake\n\nYou also need to set `VCPKG_TARGET_TRIPLET` because you use static libraries:\n\n    -DVCPKG_TARGET_TRIPLET=x64-windows-static\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for details.\n\n## Downloads\n\nLatest version is 1.0.0, released on 2020-09-09.\n\nReleases are located on [GitHub Releases page](https://github.com/evpobr/libsndwave/releases).\n\nRelease tags and binary distributions are signed and can be verified by [GPG key](https://keybase.io/evpobr).\n\n[brew]: http://brew.sh/\n[github]: https://github.com/evpobr/libsndwave/\n\n## License\n\n[LGPL-2.1](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevpobr%2Flibsndwave","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevpobr%2Flibsndwave","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevpobr%2Flibsndwave/lists"}