man NJB_Get_EAX (Fonctions bibliothèques) - Get EAX settings from the NJB

NAME

NJB_Get_EAX - Get EAX settings from the NJB

LIBRARY

libnjb

SYNOPSIS

#include <libnjb.h>

extern int njb_error

eax_t *NJB_Get_EAX(njb_t *njb)

playlist_t *NJB_Refresh_EAX (njb_t *njb,eax_t *eax)

DESCRIPTION

This function returns a struct that represent the EAX settings on the NJB. By using the NJB_Refresh_EAX the contents of this struct may be refreshed, so that new values are added to the structure.

The eax_t type pointer that is returned by the function may be destroyed by using the eax_destroy(3) function.

The NJB_Refresh_EAX() function may not always be available on all devices and should not be trusted. It is better to use NJB_Get_EAX() instead.

EAX STRUCTURE

The EAX struct has the following form:

typedef struct { u_int8_t volume; int16_t muted; int16_t eq_status; int8_t bass; int8_t bassmin; int8_t bassmax; int8_t midrange; int8_t midrangemin; int8_t midrangemax; int8_t treble; int8_t treblemin; int8_t treblemax; u_int8_t nfreq; u_int8_t freqset; int16_t *frequencies; u_int8_t neffects; u_int8_t acteffect; char **effects; u_int8_t *effamts; u_int8_t nphone; u_int8_t actphone; char **phonemodes; u_int8_t nrear; u_int8_t actrear; char **rears; } eax_t;

The u_int8_t are unsigned byte values. These parameters can be altered using the NJB_Adjust_Sound funtion. muted and eq_status are boolean values and have the values 0x0000 or 0x0001 respective.

The bass, treble and mid settings have associated max- and minvalues that should be taken in regard when sending update commands to these.

bass
The value for the bass setting of the equalizer.
bassmin
The minimum value for the bass setting.
bassmax
The maximum value for the bass setting.
midrange
The value for the midrange setting of the equalizer.
midrangemin
The minimum value for the midrange setting.
midrangemax
The maximum value for the midrange setting.
treble
The value for the treble setting of the equalizer.
treblemin
The minimum value for the treble setting.
treblemax
The maximum value for the treble setting.

The frequencies for the equalizer are selected with an index.

nfreq
The number of frequences available for the midrange frequency setting.
freqset
The currently selected midrange frequency. Index into the array of available frequencies. 0 <= freqset < nfreq
frequencies
A 16bit array of the available frequencies. The size of this array is equal to nfreq.

The number of effects and the currently used effect setting is also selected as an index into an array of preset effects.

neffects
The number of available effects.
acteffect
The currently active effect. Index into the array. 0 <= acteffect < neffects
effects
This is a string array with the names of the available effects. The strings are zero terminated. These are meant to be used as strings in the user interfaces using the effect selector. The strings come from the Jukebox firmware, they do not reside inside libnjb.
effamts
This is an array representing the current amount used of the effect. This implies that the constructors of the jukebox once implied that you could set individual amounts for each effect and perhaps even have several of the active at the same time. However the way it works in practise is that this array will contain the same value for all effects, and calling the corresponding setting fucntion in NJB_Adjust_Sound will set the same value for all effects.
nphone
The number of headphone modes.
actphone
The currently active phone mode. Index into array. 0 <= actphone < nphone
phonemodes
This is an array of strings describing the different headphone modes. These come from the Jukebox firmware and should be used in user interfaces.
nrear
The number of available rear speaker settings.
actrear
The currently active rear speaker setting. 0 <= actrear < nrear
rears
This is an array of strings describing the different rear speaker modes. These come from the Jukebox firmware and should be used in user interfaces.

SEE ALSO