# API documentation for libmpg123, libout123, and libsyn123

Note: This API doc is automatically generated from the current development version that you can get via Subversion or as a daily snapshot from http://mpg123.org/snapshot. There may be differences (additions) compared to the latest stable release. See NEWS.libmpg123, NEWS.libout123, NEWS.libsyn123, and the overall NEWS file on libmpg123 versions and important changes between them.
Let me emphasize that the policy for the lib*123 family is to always stay backwards compatible -- only additions are planned (and it's not yet planned to change the plans;-).
Macros | Typedefs | Enumerations | Functions
out123.h File Reference
`#include <stddef.h>`
`#include "fmt123.h"`

Go to the source code of this file.

## Macros
#define | OUT123_API_VERSION 5
#define | OUT123_PATCHLEVEL 2
#define | MPG123_EXPORT
#define | out123_param_int(ao, code, value) out123_param((ao), (code), (value), 0., NULL)
#define | out123_param_float(ao, code, value) out123_param((ao), (code), 0, (value), NULL)
#define | out123_param_string(ao, code, value) out123_param((ao), (code), 0, 0., (value))
#define | out123_getparam_int(ao, code, value) out123_getparam((ao), (code), (value), NULL, NULL)
#define | out123_getparam_float(ao, code, value) out123_getparam((ao), (code), NULL, (value), NULL)
#define | out123_getparam_string(ao, code, value) out123_getparam((ao), (code), NULL, NULL, (value))

## Typedefs
typedef struct out123_struct | out123_handle

## Enumerations
enum | out123_parms { OUT123_FLAGS = 1, OUT123_PRELOAD, OUT123_GAIN, OUT123_VERBOSE, OUT123_DEVICEBUFFER, OUT123_PROPFLAGS, OUT123_NAME, OUT123_BINDIR, OUT123_ADD_FLAGS, OUT123_REMOVE_FLAGS }
enum | out123_flags { OUT123_HEADPHONES = 0x01, OUT123_INTERNAL_SPEAKER = 0x02, OUT123_LINE_OUT = 0x04, OUT123_QUIET = 0x08, OUT123_KEEP_PLAYING = 0x10, OUT123_MUTE = 0x20 }
enum | out123_propflags { OUT123_PROP_LIVE = 0x01, OUT123_PROP_PERSISTENT = 0x02 }
enum | out123_error { OUT123_ERR = -1, OUT123_OK = 0, OUT123_DOOM, OUT123_BAD_DRIVER_NAME, OUT123_BAD_DRIVER, OUT123_NO_DRIVER, OUT123_NOT_LIVE, OUT123_DEV_PLAY, OUT123_DEV_OPEN, OUT123_BUFFER_ERROR, OUT123_MODULE_ERROR, OUT123_ARG_ERROR, OUT123_BAD_PARAM, OUT123_SET_RO_PARAM, OUT123_BAD_HANDLE, OUT123_NOT_SUPPORTED, OUT123_DEV_ENUMERATE, OUT123_ERRCOUNT }

## Functions
const MPG123_EXPORT char * | out123_distversion (unsigned int *major, unsigned int *minor, unsigned int *patch)
MPG123_EXPORT unsigned int | out123_libversion (unsigned int *patch)
MPG123_EXPORT out123_handle * | out123_new (void)
MPG123_EXPORT void | out123_del (out123_handle *ao)
MPG123_EXPORT void | out123_free (void *ptr)
const MPG123_EXPORT char * | out123_strerror (out123_handle *ao)
MPG123_EXPORT int | out123_errcode (out123_handle *ao)
const MPG123_EXPORT char * | out123_plain_strerror (int errcode)
MPG123_EXPORT int | out123_set_buffer (out123_handle *ao, size_t buffer_bytes)
MPG123_EXPORT int | out123_param (out123_handle *ao, enum out123_parms code, long value, double fvalue, const char *svalue)
MPG123_EXPORT int | out123_param2 (out123_handle *ao, int code, long value, double fvalue, const char *svalue)
MPG123_EXPORT int | out123_getparam (out123_handle *ao, enum out123_parms code, long *ret_value, double *ret_fvalue, char **ret_svalue)
MPG123_EXPORT int | out123_getparam2 (out123_handle *ao, int code, long *ret_value, double *ret_fvalue, char **ret_svalue)
MPG123_EXPORT int | out123_param_from (out123_handle *ao, out123_handle *from_ao)
MPG123_EXPORT int | out123_drivers (out123_handle *ao, char ***names, char ***descr)
MPG123_EXPORT int | out123_devices (out123_handle *ao, const char *driver, char ***names, char ***descr, char **active_driver)
MPG123_EXPORT void | out123_stringlists_free (char **name, char **descr, int count)
MPG123_EXPORT int | out123_open (out123_handle *ao, const char *driver, const char *device)
MPG123_EXPORT int | out123_driver_info (out123_handle *ao, char **driver, char **device)
MPG123_EXPORT void | out123_close (out123_handle *ao)
MPG123_EXPORT int | out123_encodings (out123_handle *ao, long rate, int channels)
MPG123_EXPORT int | out123_encsize (int encoding)
MPG123_EXPORT int | out123_formats (out123_handle *ao, const long *rates, int ratecount, int minchannels, int maxchannels, struct mpg123_fmt **fmtlist)
MPG123_EXPORT int | out123_enc_list (int **enclist)
MPG123_EXPORT int | out123_enc_byname (const char *name)
const MPG123_EXPORT char * | out123_enc_name (int encoding)
const MPG123_EXPORT char * | out123_enc_longname (int encoding)
MPG123_EXPORT int | out123_start (out123_handle *ao, long rate, int channels, int encoding)
MPG123_EXPORT void | out123_pause (out123_handle *ao)
MPG123_EXPORT void | out123_continue (out123_handle *ao)
MPG123_EXPORT void | out123_stop (out123_handle *ao)
MPG123_EXPORT size_t | out123_play (out123_handle *ao, void *buffer, size_t bytes)
MPG123_EXPORT void | out123_drop (out123_handle *ao)
MPG123_EXPORT void | out123_drain (out123_handle *ao)
MPG123_EXPORT void | out123_ndrain (out123_handle *ao, size_t bytes)
MPG123_EXPORT size_t | out123_buffered (out123_handle *ao)
MPG123_EXPORT int | out123_getformat (out123_handle *ao, long *rate, int *channels, int *encoding, int *framesize)

## Detailed Description

The header file for the libout123 audio output facility.

Definition in file out123.h.

## Macro Definition Documentation

## ◆ OUT123_API_VERSION

#define OUT123_API_VERSION 5

A macro to check at compile time which set of API functions to expect. This must be incremented at least each time a new symbol is added to the header.

Definition at line 21 of file out123.h.

## ◆ OUT123_PATCHLEVEL

#define OUT123_PATCHLEVEL 2

library patch level at client build time

Definition at line 23 of file out123.h.

## ◆ MPG123_EXPORT

#define MPG123_EXPORT

Defines needed for MS Visual Studio(tm) DLL builds. Every public function must be prefixed with MPG123_EXPORT. When building the DLL ensure to define BUILD_MPG123_DLL. This makes the function accessible for clients and includes it in the import library which is created together with the DLL. When consuming the DLL ensure to define LINK_MPG123_DLL which imports the functions from the DLL.

Definition at line 53 of file out123.h.