### Installation Rules Source: https://github.com/bbc/audiowaveform/blob/master/CMakeLists.txt Defines the installation rules for the audiowaveform project. It installs the main executable to the 'bin' directory and the generated man pages to 'share/man/man1' and 'share/man/man5' respectively, based on the CMAKE_INSTALL_PREFIX. ```cmake message(STATUS "CMAKE_INSTALL_PREFIX='${CMAKE_INSTALL_PREFIX}'") # Install executable install(TARGETS audiowaveform DESTINATION bin) # Install man pages install( FILES ${PROJECT_BINARY_DIR}/doc/audiowaveform.1.gz DESTINATION share/man/man1 ) install( FILES ${PROJECT_BINARY_DIR}/doc/audiowaveform.5.gz DESTINATION share/man/man5 ) ``` -------------------------------- ### Install Ubuntu Packaging Dependencies Source: https://github.com/bbc/audiowaveform/blob/master/ubuntu/README.md Installs essential Debian packaging tools required for building and publishing Ubuntu packages. ```bash sudo apt-get install devscripts dput cdbs ``` -------------------------------- ### Install audiowaveform Source: https://github.com/bbc/audiowaveform/blob/master/README.md Installs the audiowaveform application. Default installation paths are /usr/local/bin and /usr/local/share/man. Custom paths can be set via CMAKE_INSTALL_PREFIX. ```bash sudo make install # To change installation prefix: # cmake -D CMAKE_INSTALL_PREFIX=... .. ``` -------------------------------- ### Install audiowaveform on AlmaLinux 9 Source: https://github.com/bbc/audiowaveform/blob/master/rpm/README.md Installs audiowaveform RPM package on AlmaLinux 9, including enabling EPEL repository. ```bash sudo yum install -y epel-release sudo yum localinstall audiowaveform-1.5.1-1.el9.x86_64.rpm ``` -------------------------------- ### Install audiowaveform on Ubuntu Source: https://github.com/bbc/audiowaveform/blob/master/README.md Installs audiowaveform on Ubuntu using a PPA. Requires updating package lists and installing the package. ```Shell sudo add-apt-repository ppa:chris-needham/ppa sudo apt-get update sudo apt-get install audiowaveform ``` -------------------------------- ### Install audiowaveform on CentOS 7 Source: https://github.com/bbc/audiowaveform/blob/master/rpm/README.md Installs audiowaveform RPM package on CentOS 7, including enabling EPEL repository. ```bash sudo yum install -y epel-release sudo yum localinstall audiowaveform-1.5.1-1.el7.x86_64.rpm ``` -------------------------------- ### Install audiowaveform on Debian 12 Source: https://github.com/bbc/audiowaveform/blob/master/rpm/README.md Installs audiowaveform DEB package on Debian 12, handling dependencies. ```bash sudo apt-get update sudo dpkg -i audiowaveform-1.5.1-1-12.amd64.deb sudo apt-get -f install -y ``` -------------------------------- ### Install Google Test Framework Source: https://github.com/bbc/audiowaveform/blob/master/README.md Downloads and sets up the Google Test framework for unit testing audiowaveform. ```bash wget https://github.com/google/googletest/archive/release-1.12.1.tar.gz tar xzf release-1.12.1.tar.gz ln -s googletest-release-1.12.1 googletest ``` -------------------------------- ### Install audiowaveform on RHEL/CentOS/AlmaLinux Source: https://github.com/bbc/audiowaveform/blob/master/README.md Installs audiowaveform on RHEL-based systems by installing EPEL release and then the RPM package. ```Shell sudo yum install -y epel-release sudo yum localinstall audiowaveform-1.10.2-1.el8.x86_64.rpm ``` -------------------------------- ### Install Dependencies on Arch Linux Source: https://github.com/bbc/audiowaveform/blob/master/README.md Installs essential development packages for audiowaveform on Arch Linux using pacman. ```bash sudo pacman -S base-devel boost-libs gd \ libid3tag libmad libsndfile boost cmake git ``` -------------------------------- ### Install audiowaveform on Amazon Linux 2 Source: https://github.com/bbc/audiowaveform/blob/master/rpm/README.md Installs audiowaveform RPM package on Amazon Linux 2, including enabling EPEL repository. ```bash sudo amazon-linux-extras install epel sudo yum localinstall audiowaveform-1.5.1-1.amzn2.x86_64.rpm ``` -------------------------------- ### Install audiowaveform on CentOS 8 Source: https://github.com/bbc/audiowaveform/blob/master/rpm/README.md Installs audiowaveform RPM package on CentOS 8, including enabling EPEL repository. ```bash sudo yum install -y epel-release sudo yum localinstall audiowaveform-1.5.1-1.el8.x86_64.rpm ``` -------------------------------- ### Install Dependencies on macOS Source: https://github.com/bbc/audiowaveform/blob/master/README.md Installs required dependencies on macOS using Homebrew after installing Xcode and Homebrew. ```bash brew install cmake libmad libid3tag libsndfile gd brew install boost --with-c++11 ``` -------------------------------- ### CMake Project Configuration Source: https://github.com/bbc/audiowaveform/blob/master/CMakeLists.txt Sets up the CMake project, reads version information, and configures build settings. It handles minimum CMake version, project naming, and build type defaults. ```cmake cmake_minimum_required(VERSION 2.8.7...3.10) # Read version number from VERSION file and split into its component parts. file(STRINGS "VERSION" VERSION) string(REGEX MATCH "^([0-9]+)\.([0-9]+)\.([0-9]+)$" VERSION_PARTS ${VERSION}) set(VERSION_MAJOR ${CMAKE_MATCH_1}) set(VERSION_MINOR ${CMAKE_MATCH_2}) set(VERSION_PATCH ${CMAKE_MATCH_3}) message(STATUS "Building version ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}") # CMP0048: The project() command manages VERSION variables if(POLICY CMP0048) cmake_policy(SET CMP0048 NEW) project(audiowaveform VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) else() project(audiowaveform) endif() # CMP0167: The FindBoost module is removed. if(POLICY CMP0167) cmake_policy(SET CMP0167 NEW) endif() if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "Release") message(STATUS "Build type not specified: default is Release") endif() message(STATUS "Build type: ${CMAKE_BUILD_TYPE}") # Prepend our CMake modules directory list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/cmake/modules) message(STATUS "CMAKE_MODULE_PATH='${CMAKE_MODULE_PATH}'") include(SystemInfo) message(STATUS "Architecture: ${SYSTEM_ARCH}") ``` -------------------------------- ### Install Dependencies on SUSE Source: https://github.com/bbc/audiowaveform/blob/master/README.md Installs development packages for audiowaveform on SUSE Linux. Adjust boost version number as per availability. ```bash zypper install git cmake gcc-c++ libmad-devel \ libid3tag-devel libsndfile-devel gd-devel \ libboost_filesystem1_67_0-devel \ libboost_program_options1_67_0-devel \ libboost_regex1_67_0-devel ``` -------------------------------- ### Finding and Including Libraries Source: https://github.com/bbc/audiowaveform/blob/master/CMakeLists.txt Finds and includes necessary libraries such as LibGD, LibSndFile, LibMad, LibId3Tag, and Boost. It sets include directories and checks if the libraries were found. ```cmake find_package(LibGD REQUIRED) if(LIBGD_FOUND) message(STATUS "LIBGD_INCLUDE_DIRS='${LIBGD_INCLUDE_DIRS}'") message(STATUS "LIBGD_LIBRARIES=${LIBGD_LIBRARIES}") include_directories(${LIBGD_INCLUDE_DIRS}) endif(LIBGD_FOUND) find_package(LibSndFile REQUIRED) if(LIBSNDFILE_FOUND) message(STATUS "LIBSNDFILE_INCLUDE_DIRS='${LIBSNDFILE_INCLUDE_DIRS}'") message(STATUS "LIBSNDFILE_LIBRARIES=${LIBSNDFILE_LIBRARIES}") include_directories(${LIBSNDFILE_INCLUDE_DIRS}) endif(LIBSNDFILE_FOUND) find_package(LibMad REQUIRED) if(LIBMAD_FOUND) message(STATUS "LIBMAD_INCLUDE_DIRS='${LIBMAD_INCLUDE_DIRS}'") message(STATUS "LIBMAD_LIBRARIES=${LIBMAD_LIBRARIES}") include_directories(${LIBMAD_INCLUDE_DIRS}) endif(LIBMAD_FOUND) find_package(LibId3Tag REQUIRED) if(LIBID3TAG_FOUND) message(STATUS "LIBID3TAG_INCLUDE_DIRS='${LIBID3TAG_INCLUDE_DIRS}'") message(STATUS "LIBID3TAG_LIBRARIES=${LIBID3TAG_LIBRARIES}") include_directories(${LIBID3TAG_INCLUDE_DIRS}) endif(LIBID3TAG_FOUND) find_package(Boost 1.46.0 COMPONENTS program_options filesystem regex REQUIRED) if(Boost_FOUND) if(Boost_MAJOR_VERSION EQUAL 1 AND Boost_MINOR_VERSION LESS 69) find_package(Boost 1.46.0 COMPONENTS program_options filesystem regex system REQUIRED) endif() message(STATUS "Boost_INCLUDE_DIRS='${Boost_INCLUDE_DIRS}'") message(STATUS "Boost_LIBRARIES='${Boost_LIBRARIES}'") include_directories(${Boost_INCLUDE_DIRS}) endif(Boost_FOUND) ``` -------------------------------- ### audiowaveform Packaging Options Source: https://github.com/bbc/audiowaveform/blob/master/rpm/README.md Command-line options for the audiowaveform packaging scripts to specify version, commit, architecture, and Debian release number. ```shell -v Sets the audiowaveform package version, e.g., 1.8.0 -c Sets the git commit or tag used to build the package -a Sets the platform architecture to build, e.g., x86_64, amd64, aarch64, arm64, etc. Note that these values vary by Linux distribution -d Sets the debian release number, for the build_deb_debian.sh script, e.g., 10, 11, 12, etc. ``` -------------------------------- ### Documentation Generation Source: https://github.com/bbc/audiowaveform/blob/master/CMakeLists.txt Configures custom commands to generate gzipped man pages for the audiowaveform executable (audiowaveform.1.gz and audiowaveform.5.gz) using the source man files. A custom target 'doc' is created to depend on these generated files. ```cmake file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/doc) add_custom_command( OUTPUT ${PROJECT_BINARY_DIR}/doc/audiowaveform.1.gz COMMAND gzip -c -9 ${PROJECT_SOURCE_DIR}/doc/audiowaveform.1 > ${PROJECT_BINARY_DIR}/doc/audiowaveform.1.gz DEPENDS ${PROJECT_SOURCE_DIR}/doc/audiowaveform.1 ) add_custom_command( OUTPUT ${PROJECT_BINARY_DIR}/doc/audiowaveform.5.gz COMMAND gzip -c -9 ${PROJECT_SOURCE_DIR}/doc/audiowaveform.5 > ${PROJECT_BINARY_DIR}/doc/audiowaveform.5.gz DEPENDS ${PROJECT_SOURCE_DIR}/doc/audiowaveform.5 ) add_custom_target( doc DEPENDS ${PROJECT_BINARY_DIR}/doc/audiowaveform.1.gz ${PROJECT_BINARY_DIR}/doc/audiowaveform.5.gz ) add_dependencies(audiowaveform doc) ``` -------------------------------- ### Install audiowaveform on Debian Source: https://github.com/bbc/audiowaveform/blob/master/README.md Installs audiowaveform on Debian by downloading and installing a .deb package. Requires updating package lists and fixing broken dependencies. ```Shell sudo apt-get update sudo dpkg -i audiowaveform-1.10.2-1-13.amd64.deb sudo apt-get -f install -y ``` -------------------------------- ### Install Dependencies on CentOS 7 Source: https://github.com/bbc/audiowaveform/blob/master/README.md Installs EPEL repository and necessary development packages for building audiowaveform on CentOS 7, including libmad-devel. ```bash sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm sudo yum install -y --enablerepo=epel libmad-devel sudo yum install -y redhat-lsb-core rpm-build wget \ git make cmake gcc-c++ libid3tag-devel libsndfile-devel gd-devel boost-devel ``` -------------------------------- ### Dependency Configuration for Static Builds Source: https://github.com/bbc/audiowaveform/blob/master/CMakeLists.txt Configures build settings for static linking, including library suffixes and linker flags, with specific adjustments for Windows and macOS. ```cmake if(BUILD_STATIC) message(STATUS "Static build") if(WIN32) set(CMAKE_FIND_LIBRARY_SUFFIXES .lib) else() set(Boost_USE_STATIC_LIBS ON) set(Boost_USE_STATIC_RUNTIME OFF) set(CMAKE_FIND_LIBRARY_SUFFIXES .a) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -no-pie") if(APPLE) message(STATUS "Set ZLIB_ROOT for MacOS builds") cmake_policy(SET CMP0074 NEW) set(ZLIB_ROOT "/usr/local/opt/zlib") endif() endif() endif(BUILD_STATIC) ``` -------------------------------- ### Package Configuration Source: https://github.com/bbc/audiowaveform/blob/master/CMakeLists.txt Sets various package properties for CMake, including name, vendor, version, contact, and description. It also specifies license and readme files, and configures Debian and RPM package specific details. ```cmake set(CPACK_PACKAGE_NAME "audiowaveform") set(CPACK_PACKAGE_VENDOR "Chris Needham") set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR}) set(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR}) set(CPACK_PACKAGE_VERSION_PATCH ${VERSION_PATCH}) SET(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") set(CPACK_PACKAGE_CONTACT "Chris Needham ") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Audio waveform data and image generator") set(CPACK_PACKAGE_DESCRIPTION "Generates audio waveform data that can be used to render waveform images") set(CPACK_RESOURCE_FILE_LICENSE "${audiowaveform_SOURCE_DIR}/COPYING") set(CPACK_RESOURCE_FILE_README "${audiowaveform_SOURCE_DIR}/README.md") set(PACKAGE_RELEASE_NUMBER 1) set(CPACK_PROJECT_CONFIG_FILE "${CMAKE_SOURCE_DIR}/CPackConfig.txt") # Debian package config set(CPACK_DEBIAN_PACKAGE_SECTION "sound") set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional") set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "${SYSTEM_ARCH}") # With CMake 3.15 and later, use Boost_VERSION instead set(BOOST_VERSION_STRING "${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}") set(CPACK_DEBIAN_PACKAGE_DEPENDS "libmad0 (>=0.15.1), libid3tag0 (>=0.15.1), libsndfile1 (>= 1.0.25), libgd3 (>= 2.0.35) | libgd2-xpm (>= 2.0.35), libboost-program-options${BOOST_VERSION_STRING}, libboost-filesystem${BOOST_VERSION_STRING}, libboost-regex${BOOST_VERSION_STRING}") # http://www.debian.org/doc/manuals/debian-faq/ch-pkg_basics.en.html#s-pkgname # The Debian binary package file names conform to the following convention: # _-_.deb set(CPACK_DEB_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}-${PACKAGE_RELEASE_NUMBER}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}") # RPM package config set(CPACK_RPM_PACKAGE_GROUP "Applications/Multimedia") set(CPACK_RPM_PACKAGE_ARCHITECTURE "${SYSTEM_ARCH}") set(CPACK_RPM_PACKAGE_REQUIRES "libmad >= 0.15.1, libsndfile >= 1.0.25, libid3tag >= 0.15.0, gd >= 2.0.35, boost-program-options >= ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}, boost-filesystem >= ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}, boost-regex >= ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}") set(CPACK_RPM_PACKAGE_LICENSE "GPLv3") set(CPACK_RPM_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${PACKAGE_RELEASE_NUMBER}.${SYSTEM_ARCH}") include(CPack) ``` -------------------------------- ### Build Dependencies on Fedora Source: https://github.com/bbc/audiowaveform/blob/master/README.md Installs the necessary development packages on Fedora for building audiowaveform from source. ```Shell sudo dnf install git make cmake gcc-c++ libmad-devel \ libid3tag-devel libsndfile-devel gd-devel boost-devel ``` -------------------------------- ### Install audiowaveform on macOS with Homebrew Source: https://github.com/bbc/audiowaveform/blob/master/README.md Installs audiowaveform on macOS using the Homebrew package manager. ```Shell brew install audiowaveform ``` -------------------------------- ### Install Dependencies on Ubuntu Source: https://github.com/bbc/audiowaveform/blob/master/README.md Installs development packages required for building audiowaveform on Ubuntu. For Ubuntu 12.04, libgd-dev should be replaced with libgd2-xpm-dev. ```bash sudo apt-get install git make cmake gcc g++ libmad0-dev \ libid3tag0-dev libsndfile1-dev libgd-dev libboost-filesystem-dev \ libboost-program-options-dev \ libboost-regex-dev ``` -------------------------------- ### audiowaveform Packaging Scripts Source: https://github.com/bbc/audiowaveform/blob/master/rpm/README.md Scripts for building DEB packages for Debian and RPM packages for Red Hat-based systems (CentOS, AlmaLinux, Amazon Linux). Supports different architectures. ```shell build_deb_debian.sh build_rpm_centos7.sh build_rpm_centos8.sh build_rpm_almalinux9.sh build_rpm_amazon_linux_2.sh ``` -------------------------------- ### Install Dependencies on Alpine Linux Source: https://github.com/bbc/audiowaveform/blob/master/README.md Installs development packages for audiowaveform on Alpine Linux. For static builds, additional static libraries and FLAC compilation are required. ```bash apk add git make cmake gcc g++ libmad-dev \ libid3tag-dev libsndfile-dev gd-dev boost-dev \ libgd libpng-dev zlib-dev # For static build: apk add zlib-static libpng-static boost-static # Compile FLAC manually for static build: apk add autoconf automake libtool gettext wget https://github.com/xiph/flac/archive/1.3.3.tar.gz tar xzf 1.3.3.tar.gz cd flac-1.3.3 ./autogen.sh ./configure --enable-shared=no make make install ``` -------------------------------- ### Docker Usage Example Source: https://github.com/bbc/audiowaveform/blob/master/README.md Pulls the audiowaveform Docker image and provides an alias for running it with volume mounting and working directory configuration. ```Shell docker pull realies/audiowaveform alias awf='docker run --rm -v `pwd`:/tmp -w /tmp realies/audiowaveform' awf -i input.wav -o output.png ``` -------------------------------- ### Source File Configuration Source: https://github.com/bbc/audiowaveform/blob/master/CMakeLists.txt Includes the 'src' directory for header file searching and configures a header file ('Config.h') from a template ('Config.h.in') to pass CMake settings into the source code. ```cmake include_directories(src) # Configure a header file to pass some of the CMake settings to the source code. configure_file( "${PROJECT_SOURCE_DIR}/src/Config.h.in" "${PROJECT_BINARY_DIR}/Config.h" ) # Add the binary directory to the search path for include files so that we find ``` -------------------------------- ### Publish audiowaveform to Launchpad Source: https://github.com/bbc/audiowaveform/blob/master/ubuntu/README.md Commands to build and publish the audiowaveform source package to Ubuntu Launchpad. Ensure package.sh is updated with the correct version and target Ubuntu releases. ```bash ./package.sh checkout ./package.sh sourcepackage ./package.sh debs ./package.sh publish ``` -------------------------------- ### Build Executable and Tests Source: https://github.com/bbc/audiowaveform/blob/master/CMakeLists.txt Defines the main executable 'audiowaveform' and the test executable 'audiowaveform_tests'. It lists all source files and links necessary libraries including external dependencies like libsndfile, libgd, libmad, libid3tag, and Boost. It also configures Google Test for running unit tests. ```cmake set(MODULES src/AudioFileReader.cpp src/AudioLoader.cpp src/AudioProcessor.cpp src/BStdFile.cpp src/DurationCalculator.cpp src/Error.cpp src/FileFormat.cpp src/FileHandle.cpp src/FileUtil.cpp src/GdImageRenderer.cpp src/Log.cpp src/MathUtil.cpp src/Mp3AudioFileReader.cpp src/Options.cpp src/OptionHandler.cpp src/ProgressReporter.cpp src/Rgba.cpp src/SndFileAudioFileReader.cpp src/TimeUtil.cpp src/VectorAudioFileReader.cpp src/WaveformBuffer.cpp src/WaveformColors.cpp src/WaveformGenerator.cpp src/WaveformRescaler.cpp src/WaveformUtil.cpp src/WavFileWriter.cpp src/madlld-1.1p1/bstdfile.c src/pdjson/pdjson.c ) set(SRCS src/Main.cpp ${MODULES} ) add_executable(audiowaveform ${SRCS}) # Specify libraries to link against. set(LIBS ${LIBSNDFILE_LIBRARIES} ${LIBGD_LIBRARIES} ${LIBMAD_LIBRARIES} ${LIBID3TAG_LIBRARIES} ${Boost_LIBRARIES} ) target_link_libraries(audiowaveform ${LIBS}) if(ENABLE_TESTS) enable_testing() # Use EXCLUDE_FROM_ALL to prevent installing googletest headers as part of # 'make install'. set(BUILD_GMOCK 1) add_subdirectory(googletest EXCLUDE_FROM_ALL) set(TESTS test/FileFormatTest.cpp test/FileUtilTest.cpp test/GdImageRendererTest.cpp test/MathUtilTest.cpp test/Mp3AudioFileReaderTest.cpp test/OptionsTest.cpp test/OptionHandlerTest.cpp test/ProgressReporterTest.cpp test/RgbaTest.cpp test/SndFileAudioFileReaderTest.cpp test/TimeUtilTest.cpp test/WavFileWriterTest.cpp test/WaveformBufferTest.cpp test/WaveformGeneratorTest.cpp test/WaveformRescalerTest.cpp test/util/FileDeleter.cpp test/util/FileUtil.cpp test/util/Streams.cpp ) include_directories(${gtest_SOURCE_DIR}/include ${gmock_SOURCE_DIR}/include) set(TEST_LIBS gmock_main) add_executable(audiowaveform_tests ${MODULES} ${TESTS}) target_link_libraries(audiowaveform_tests ${LIBS} ${TEST_LIBS}) add_test(audiowaveform_tests audiowaveform_tests) else() message(STATUS "Unit tests disabled") endif() ``` -------------------------------- ### Preparing a New Release Source: https://github.com/bbc/audiowaveform/blob/master/CONTRIBUTING.md Steps for preparing and publishing a new release, including version incrementing, changelog updates, tagging, and packaging for different platforms. ```Release Process # Increment version in VERSION file # Update CHANGELOG.md # Update debian/changelog git push origin master --tags # Create GitHub Release # Publish source package to Launchpad # Update Homebrew formula # Compile Windows binaries # Build RPM and Debian packages ``` -------------------------------- ### Install audiowaveform on Amazon Linux 2 Source: https://github.com/bbc/audiowaveform/blob/master/README.md Installs audiowaveform on Amazon Linux 2 by enabling EPEL and installing the RPM package from a URL. ```Shell sudo amazon-linux-extras install epel sudo yum install \ https://github.com/bbc/audiowaveform/releases/download/1.10.1/audiowaveform-1.10.1-1.amzn2.x86_64.rpm ``` -------------------------------- ### Install audiowaveform on Arch Linux (AUR) Source: https://github.com/bbc/audiowaveform/blob/master/README.md Installs audiowaveform on Arch Linux from the AUR (Arch User Repository). ```Shell yay -S audiowaveform ``` -------------------------------- ### Example Audiowaveform Data (JSON) Source: https://github.com/bbc/audiowaveform/blob/master/doc/DataFormat.md An example of a short waveform data file represented in JSON format, illustrating the structure and typical values. ```json { "version": 2, "channels": 2, "sample_rate": 48000, "samples_per_pixel": 512, "bits": 8, "length": 3, "data": [-65,63,-66,64,-40,41,-39,45,-55,43,-55,44] } ``` -------------------------------- ### Run audiowaveform Source: https://github.com/bbc/audiowaveform/blob/master/README.md Executes the audiowaveform program. The --help option displays available command-line arguments. ```bash audiowaveform --help ``` -------------------------------- ### Testing and Merging Source: https://github.com/bbc/audiowaveform/blob/master/CONTRIBUTING.md Details on adding test cases and the merging strategy, which may involve squashing commits. ```Make make test ``` -------------------------------- ### Example: Enforcing Value Separation Source: https://github.com/bbc/audiowaveform/blob/master/src/pdjson/README.md An example demonstrating how to use `json_source_peek`, `json_source_get`, and `json_isspace` to enforce specific separation rules between JSON values, such as requiring at least one newline. ```c enum json_type e = json_next(json); if (e == JSON_DONE) { int c = '\0'; while (json_isspace(c = json_source_peek(json))) { json_source_get(json); if (c == '\n') break; } if (c != '\n' && c != EOF) { /* error */ } json_reset(json); } ``` -------------------------------- ### Commit Message Guidelines Source: https://github.com/bbc/audiowaveform/blob/master/CONTRIBUTING.md Guidance on writing effective commit messages, referencing external style guides but not enforcing Conventional Commits. ```Git Commit Messages # Please follow these guidelines: https://chris.beams.io/posts/git-commit/ # Do not use Conventional Commits style. ```