Vorbis Documentation

repository·main·Indexed 20 days ago

https://github.com/xiph/vorbis

A public domain, general-purpose audio encoding format. This repository provides core C implementations including libvorbis (the core specification), libvorbisfile (convenience library for audio file operations), and libvorbisenc (programmatic interface for audio encoding). Requires libogg as a dependency.

Tokens
981
Snippets
4
Records
7
Agent score
19%

What's inside Vorbis

  1. Overview of Vorbis libraries

    main

    Vorbis is a public domain, general-purpose audio and music encoding format. The repository provides several libraries for working with the format:

    • libvorbis: The core BSD-style implementation of the Vorbis specification.
    • libvorbisfile: A convenience library built on top of libvorbis designed to simplify common audio file operations.
    • libvorbisenc: A library providing a simple, programmatic interface for setting up audio encoding.

    Note: You must have libogg installed to compile these libraries, as it is a required dependency.

  2. Build Vorbis using CMake

    main

    Vorbis supports CMake for generating native projects across different platforms.

    Important: By default, CMake generates projects that build static libraries. To build dynamic (shared) libraries, you must pass the -DBUILD_SHARED_LIBS=1 flag.

    Platform Specifics

    • Windows: Use a Visual Studio generator (e.g., cmake -G "Visual Studio 12 2013" .).
    • macOS: Use the Xcode generator. To build as a framework, use -DBUILD_FRAMEWORK=1.
    • Linux: Use the default Makefile generator.
    # Generate projects for dynamic libraries
    cmake -G YOUR-PROJECT-GENERATOR -DBUILD_SHARED_LIBS=1 .
    
    # macOS Framework build
    cmake -G Xcode -DBUILD_FRAMEWORK=1 .
    
    # Linux build
    cmake .
    make
  3. Build Vorbis from tarball distributions

    main

    If you are using a pre-packaged tarball distribution, the configure script is already provided. Run:

    1. ./configure
    2. make
    3. (Optional) make install as root.
    ./configure
    make
    # as root if desired:
    make install
  4. Build Vorbis from development source (Git)

    main

    To build from the development source, you need autoconf, automake, libtool, and pkg-config. Use the following sequence to generate the build system, configure, and compile:

    1. Run ./autogen.sh to generate the configure script.
    2. Run ./configure to prepare the build.
    3. Run make to compile.
    4. (Optional) Run sudo make install to install libraries to /usr/local/lib, headers to /usr/local/include, and manpages to /usr/local/man.
    ./autogen.sh
    ./configure
    make
    # as root if desired:
    make install
  5. Configure libogg dependency for libvorbis on Win32 (VS2005)

    main

    When building libvorbis using the Visual Studio 2005 project files on Windows, you must have libogg compiled beforehand. Because the build system does not perform automatic library detection, you must ensure the versioning matches.

    If your libogg directory is named with a version suffix (e.g., libogg-1.1.3), you have two options to ensure libvorbis can find it:

    1. Rename the directory: Rename the libogg-x.x.x folder to simply libogg.
    2. Update project properties: Open libogg.vsprops in a text editor and manually update the LIBOGG_VERSION variable to match your installed version (e.g., set it to 1.1.3).
    // Option 1: Rename directory
    libogg-1.1.3 -> libogg
    
    // Option 2: Edit libogg.vsprops
    LIBOGG_VERSION = "1.1.3"
  6. Configure libogg dependency for libvorbis build

    main

    The libvorbis build process does not automatically detect the version of libogg. If you have both libraries in the same directory, you must ensure the versioning matches.

    To resolve versioning issues, perform one of the following:

    1. Rename the directory: Rename your libogg-[version] directory to exactly libogg.
    2. Update version properties: Open the libogg.vsprops file in a text editor and ensure the LIBOGG_VERSION property is set to match your installed version (e.g., 1.1.3).