Voice

voice is a program that plays music and sounds based on commands it reads from stdin. It writes status information on its stdout that can be used for more sophisticated control. It's intended to be a way for simple games or programs to play audio without having to deal with more complicated sound APIs, possibly used together with software like plumb and animator.

Command line arguments

Syntax

voice reads input line by line. One line can contain zero or more commands. Commands are composed of tokens separated by whitespace. If there are multiple commands given in a single line, they must be separated by a semicolon ';'. A hash character '#' starts a comment where the rest of the line is ignored.

Tokens are strings that can be given in one of three ways:

Commands

Music

voice supports any music format that the sdl_mixer library supports (like .ogg or tracker formats like .xm and .mod depending on how the library was compiled). Multiple music files can be loaded at once, but only one track can be played.

Sound effects

voice supports any sound format that the sdl_mixer library supports. Multiple sounds can be loaded and played at once, sound effects can be looped and their simulated position (over stereo channels) can be controlled.

Control