LMMS
Loading...
Searching...
No Matches
Spc_Dsp.cpp File Reference
#include "Spc_Dsp.h"
#include "blargg_endian.h"
#include <string.h>
#include "blargg_source.h"

Macros

#define GET_LE16SA(addr)
#define GET_LE16A(addr)
#define SET_LE16A(addr, data)
#define CLAMP16(io)
#define REG(n)
#define VREG(r, n)
#define WRITE_SAMPLES(l, r, out)
#define RATE(rate, div)
#define READ_COUNTER(rate)
#define SAMPLE_PTR(i)
#define CALC_FIR_(i, in)
#define CALC_FIR(i, ch)
#define DO_FIR(i)

Variables

static uint8_t const initial_regs [Spc_Dsp::register_count]
static short const interleved_gauss [512]
static unsigned const counter_mask [32]

Macro Definition Documentation

◆ CALC_FIR

#define CALC_FIR ( i,
ch )
Value:
CALC_FIR_( i, echo_hist_pos [i + 1] [ch] )
#define CALC_FIR_(i, in)
register unsigned i
Definition inflate.c:1575

◆ CALC_FIR_

#define CALC_FIR_ ( i,
in )
Value:
((in) * (int8_t) REG(fir + i * 0x10))
#define REG(n)
Definition Spc_Dsp.cpp:56
float in
Definition lilv_test.c:1460
signed char int8_t
Definition mid.cpp:95

◆ CLAMP16

#define CLAMP16 ( io)
Value:
{\
if ( (int16_t) io != io )\
io = (io >> 31) ^ 0x7FFF;\
}
short int16_t
Definition mid.cpp:96

◆ DO_FIR

#define DO_FIR ( i)
Value:
echo_in_l += CALC_FIR( i, 0 );\
echo_in_r += CALC_FIR( i, 1 );
#define CALC_FIR(i, ch)

◆ GET_LE16A

#define GET_LE16A ( addr)
Value:
GET_LE16( addr )
#define GET_LE16(addr)
Definition blargg_endian.h:154

◆ GET_LE16SA

#define GET_LE16SA ( addr)
Value:
((int16_t) GET_LE16( addr ))

◆ RATE

#define RATE ( rate,
div )
Value:
(rate >= div ? rate / div * 8 - 1 : rate - 1)

◆ READ_COUNTER

#define READ_COUNTER ( rate)
Value:
(*m.counter_select [rate] & counter_mask [rate])
static unsigned const counter_mask[32]
Definition Spc_Dsp.cpp:136
unsigned * m
Definition inflate.c:1559

◆ REG

#define REG ( n)
Value:
m.regs [r_##n]
int n
Definition crypt.c:458

◆ SAMPLE_PTR

#define SAMPLE_PTR ( i)
Value:
GET_LE16A( &dir [VREG(v_regs,srcn) * 4 + i * 2] )
#define VREG(r, n)
Definition Spc_Dsp.cpp:59
#define GET_LE16A(addr)
Definition Spc_Dsp.cpp:32

◆ SET_LE16A

#define SET_LE16A ( addr,
data )
Value:
SET_LE16( addr, data )
#define SET_LE16(addr, data)
Definition blargg_endian.h:155
JSAMPIMAGE data
Definition jpeglib.h:945

◆ VREG

#define VREG ( r,
n )
Value:
r [v_##n]
int r
Definition crypt.c:458

◆ WRITE_SAMPLES

#define WRITE_SAMPLES ( l,
r,
out )
Value:
{\
out [0] = l;\
out [1] = r;\
out += 2;\
if ( out >= m.out_end )\
{\
check( out == m.out_end );\
check( m.out_end != &m.extra [extra_size] || \
(m.extra <= m.out_begin && m.extra < &m.extra [extra_size]) );\
out = m.extra;\
m.out_end = &m.extra [extra_size];\
}\
}\
int * l
Definition inflate.c:1579
float out
Definition lilv_test.c:1461

Variable Documentation

◆ counter_mask

unsigned const counter_mask[32]
static
Initial value:
=
{
RATE( 2,2), RATE(2048,4), RATE(1536,3),
RATE(1280,5), RATE(1024,4), RATE( 768,3),
RATE( 640,5), RATE( 512,4), RATE( 384,3),
RATE( 320,5), RATE( 256,4), RATE( 192,3),
RATE( 160,5), RATE( 128,4), RATE( 96,3),
RATE( 80,5), RATE( 64,4), RATE( 48,3),
RATE( 40,5), RATE( 32,4), RATE( 24,3),
RATE( 20,5), RATE( 16,4), RATE( 12,3),
RATE( 10,5), RATE( 8,4), RATE( 6,3),
RATE( 5,5), RATE( 4,4), RATE( 3,3),
RATE( 2,4),
}
#define RATE(rate, div)
Definition Spc_Dsp.cpp:133

◆ initial_regs

uint8_t const initial_regs[Spc_Dsp::register_count]
static
Initial value:
=
{
0x45,0x8B,0x5A,0x9A,0xE4,0x82,0x1B,0x78,0x00,0x00,0xAA,0x96,0x89,0x0E,0xE0,0x80,
0x2A,0x49,0x3D,0xBA,0x14,0xA0,0xAC,0xC5,0x00,0x00,0x51,0xBB,0x9C,0x4E,0x7B,0xFF,
0xF4,0xFD,0x57,0x32,0x37,0xD9,0x42,0x22,0x00,0x00,0x5B,0x3C,0x9F,0x1B,0x87,0x9A,
0x6F,0x27,0xAF,0x7B,0xE5,0x68,0x0A,0xD9,0x00,0x00,0x9A,0xC5,0x9C,0x4E,0x7B,0xFF,
0xEA,0x21,0x78,0x4F,0xDD,0xED,0x24,0x14,0x00,0x00,0x77,0xB1,0xD1,0x36,0xC1,0x67,
0x52,0x57,0x46,0x3D,0x59,0xF4,0x87,0xA4,0x00,0x00,0x7E,0x44,0x9C,0x4E,0x7B,0xFF,
0x75,0xF5,0x06,0x97,0x10,0xC3,0x24,0xBB,0x00,0x00,0x7B,0x7A,0xE0,0x60,0x12,0x0F,
0xF7,0x74,0x1C,0xE5,0x39,0x3D,0x73,0xC1,0x00,0x00,0x7A,0xB3,0xFF,0x4E,0x7B,0xFF
}

◆ interleved_gauss

short const interleved_gauss[512]
static