#ifndef LIBOPNA_OPNASSG_H_INCLUDED #define LIBOPNA_OPNASSG_H_INCLUDED #include #include #include #include "leveldata/leveldata.h" #ifdef __cplusplus extern "C" { #endif #define OPNA_SSG_SINCTABLEBIT 7 #define OPNA_SSG_SINCTABLELEN (1<ymf288 != ymf288) { ssg->ymf288 = ymf288; memset(resampler->buf, 0, sizeof(resampler->buf)); } } static inline void opna_ssg_set_mix(struct opna_ssg *ssg, uint32_t mix) { // 0x10000: default (PC-9801-86 equivalent) // only valid when !ymf288 ssg->mix = mix; } typedef void (*opna_ssg_sinc_calc_func_type)(unsigned resampler_index, const int16_t *inbuf, int32_t *outbuf); extern opna_ssg_sinc_calc_func_type opna_ssg_sinc_calc_func; void opna_ssg_sinc_calc_c(unsigned resampler_index, const int16_t *inbuf, int32_t *outbuf) __attribute__((hot, optimize(3))); void opna_ssg_sinc_calc_neon(unsigned, const int16_t *, int32_t *); void opna_ssg_sinc_calc_sse2(unsigned, const int16_t *, int32_t *) __attribute__((hot, optimize(3))); extern const int16_t opna_ssg_sinctable[OPNA_SSG_SINCTABLELEN*2]; #ifdef __cplusplus } #endif #endif // LIBOPNA_OPNASSG_H_INCLUDED