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;-).
mpg123 volume and equalizer

Enumerations

enum  mpg123_channels {
  MPG123_LEFT =0x1, MPG123_RIGHT =0x2,
  MPG123_LR =0x3
}
 

Functions

MPG123_EXPORT int mpg123_eq (mpg123_handle *mh, enum mpg123_channels channel, int band, double val)
 
MPG123_EXPORT double mpg123_geteq (mpg123_handle *mh, enum mpg123_channels channel, int band)
 
MPG123_EXPORT int mpg123_reset_eq (mpg123_handle *mh)
 
MPG123_EXPORT int mpg123_volume (mpg123_handle *mh, double vol)
 
MPG123_EXPORT int mpg123_volume_change (mpg123_handle *mh, double change)
 
MPG123_EXPORT int mpg123_getvolume (mpg123_handle *mh, double *base, double *really, double *rva_db)
 

Detailed Description

Enumeration Type Documentation

◆ mpg123_channels

another channel enumeration, for left/right choice

Enumerator
MPG123_LEFT 

The Left Channel.

MPG123_RIGHT 

The Right Channel.

MPG123_LR 

Both left and right channel; same as MPG123_LEFT|MPG123_RIGHT

Definition at line 952 of file mpg123.h.

Function Documentation

◆ mpg123_eq()

MPG123_EXPORT int mpg123_eq ( mpg123_handle mh,
enum mpg123_channels  channel,
int  band,
double  val 
)

Set the 32 Band Audio Equalizer settings.

Parameters
mhhandle
channelCan be MPG123_LEFT, MPG123_RIGHT or MPG123_LEFT|MPG123_RIGHT for both.
bandThe equaliser band to change (from 0 to 31)
valThe (linear) adjustment factor.
Returns
MPG123_OK on success

◆ mpg123_geteq()

MPG123_EXPORT double mpg123_geteq ( mpg123_handle mh,
enum mpg123_channels  channel,
int  band 
)

Get the 32 Band Audio Equalizer settings.

Parameters
mhhandle
channelCan be MPG123_LEFT, MPG123_RIGHT or MPG123_LEFT|MPG123_RIGHT for (arithmetic mean of) both.
bandThe equaliser band to change (from 0 to 31)
Returns
The (linear) adjustment factor (zero for pad parameters)

◆ mpg123_reset_eq()

MPG123_EXPORT int mpg123_reset_eq ( mpg123_handle mh)

Reset the 32 Band Audio Equalizer settings to flat

Parameters
mhhandle
Returns
MPG123_OK on success

◆ mpg123_volume()

MPG123_EXPORT int mpg123_volume ( mpg123_handle mh,
double  vol 
)

Set the absolute output volume including the RVA setting, vol<0 just applies (a possibly changed) RVA setting.

Parameters
mhhandle
volvolume value (linear factor)
Returns
MPG123_OK on success

◆ mpg123_volume_change()

MPG123_EXPORT int mpg123_volume_change ( mpg123_handle mh,
double  change 
)

Adjust output volume including the RVA setting by chosen amount

Parameters
mhhandle
changevolume value (linear factor increment)
Returns
MPG123_OK on success

◆ mpg123_getvolume()

MPG123_EXPORT int mpg123_getvolume ( mpg123_handle mh,
double *  base,
double *  really,
double *  rva_db 
)

Return current volume setting, the actual value due to RVA, and the RVA adjustment itself. It's all as double float value to abstract the sample format. The volume values are linear factors / amplitudes (not percent) and the RVA value is in decibels.

Parameters
mhhandle
basereturn address for base volume (linear factor)
reallyreturn address for actual volume (linear factor)
rva_dbreturn address for RVA value (decibels)
Returns
MPG123_OK on success
Hopefully valid HTML! Valid CSS!