aud_dmem_add.h 4.3 KB
/* from synthInternals.h */
#define AL_DECODER_IN   0
#define AL_RESAMPLE_OUT 0
#define AL_TEMP_0       0
#define AL_DECODER_OUT  368
#define AL_TEMP_1       368
#define AL_TEMP_2       736
#define AL_MAIN_L_OUT   1248
#define AL_MAIN_R_OUT   1616
#define AL_AUX_L_OUT    1984
#define AL_AUX_R_OUT    2352

/* for interleave */
#define AL_INTERLEAVE_L_IN (RSP_BUFFER_OFFSET + AL_MAIN_L_OUT)
#define AL_INTERLEAVE_R_IN (RSP_BUFFER_OFFSET + AL_MAIN_R_OUT)
#define AL_INTERLEAVE_OUT  (RSP_BUFFER_OFFSET)

/* for envelope-mixer */
#define AL_ENVMIXER_IN     (RSP_BUFFER_OFFSET + AL_RESAMPLE_OUT)
#define AL_ENVMIXER_MAIN_L (RSP_BUFFER_OFFSET + AL_MAIN_L_OUT)
#define AL_ENVMIXER_MAIN_R (RSP_BUFFER_OFFSET + AL_MAIN_R_OUT)
#define AL_ENVMIXER_AUX_L  (RSP_BUFFER_OFFSET + AL_AUX_L_OUT)
#define AL_ENVMIXER_AUX_R  (RSP_BUFFER_OFFSET + AL_AUX_R_OUT)

#define ENV_STATE               (0)
#define INT_VOL_OFFSETL         (ENV_STATE)
#define FRAC_VOL_OFFSETL        (INT_VOL_OFFSETL + BYTES_PER_VECTOR)
#define INT_VOL_OFFSETR         (FRAC_VOL_OFFSETL + BYTES_PER_VECTOR)
#define FRAC_VOL_OFFSETR        (INT_VOL_OFFSETR + BYTES_PER_VECTOR)
#define ENV_PARMS_OFFSET        (FRAC_VOL_OFFSETR + BYTES_PER_VECTOR)
#define ENV_STATE_SIZE8         (ENV_PARMS_OFFSET +     BYTES_PER_VECTOR - 1)

#define AL_ENVMIXER_PARAMETER_VOLTGTL   (ENV_PARMS_OFFSET + 0)
#define AL_ENVMIXER_PARAMETER_VOLRATELM (ENV_PARMS_OFFSET + 2)
#define AL_ENVMIXER_PARAMETER_VOLRATELL (ENV_PARMS_OFFSET + 4)
#define AL_ENVMIXER_PARAMETER_VOLTGTR   (ENV_PARMS_OFFSET + 6)
#define AL_ENVMIXER_PARAMETER_VOLRATERM (ENV_PARMS_OFFSET + 8)
#define AL_ENVMIXER_PARAMETER_VOLRATERL (ENV_PARMS_OFFSET + 10)
#define AL_ENVMIXER_PARAMETER_DRYAMT    (ENV_PARMS_OFFSET + 12)
#define AL_ENVMIXER_PARAMETER_WETAMT    (ENV_PARMS_OFFSET + 14)
#define AL_ENVMIXER_PARAMETER_VOLL      (ENV_PARMS_OFFSET + 16)
#define AL_ENVMIXER_PARAMETER_VOLR      (ENV_PARMS_OFFSET + 18)

/* for adpcm */
#define	ADPCM_STATE_SIZE 31
#define AL_ADPCM_IN                  (RSP_BUFFER_OFFSET + AL_DECODER_IN)
#define AL_ADPCM_PARAMETER_LSTATE    (OPTYPE_JMP_OFFSET + 14)

