You could access this page securely.

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;-).
out123.h
Go to the documentation of this file.
1 /*
2  out123: audio output interface
3 
4  copyright 1995-2016 by the mpg123 project,
5  free software under the terms of the LGPL 2.1
6 
7  see COPYING and AUTHORS files in distribution or http://mpg123.org
8  initially written as audio.h by Michael Hipp, reworked into out123 API
9  by Thomas Orgis
10 */
11 
12 #ifndef _OUT123_H_
13 #define _OUT123_H_
14 
17 /* We only need size_t definition. */
18 #include <stddef.h>
19 
20 /* Common audio encoding specification, including a macro for getting
21  * size of encoded samples in bytes. Said macro is still hardcoded
22  * into out123_encsize(). Relying on this one may help an old program
23  * know sizes of encodings added to fmt123.h later on.
24  * If you don't care, just use the macro.
25  */
26 #include <fmt123.h>
27 
32 #define OUT123_API_VERSION 2
33 
34 #ifndef MPG123_EXPORT
35 
42 #ifdef BUILD_MPG123_DLL
43 /* The dll exports. */
44 #define MPG123_EXPORT __declspec(dllexport)
45 #else
46 #ifdef LINK_MPG123_DLL
47 /* The exe imports. */
48 #define MPG123_EXPORT __declspec(dllimport)
49 #else
50 /* Nothing on normal/UNIX builds */
51 #define MPG123_EXPORT
52 #endif
53 #endif
54 #endif
55 
56 #ifdef __cplusplus
57 extern "C" {
58 #endif
59 
91 struct out123_struct;
93 typedef struct out123_struct out123_handle;
94 
97 {
122 };
123 
126 {
130 , OUT123_QUIET = 0x08
141 , OUT123_MUTE = 0x20
142 };
143 
146 {
155 };
156 
164 
169 void out123_del(out123_handle *ao);
170 
176 MPG123_EXPORT void out123_free(void *ptr);
177 
185 {
187 , OUT123_OK = 0
204 };
205 
212 const char* out123_strerror(out123_handle *ao);
213 
222 
228 const char* out123_plain_strerror(int errcode);
229 
262 int out123_set_buffer(out123_handle *ao, size_t buffer_bytes);
263 
276 int out123_param( out123_handle *ao, enum out123_parms code
277 , long value, double fvalue, const char *svalue );
278 #define out123_param_int(ao, code, value) \
279  out123_param((ao), (code), (value), 0., NULL)
280 #define out123_param_float(ao, code, value) \
281  out123_param((ao), (code), 0, (value), NULL)
282 #define out123_param_string(ao, code, value) \
283  out123_param((ao), (code), 0, 0., (value))
284 
296 int out123_getparam( out123_handle *ao, enum out123_parms code
297 , long *ret_value, double *ret_fvalue, char* *ret_svalue );
298 #define out123_getparam_int(ao, code, value) \
299  out123_getparam((ao), (code), (value), NULL, NULL)
300 #define out123_getparam_float(ao, code, value) \
301  out123_getparam((ao), (code), NULL, (value), NULL)
302 #define out123_getparam_string(ao, code, value) \
303  out123_getparam((ao), (code), NULL, NULL, (value))
304 
312 
326 int out123_drivers(out123_handle *ao, char ***names, char ***descr);
327 
340 int out123_open(out123_handle *ao, const char* driver, const char* device);
341 
354 int out123_driver_info(out123_handle *ao, char **driver, char **device);
355 
365 void out123_close(out123_handle *ao);
366 
389 int out123_encodings(out123_handle *ao, long rate, int channels);
390 
394 MPG123_EXPORT int out123_encsize(int encoding);
395 
425 int out123_formats( out123_handle *ao, const long *rates, int ratecount
426  , int minchannels, int maxchannels
427  , struct mpg123_fmt **fmtlist );
428 
435 int out123_enc_list(int **enclist);
436 
442 int out123_enc_byname(const char *name);
443 
449 const char* out123_enc_name(int encoding);
450 
456 const char* out123_enc_longname(int encoding);
457 
472 , long rate, int channels, int encoding );
473 
482 void out123_pause(out123_handle *ao);
483 
496 
504 void out123_stop(out123_handle *ao);
505 
523 size_t out123_play( out123_handle *ao
524  , void *buffer, size_t bytes );
525 
536 void out123_drop(out123_handle *ao);
537 
546 void out123_drain(out123_handle *ao);
547 
566 void out123_ndrain(out123_handle *ao, size_t bytes);
567 
575 size_t out123_buffered(out123_handle *ao);
576 
589 , long *rate, int *channels, int *encoding, int *framesize );
590 
591 /* @} */
592 
593 #ifdef __cplusplus
594 }
595 #endif
596 
597 #endif
598 
MPG123_EXPORT size_t out123_play(out123_handle *ao, void *buffer, size_t bytes)
MPG123_EXPORT int out123_formats(out123_handle *ao, const long *rates, int ratecount, int minchannels, int maxchannels, struct mpg123_fmt **fmtlist)
struct out123_struct out123_handle
Definition: out123.h:93
out123_propflags
Definition: out123.h:145
MPG123_EXPORT int out123_enc_byname(const char *name)
MPG123_EXPORT void out123_pause(out123_handle *ao)
MPG123_EXPORT void out123_ndrain(out123_handle *ao, size_t bytes)
MPG123_EXPORT int out123_open(out123_handle *ao, const char *driver, const char *device)
out123_error
Definition: out123.h:184
MPG123_EXPORT int out123_enc_list(int **enclist)
MPG123_EXPORT int out123_encsize(int encoding)
MPG123_EXPORT int out123_errcode(out123_handle *ao)
MPG123_EXPORT int out123_drivers(out123_handle *ao, char ***names, char ***descr)
MPG123_EXPORT int out123_set_buffer(out123_handle *ao, size_t buffer_bytes)
MPG123_EXPORT int out123_driver_info(out123_handle *ao, char **driver, char **device)
MPG123_EXPORT void out123_drain(out123_handle *ao)
MPG123_EXPORT void out123_close(out123_handle *ao)
MPG123_EXPORT int out123_param_from(out123_handle *ao, out123_handle *from_ao)
out123_flags
Definition: out123.h:125
MPG123_EXPORT void out123_stop(out123_handle *ao)
MPG123_EXPORT const char * out123_plain_strerror(int errcode)
MPG123_EXPORT void out123_del(out123_handle *ao)
MPG123_EXPORT void out123_drop(out123_handle *ao)
MPG123_EXPORT const char * out123_strerror(out123_handle *ao)
MPG123_EXPORT int out123_getformat(out123_handle *ao, long *rate, int *channels, int *encoding, int *framesize)
out123_parms
Definition: out123.h:96
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_start(out123_handle *ao, long rate, int channels, int encoding)
MPG123_EXPORT void out123_free(void *ptr)
#define MPG123_EXPORT
Definition: out123.h:51
MPG123_EXPORT out123_handle * out123_new(void)
MPG123_EXPORT void out123_continue(out123_handle *ao)
MPG123_EXPORT int out123_param(out123_handle *ao, enum out123_parms code, long value, double fvalue, const char *svalue)
MPG123_EXPORT int out123_encodings(out123_handle *ao, long rate, int channels)
MPG123_EXPORT const char * out123_enc_longname(int encoding)
MPG123_EXPORT size_t out123_buffered(out123_handle *ao)
MPG123_EXPORT const char * out123_enc_name(int encoding)
Hopefully valid HTML! Valid CSS!