Skip to content

kallisti5/libgroove

 
 

Repository files navigation

libgroove

Audio dispatching library. Generic sink-based interface. Provides decoding, encoding, resampling, and gain adjustment. Perfect for the backend of a music player.

Features

  • Uses libav for robust decoding and encoding.
  • Add and remove entries on a playlist for gapless playback.
  • Supports idempotent pause, play, and seek.
  • Per-playlist-item gain adjustment so you can implement loudness compensation without audio glitches.
  • Read and write metadata tags.
  • Extensible sink-based interface. A sink provides resampling and keeps its buffer full. Types of sinks:
    • raw sink - provides reference-counted raw audio buffers you can do whatever you like with. For example a real-time audio visualization. All other sink types are built on top of this one.
    • player sink - sends frames to a sound device.
    • encoder sink - provides encoded audio buffers. For example you could use this to create an HTTP audio stream.
    • loudness scanner sink - uses the EBU R 128 standard to detect loudness. The values it produces are compatible with ReplayGain.
    • fingerprint sink - uses chromaprint to generate unique song IDs that can be used with the acoustid service.
  • Thread-safe.
  • Example programs included:
    • playlist - play a series of songs with gapless playback
    • metadata - read or update song metadata
    • replaygain - report the suggested replaygain for a set of files
    • transcode - transcode one or more files into one output file
    • fingerprint - generate acoustid fingerprints for one or more files

Dependencies

You will need these to compile libgroove. Some dependencies are bundled so that you can still compile if they cannot be found on your system.

Installation

Pre-Built Packages

  • Ubuntu PPA

    sudo apt-add-repository ppa:andrewrk/libgroove
    sudo apt-get update
    sudo apt-get install libgroove-dev libgrooveplayer-dev libgrooveloudness-dev libgroovefingerprinter-dev
    
  • Debian experimental

From Source

  1. mkdir build && cd build && cmake ../
  2. Verify that the configure output is to your liking.
  3. make
  4. sudo make install

Documentation

  • Check out the example programs in the example folder.
  • Read header files for the relevant APIs:
    • groove/groove.h
      • globals
      • GrooveFile
      • GroovePlaylist
      • GrooveBuffer
      • GrooveSink
    • groove/encoder.h
      • GrooveEncoder
    • grooveplayer/player.h
      • GroovePlayer
    • grooveloudness/loudness.h
      • GrooveLoudnessDetector
    • groovefingerprinter/fingerprinter.h
      • GrooveFingerprinter
  • Join #libgroove on irc.freenode.org and ask questions.

Projects Using libgroove

Feel free to make a pull request adding yours to this list.

  • waveform - generate a waveform visualization in PNG format.
  • TrenchBowl - a simple Qt GUI on top of libgroove.
  • node-groove - Node.js bindings to libgroove.
    • Groove Basin - lazy multi-core replaygain scanning, web interface inspired by Amarok 1.4, http streaming, upload, download, dynamic playlist mode

About

audio dispatching library

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 99.4%
  • C++ 0.6%