Functions to initialise and shutdown the mpg123 library and handles. The parameters of handles have workable defaults, you only have to tune them when you want to tune something;-) Tip: Use a RVA setting...
| typedef struct mpg123_handle_struct mpg123_handle |
| enum mpg123_parms |
Enumeration of the parameters types that it is possible to set/get.
| MPG123_VERBOSE |
set verbosity value for enabling messages to stderr, >= 0 makes sense (integer) |
| MPG123_FLAGS |
set all flags, p.ex val = MPG123_GAPLESS|MPG123_MONO_MIX (integer) |
| MPG123_ADD_FLAGS |
add some flags (integer) |
| MPG123_FORCE_RATE |
when value > 0, force output rate to that value (integer) |
| MPG123_DOWN_SAMPLE |
0=native rate, 1=half rate, 2=quarter rate (integer) |
| MPG123_RVA |
one of the RVA choices above (integer) |
| MPG123_DOWNSPEED |
play a frame N times (integer) |
| MPG123_UPSPEED |
play every Nth frame (integer) |
| MPG123_START_FRAME |
start with this frame (skip frames before that, integer) |
| MPG123_DECODE_FRAMES |
decode only this number of frames (integer) |
| MPG123_ICY_INTERVAL |
stream contains ICY metadata with this interval (integer) |
| MPG123_OUTSCALE |
the scale for output samples (amplitude - integer or float according to mpg123 output format, normally integer) |
| MPG123_TIMEOUT |
timeout for reading from a stream (not supported on win32, integer) |
| MPG123_REMOVE_FLAGS |
remove some flags (inverse of MPG123_ADD_FLAGS, integer) |
| MPG123_RESYNC_LIMIT |
Try resync on frame parsing for that many bytes or until end of stream (<0 ... integer). This can enlarge the limit for skipping junk on beginning, too (but not reduce it). |
| MPG123_INDEX_SIZE |
Set the frame index size (if supported). Values <0 mean that the index is allowed to grow dynamically in these steps (in positive direction, of course) -- Use this when you really want a full index with every individual frame. |
| MPG123_PREFRAMES |
Decode/ignore that many frames in advance for layer 3. This is needed to fill bit reservoir after seeking, for example (but also at least one frame in advance is needed to have all "normal" data for layer 3). Give a positive integer value, please. |
| MPG123_FEEDPOOL |
For feeder mode, keep that many buffers in a pool to avoid frequent malloc/free. The pool is allocated on mpg123_open_feed(). If you change this parameter afterwards, you can trigger growth and shrinkage during decoding. The default value could change any time. If you care about this, then set it. (integer) |
| MPG123_FEEDBUFFER |
Minimal size of one internal feeder buffer, again, the default value is subject to change. (integer) |
| enum mpg123_param_flags |
Flag bits for MPG123_FLAGS, use the usual binary or to combine.
| enum mpg123_param_rva |
| enum mpg123_feature_set |
Feature set available for query with mpg123_feature.
| int mpg123_init | ( | void | ) |
Function to initialise the mpg123 library. This function is not thread-safe. Call it exactly once per process, before any other (possibly threaded) work with the library.
| void mpg123_exit | ( | void | ) |
Function to close down the mpg123 library. This function is not thread-safe. Call it exactly once per process, before any other (possibly threaded) work with the library.
| mpg123_handle* mpg123_new | ( | const char * | decoder, | |
| int * | error | |||
| ) |
Create a handle with optional choice of decoder (named by a string, see mpg123_decoders() or mpg123_supported_decoders()). and optional retrieval of an error code to feed to mpg123_plain_strerror(). Optional means: Any of or both the parameters may be NULL.
| void mpg123_delete | ( | mpg123_handle * | mh | ) |
Delete handle, mh is either a valid mpg123 handle or NULL.
| int mpg123_param | ( | mpg123_handle * | mh, | |
| enum mpg123_parms | type, | |||
| long | value, | |||
| double | fvalue | |||
| ) |
Set a specific parameter, for a specific mpg123_handle, using a parameter type key chosen from the mpg123_parms enumeration, to the specified value.
| int mpg123_getparam | ( | mpg123_handle * | mh, | |
| enum mpg123_parms | type, | |||
| long * | val, | |||
| double * | fval | |||
| ) |
Get a specific parameter, for a specific mpg123_handle. See the mpg123_parms enumeration for a list of available parameters.
| int mpg123_feature | ( | const enum mpg123_feature_set | key | ) |
Query libmpg123 feature, 1 for success, 0 for unimplemented functions.
1.7.1