---
name: "NJB_Get_EAX"
section: "3"
platform: "linux"
package: "libnjb1-doc"
version: "1.1-2"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/NJB_Get_EAX"
---

# NJB\_Get\_EAX(3)

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

[NJB\_Adjust\_Sound(3)](/NJB_Adjust_Sound/3.md)
