mpg123 logo
download : svn :: features :: sf.net project - bug tracker :: news archive
libmpg123 API :: testing :: benchmarking :: faq :: links :: contact
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 and the overall NEWS file on libmpg123 versions and important changes between them.
Let me emphasize that the policy for libmpg123 is to always stay backwards compatible -- only additions are planned (and it's not yet planned to change the plans;-).

mpg123 advanced parameter API


Typedefs

typedef struct mpg123_pars_struct mpg123_pars

Functions

mpg123_handlempg123_parnew (mpg123_pars *mp, const char *decoder, int *error)
mpg123_parsmpg123_new_pars (int *error)
void mpg123_delete_pars (mpg123_pars *mp)
int mpg123_fmt_none (mpg123_pars *mp)
int mpg123_fmt_all (mpg123_pars *mp)
int mpg123_fmt (mpg123_pars *mh, long rate, int channels, int encodings)
int mpg123_fmt_support (mpg123_pars *mh, long rate, int encoding)
int mpg123_par (mpg123_pars *mp, enum mpg123_parms type, long value, double fvalue)
int mpg123_getpar (mpg123_pars *mp, enum mpg123_parms type, long *val, double *fval)

Detailed Description

Direct access to a parameter set without full handle around it. Possible uses:

The functions for handling mpg123_pars (mpg123_par() and mpg123_fmt() family) directly return a fully qualified mpg123 error code, the ones operating on full handles normally MPG123_OK or MPG123_ERR, storing the specific error code itseld inside the handle.


Typedef Documentation

typedef struct mpg123_pars_struct mpg123_pars

Opaque structure for the libmpg123 decoder parameters.

Definition at line 797 of file mpg123.h.


Function Documentation

mpg123_handle* mpg123_parnew ( mpg123_pars mp,
const char *  decoder,
int *  error 
)

Create a handle with preset parameters.

mpg123_pars* mpg123_new_pars ( int *  error  ) 

Allocate memory for and return a pointer to a new mpg123_pars

void mpg123_delete_pars ( mpg123_pars mp  ) 

Delete and free up memory used by a mpg123_pars data structure

int mpg123_fmt_none ( mpg123_pars mp  ) 

Configure mpg123 parameters to accept no output format at all, use before specifying supported formats with mpg123_format

int mpg123_fmt_all ( mpg123_pars mp  ) 

Configure mpg123 parameters to accept all formats (also any custom rate you may set) -- this is default.

int mpg123_fmt ( mpg123_pars mh,
long  rate,
int  channels,
int  encodings 
)

Set the audio format support of a mpg123_pars in detail:

Parameters:
rate The sample rate value (in Hertz).
channels A combination of MPG123_STEREO and MPG123_MONO.
encodings A combination of accepted encodings for rate and channels, p.ex MPG123_ENC_SIGNED16|MPG123_ENC_ULAW_8 (or 0 for no support).
Returns:
0 on success, -1 if there was an error. /

int mpg123_fmt_support ( mpg123_pars mh,
long  rate,
int  encoding 
)

Check to see if a specific format at a specific rate is supported by mpg123_pars.

Returns:
0 for no support (that includes invalid parameters), MPG123_STEREO, MPG123_MONO or MPG123_STEREO|MPG123_MONO.

int mpg123_par ( mpg123_pars mp,
enum mpg123_parms  type,
long  value,
double  fvalue 
)

Set a specific parameter, for a specific mpg123_pars, using a parameter type key chosen from the mpg123_parms enumeration, to the specified value.

int mpg123_getpar ( mpg123_pars mp,
enum mpg123_parms  type,
long *  val,
double *  fval 
)

Get a specific parameter, for a specific mpg123_pars. See the mpg123_parms enumeration for a list of available parameters.


Generated on Mon Dec 29 23:37:35 2008 for libmpg123 by  doxygen 1.5.4