/* scorpiox-scorpioplayer-playback-profile — EQ presets + RBJ peaking EQ + transcode profiles. * Pure C99. See SPEC.md. No WinRT, no network, no filesystem. */ #ifndef SPPLAY_H #define SPPLAY_H #include #ifndef SPPLAY_API # if defined(__GNUC__) # define SPPLAY_API __attribute__((visibility("default"))) # else # define SPPLAY_API # endif #endif #ifdef __cplusplus extern "C" { #endif enum { SP_OK = 0, SP_ERR_NO_SUCH_PRESET = 1, SP_ERR_NO_SUCH_BAND = 2, SP_ERR_NO_SUCH_PROFILE= 3, SP_ERR_FIELD_INVALID = 4, SP_ERR_UNKNOWN_FIELD = 5, SP_ERR_BAD_SAMPLE_RATE= 6, SP_ERR_INVALID_ARG = 7, SP_ERR_OOM = 8 }; /* ---- equaliser ---- */ SPPLAY_API int speq_preset_count(void); SPPLAY_API const char *speq_preset_name(int i); SPPLAY_API double speq_preset_gain(int i, int band); SPPLAY_API int speq_preset_index_by_name(const char *name); SPPLAY_API int speq_band_count(void); SPPLAY_API double speq_band_center_hz(int band); SPPLAY_API double speq_band_q(int band); SPPLAY_API int speq_set_sample_rate(int hz); SPPLAY_API int speq_sample_rate(void); SPPLAY_API int speq_set_preset(const char *name); SPPLAY_API int speq_set_gain(int band, double db); SPPLAY_API double speq_get_gain(int band); SPPLAY_API int speq_is_bypassed(void); SPPLAY_API int speq_coeffs(int band, double *b0, double *b1, double *b2, double *a0, double *a1, double *a2); SPPLAY_API double speq_response_db(double freq_hz); SPPLAY_API int speq_process_f32(float *samples, int n, int channels); SPPLAY_API int speq_process_s16(short *samples, int n, int channels); SPPLAY_API void speq_reset_state(void); /* ---- transcode profiles ---- */ SPPLAY_API int sptp_profile_create(const char *name); SPPLAY_API int sptp_profile_destroy(int id); SPPLAY_API int sptp_profile_set(int id, const char *field, const char *value); SPPLAY_API const char *sptp_profile_get(int id, const char *field); SPPLAY_API int sptp_profile_field_valid(int id, const char *field); SPPLAY_API int sptp_profile_field_count(void); SPPLAY_API const char *sptp_profile_field_name(int i); SPPLAY_API const char *sptp_profile_field_type(int i); SPPLAY_API const char *sptp_profile_file_type(int id); SPPLAY_API int sptp_profile_validate(int id); SPPLAY_API const char *sptp_profile_to_json(int id); SPPLAY_API int sptp_profile_from_json(const char *json); SPPLAY_API const char *sptp_profile_to_ffmpeg_args(int id); SPPLAY_API unsigned sptp_profile_parsed_uint(int id, const char *field); SPPLAY_API const char *sptp_last_error(void); SPPLAY_API const char *speq_last_error(void); SPPLAY_API int sp_warning_count(void); SPPLAY_API const char *sp_warning(int i); SPPLAY_API void sp_clear_warnings(void); #ifdef __cplusplus } #endif #endif