/* for resample */
#define AL_RESAMPLE_IN_0 (RSP_BUFFER_OFFSET + AL_TEMP_0)
#define AL_RESAMPLE_IN_1 (RSP_BUFFER_OFFSET + AL_TEMP_1)
#define PHASE_SIZE		(4)
#define ZMEMSIZE		(PHASE_SIZE * BYTES_PER_SHORT)
#define RES_STATE_BASE		(0)
#define ZMEM_OFFSET		(RES_STATE_BASE)
#define FCA_OFFSET		(ZMEM_OFFSET + ZMEMSIZE)
#define YOBI_OFFSET		(FCA_OFFSET + BYTES_PER_SHORT)
#define RES_STATE_TOP		(YOBI_OFFSET + 3 * BYTES_PER_SHORT)
#define RES_STATE_SIZE8 	(RES_STATE_TOP - RES_STATE_BASE - 1)
#define ICA_OFFSET		(RES_STATE_TOP)
#define CPH_OFFSET		(ICA_OFFSET + BYTES_PER_VECTOR)
#define AL_RESAMPLER_BUFFER_OFFSET	(RSP_BUFFER_OFFSET - ZMEMSIZE) 
#define iCAptr0				(RSP_SCRATCH_OFFSET + ICA_OFFSET + 0)
#define iCAptr8				(RSP_SCRATCH_OFFSET + ICA_OFFSET + 8)
#define iCAptr2				(RSP_SCRATCH_OFFSET + ICA_OFFSET + 2)
#define iCAptr10			(RSP_SCRATCH_OFFSET + ICA_OFFSET + 10)
#define iCAptr4				(RSP_SCRATCH_OFFSET + ICA_OFFSET + 4)
#define iCAptr12			(RSP_SCRATCH_OFFSET + ICA_OFFSET + 12)
#define iCAptr6				(RSP_SCRATCH_OFFSET + ICA_OFFSET + 6)
#define iCAptr14			(RSP_SCRATCH_OFFSET + ICA_OFFSET + 14)
#define CPHptr0				(RSP_SCRATCH_OFFSET + CPH_OFFSET + 0)
#define CPHptr8				(RSP_SCRATCH_OFFSET + CPH_OFFSET + 8)
#define CPHptr2				(RSP_SCRATCH_OFFSET + CPH_OFFSET + 2)
#define CPHptr10			(RSP_SCRATCH_OFFSET + CPH_OFFSET + 10)
#define CPHptr4				(RSP_SCRATCH_OFFSET + CPH_OFFSET + 4)
#define CPHptr12			(RSP_SCRATCH_OFFSET + CPH_OFFSET + 12)
#define CPHptr6				(RSP_SCRATCH_OFFSET + CPH_OFFSET + 6)
#define CPHptr14			(RSP_SCRATCH_OFFSET + CPH_OFFSET + 14)

/* for polefilter */
#define	POLEF_STATE_SIZE          7
#define AL_POLEFILTER_TABLE_SIZE 32

/* for all */
#define AL_ALL_COUNTER 368
#define AL_CONST_C_MULINC     (RES_CONST_OFFSET + C_MULINC)
#define AL_CONST_C_ONE        (RES_CONST_OFFSET + C_ONE)
#define AL_CONST_C_SHIFT      (RES_CONST_OFFSET + C_SHIFT)
#define AL_CONST_C_ZEROFOUR   (RES_CONST_OFFSET + C_ZEROFOUR)
#define AL_CONST_C_ONEFIVE    (RES_CONST_OFFSET + C_ONEFIVE)
#define AL_CONST_C_TWOSIX     (RES_CONST_OFFSET + C_TWOSIX)
#define AL_CONST_C_THREESEVEN (RES_CONST_OFFSET + C_THREESEVEN)
#define AL_CONST_C_RAMP       (RES_CONST_OFFSET + C_RAMP)

#define AL_BUFFER_TEMP_0      (RSP_BUFFER_OFFSET + AL_TEMP_0)
#define AL_BUFFER_TEMP_1      (RSP_BUFFER_OFFSET + AL_TEMP_1)