69 uint16_t reserved0[3];
92 k_num_user_osc_param_id
98 #define param_val_to_f32(val) ((uint16_t)val * 9.77517106549365e-004f)
101 typedef void (*UserOscFuncEntry)(uint32_t platform, uint32_t api);
103 typedef void (*UserOscFuncInit)(uint32_t platform, uint32_t api);
105 typedef void (*UserOscFuncCycle)(
const user_osc_param_t *
const params, int32_t *buf,
const uint32_t frames);
113 typedef void (*UserOscFuncValue)(uint16_t value);
115 typedef void (*UserOscFuncParam)(uint16_t idx, uint16_t value);
117 typedef void (*UserOscFuncDummy)(void);
120 #pragma pack(push, 1)
121 typedef struct user_osc_hook_table {
125 uint8_t reserved0[7];
127 UserOscFuncInit func_entry;
128 UserOscFuncCycle func_cycle;
129 UserOscFuncOn func_on;
130 UserOscFuncOff func_off;
131 UserOscFuncMute func_mute;
132 UserOscFuncValue func_value;
133 UserOscFuncParam func_param;
134 UserOscFuncDummy reserved1[5];
135 } user_osc_hook_table_t;
139 #pragma pack(push, 1)
140 typedef struct user_osc_data {
141 user_prg_header_t header;
142 user_osc_hook_table_t hooks;
152 #define OSC_INIT __attribute__((used)) _hook_init
153 #define OSC_CYCLE __attribute__((used)) _hook_cycle
154 #define OSC_NOTEON __attribute__((used)) _hook_on
155 #define OSC_NOTEOFF __attribute__((used)) _hook_off
156 #define OSC_MUTE __attribute__((used)) _hook_mute
157 #define OSC_VALUE __attribute__((used)) _hook_value
158 #define OSC_PARAM __attribute__((used)) _hook_param
161 void _entry(uint32_t platform, uint32_t api);
169 void _hook_init(uint32_t platform, uint32_t api);
201 void _hook_value(uint16_t value);
221 #endif // __userosc_h