DBDelve
Dive deep into your data. A fast, native, multi-engine database client written in Rust. Free and open source, no telemetry.
翻訳待ち
A C library for reading and writing sound files containing sampled audio data.
翻訳待ち
開発ツールC · SmartyGitHub @libsndfile自分でインストール所有者未確認
Paste into Claude or ChatGPT for installation instructions suited to your environment.
Have you tried it? One tap is enough. No sign-in needed.
The maker's introduction consists of the line above. Read the repository README for more details. Repository README ↗
Loading the full README.
Read the full README ↗libsndfile is a C library for reading and writing files containing sampled audio data.
The libsndfile project was originally developed and maintained by Erik de Castro Lopo [email protected] aka @erikd. The project was developed on Github at https://github.com/erikd/libsndfile.
After the release of version 1.0.30, @erikd transferred the project to the libsndfile team, see AUTHORS for details.
The canonical source code repository for libsndfile is at https://github.com/libsndfile/libsndfile.
You can grab the source code using:
git clone https://github.com/libsndfile/libsndfile.git
For building for Android see BuildingForAndroid.
There are currently two build systems: the traditional GNU autotool based one and modern CMake based build system. Use of the CMake build system is documented below.
Setting up a build environment for libsndfile on Debian or Ubuntu is as simple as:
sudo apt install autoconf autogen automake build-essential libasound2-dev \
libflac-dev libogg-dev libtool libvorbis-dev libopus-dev libmp3lame-dev \
libmpg123-dev pkg-config python
For other Linux distributions or any of the *BSDs, the setup should be similar although the package install tools and package names may be slightly different.
Similarly on Mac OS X, assuming brew is already installed:
brew install autoconf autogen automake flac libogg libtool libvorbis opus mpg123 pkg-config
Once the build environment has been set up, building and testing libsndfile is as simple as:
autoreconf -vif
./configure --enable-werror
make
make check
Although Autotools is the primary and recommended build toolchain, CMake meta build generator is also available. The build process with CMake takes place in two stages. First, standard build files are created from configuration scripts. Then the platform's native build tools are used for the actual building. CMake can produce Microsoft Visual Studio project and solution files, Unix Makefiles, Xcode projects and many more.
Some IDE support CMake natively or with plugins, check you IDE documentation for details.
There are some recommended packages to enable all features of libsndfile:
CMake can handle out-of-place builds, enabling several builds from the same source tree, and cross-compilation. The ability to build a directory tree outside the source tree is a key feature, ensuring that if a build directory is removed, the source files remain unaffected.
mkdir CMakeBuild
cd CMakeBuild
Then run cmake command with directory where CMakeLists.txt script is located
as argument (relative paths are supported):
cmake ..
This command will configure and write build script or solution to CMakeBuild
directory. CMake is smart enough to create Unix makefiles under Linux or Visual
Studio solution if you have Visual Studio installed, but you can configure
generator
with -G command line parameter:
cmake .. -G"Unix Makefiles"
The build procedure depends on the selected generator. With "Unix Makefiles" you can type:
make & make install
With "Visual Studio" and some other generators you can open solution or project
from CMakeBuild directory and build using IDE.
Finally, you can use unified command:
cmake --build .
CMake also provides Qt-based cross platform GUI, cmake-gui. Using it is trivial and does not require detailed explanations.
You can pass additional options with /D<parameter>=<value> when you run
cmake command. Some useful system options:
CMAKE_C_FLAGS - additional C compiler flagsCMAKE_BUILD_TYPE - configuration type, DEBUG, RELEASE, RELWITHDEBINFO
or MINSIZEREL. DEBUG is defaultCMAKE_INSTALL_PREFIX - build install location, the same as --prefix option
of configure scriptUseful libsndfile options:
BUILD_SHARED_LIBS - build shared library (DLL under Windows) when ON,
build static library otherwise. This option is OFF by default.BUILD_PROGRAMS - build libsndfile's utilities from programs/ directory,
ON by default.BUILD_EXAMPLES - build examples, ON by default.BUILD_TESTING - build tests. Then you can run tests with ctest command,
ON by default. Setting BUILD_SHARED_LIBS to ON disables this option.ENABLE_EXTERNAL_LIBS - enable Ogg, Vorbis, FLAC and Opus support. This
option is available and set to ON if all dependency libraries were found.ENABLE_MPEG - MP3 support. This option is available and set to ON if all
dependency libraries were found.ENABLE_EXPERIMENTAL - enable experimental code. Don't use it if you are
not sure. This option is OFF by default.ENABLE_CPACK - enable CPack support.
This option is ON by default.ENABLE_PACKAGE_CONFIG - generate and install package config file.INSTALL_PKGCONFIG_MODULE - generate and install pkg-config module.INSTALL_MANPAGES - install man pages for programs. This option is ON by defaultENABLE_STATIC_RUNTIME - enable static runtime on Windows platform (MSVC and
MinGW), OFF by default.This is the beginning of the README. Read the rest at the original. Read the full README ↗