libnjb: /usr/obj/ports/libnjb-2.2.7/libnjb-2.2.7/src/eax.c File Reference

libnjb 2.2.7

Functions | Variables
eax.c File Reference
`#include <string.h>`
`#include "libnjb.h"`
`#include "njb_error.h"`
`#include "defs.h"`
`#include "base.h"`
`#include "byteorder.h"`
`#include "eax.h"`

## Functions
int | eax_unpack (void *data, size_t nbytes, njb_state_t *state)
njb_eax_t * | new_eax_type (void)
void | destroy_eax_type (njb_eax_t *eax)

## Variables
int | __sub_depth

## Detailed Description

This file contains functions specific to manipulate EAX API including other sound settings like volume.

## Function Documentation

## § destroy_eax_type()

void destroy_eax_type | ( | njb_eax_t * | eax | ) |

This function destroys an EAX type holder and free up the memory used by it.

Parameters

  eax | the EAX type holder to destroy

References njb_eax_struct::name, and njb_eax_struct::type.

Referenced by eax_unpack(), and NJB_Destroy_EAX_Type().

## § eax_unpack()

int eax_unpack | ( | void * | data,
|  | size_t | nbytes,
|  | njb_state_t * | state
| ) |  |

This function inpacks an EAX block from the NJB1. The EAX effects are then added to the linked list in the device state and retrieved one by one by the user of the API.

Parameters

  data | raw chunk of data to be converted to EAX effects
  nbytes | the size of the data chunk
  state | the device state that holds the linked list to add the effects to

Returns
  0 on success, -1 on failure

References destroy_eax_type(), njb_eax_struct::group, njb_eax_struct::name, new_eax_type(), njb_eax_struct::next, njb_eax_struct::number, and njb_eax_struct::type.

Referenced by njb_read_eaxtypes().

## § new_eax_type()

njb_eax_t* new_eax_type | ( | void |  | ) |

This function creates a new EAX type holder (allocates memory for it) with no information.

Returns
  the new EAX type holder

References njb_eax_struct::exclusive, njb_eax_struct::group, njb_eax_struct::name, njb_eax_struct::number, and njb_eax_struct::type.

Referenced by eax_unpack().

## Variable Documentation

## § __sub_depth

int __sub_depth

The current subroutine depth for all of libnjb (global)