|
LMMS
|
#include "Ym2612_Emu.h"#include <assert.h>#include <stdlib.h>#include <string.h>#include <limits.h>#include <stdio.h>#include <math.h>Classes | |
| struct | slot_t |
| struct | channel_t |
| struct | state_t |
| struct | tables_t |
| struct | Ym2612_Impl |
| struct | ym2612_update_chan< algo > |
Macros | |
| #define | PI 3.14159265358979323846 |
| #define | ATTACK 0 |
| #define | DECAY 1 |
| #define | SUBSTAIN 2 |
| #define | RELEASE 3 |
| #define | SIN_HBITS 12 |
| #define | SIN_LBITS (26 - SIN_HBITS) |
| #define | ENV_HBITS 12 |
| #define | ENV_LBITS (28 - ENV_HBITS) |
| #define | LFO_HBITS 10 |
| #define | LFO_LBITS (28 - LFO_HBITS) |
| #define | SIN_LENGHT (1 << SIN_HBITS) |
| #define | ENV_LENGHT (1 << ENV_HBITS) |
| #define | LFO_LENGHT (1 << LFO_HBITS) |
| #define | TL_LENGHT (ENV_LENGHT * 3) |
| #define | SIN_MASK (SIN_LENGHT - 1) |
| #define | ENV_MASK (ENV_LENGHT - 1) |
| #define | LFO_MASK (LFO_LENGHT - 1) |
| #define | ENV_STEP (96.0 / ENV_LENGHT) |
| #define | ENV_ATTACK ((ENV_LENGHT * 0) << ENV_LBITS) |
| #define | ENV_DECAY ((ENV_LENGHT * 1) << ENV_LBITS) |
| #define | ENV_END ((ENV_LENGHT * 2) << ENV_LBITS) |
| #define | MAX_OUT_BITS (SIN_HBITS + SIN_LBITS + 2) |
| #define | MAX_OUT ((1 << MAX_OUT_BITS) - 1) |
| #define | PG_CUT_OFF ((int) (78.0 / ENV_STEP)) |
| #define | ENV_CUT_OFF ((int) (68.0 / ENV_STEP)) |
| #define | AR_RATE 399128 |
| #define | DR_RATE 5514396 |
| #define | LFO_FMS_LBITS 9 |
| #define | LFO_FMS_BASE ((int) (0.05946309436 * 0.0338 * (double) (1 << LFO_FMS_LBITS))) |
| #define | S0 0 |
| #define | S1 2 |
| #define | S2 1 |
| #define | S3 3 |
| #define | CALC_EN(x) |
| #define | SINT(i, o) |
Typedefs | |
| typedef void(* | ym2612_update_chan_t) (tables_t &, channel_t &, Ym2612_Emu::sample_t *, int) |
Functions | |
| void | set_seg (slot_t &s, int seg) |
| void | YM2612_Special_Update () |
| static void | update_envelope_ (slot_t *sl) |
| void | update_envelope (slot_t &sl) |
Variables | |
| const int | output_bits = 14 |
| static const unsigned char | DT_DEF_TAB [4 *32] |
| static const unsigned char | FKEY_TAB [16] |
| static const unsigned char | LFO_AMS_TAB [4] |
| static const unsigned char | LFO_FMS_TAB [8] |
| static const ym2612_update_chan_t | UPDATE_CHAN [8] |
| #define AR_RATE 399128 |
| #define ATTACK 0 |
| #define CALC_EN | ( | x | ) |
| #define DECAY 1 |
| #define DR_RATE 5514396 |
| #define ENV_ATTACK ((ENV_LENGHT * 0) << ENV_LBITS) |
| #define ENV_DECAY ((ENV_LENGHT * 1) << ENV_LBITS) |
| #define ENV_END ((ENV_LENGHT * 2) << ENV_LBITS) |
| #define ENV_HBITS 12 |
| #define ENV_LBITS (28 - ENV_HBITS) |
| #define ENV_LENGHT (1 << ENV_HBITS) |
| #define ENV_MASK (ENV_LENGHT - 1) |
| #define ENV_STEP (96.0 / ENV_LENGHT) |
| #define LFO_FMS_BASE ((int) (0.05946309436 * 0.0338 * (double) (1 << LFO_FMS_LBITS))) |
| #define LFO_FMS_LBITS 9 |
| #define LFO_HBITS 10 |
| #define LFO_LBITS (28 - LFO_HBITS) |
| #define LFO_LENGHT (1 << LFO_HBITS) |
| #define LFO_MASK (LFO_LENGHT - 1) |
| #define MAX_OUT ((1 << MAX_OUT_BITS) - 1) |
| #define PI 3.14159265358979323846 |
| #define RELEASE 3 |
| #define S0 0 |
| #define S1 2 |
| #define S2 1 |
| #define S3 3 |
| #define SIN_HBITS 12 |
| #define SIN_LBITS (26 - SIN_HBITS) |
| #define SIN_LENGHT (1 << SIN_HBITS) |
| #define SIN_MASK (SIN_LENGHT - 1) |
| #define SINT | ( | i, | |
| o ) |
| #define SUBSTAIN 2 |
| #define TL_LENGHT (ENV_LENGHT * 3) |
| typedef void(* ym2612_update_chan_t) (tables_t &, channel_t &, Ym2612_Emu::sample_t *, int) |
|
inline |
|
static |
|
static |
|
static |
|
static |
|
static |