Thanks alot for the answer. For some strange reason Visual Studio gives me an
error RC2247 : SYMBOL name too long, but with Resedit I've made a preliminary UI, with sliders for adjusting frequencies. In the
update_display() function, the values of the sliders are acquired and stored in
m_params.m_fc and
m_params.m_fcnew. m_dirty makes the four lines execute:
CODE
dsp_preset_impl data;
m_params.get_data(data);
console::printf("m_dirty fc: %d, fcnew: %d", m_params.m_fc, m_params.m_fcnew);
m_callback.on_preset_changed(data);
When the get_data(data) function runs, I can also see the adjusted values of fc and fcnew.
Then (I don't know why) the set_data function runs, but the values are back to the default values
This is where I'd planned to recalculate filter coefficients, but with default values no changes are made.
I've compared it to the foosion tutorial with presets, and it uses the
params.m_percent, where I use
params.m_fcnew and
params.m_fcnew, so why I don't get modified values is a puzzle.
I cannot figure out how
p_data stores data, but I've tried saving the new sliders by adding the code to get_data(dsp_preset & p_data):
CODE
t_int32 temp2 = m_fc;
t_int32 temp3 = m_fcnew;
console::printf("Running get_data function, fc: %d, fcnew: %d", temp2, temp3);
byte_order::order_native_to_le_t(temp2);
byte_order::order_native_to_le_t(temp3);
p_data.set_data(&temp2, sizeof(temp2));
p_data.set_data(&temp2, sizeof(temp3));
Maybe I'm not storing it properly?
Regarding WTL and ATL, I'm not sure how to use it (or what it is). I always get compiling errors in some way related to atlapp.h, and a message that
dialog_helper::dialog_modal::run is deprecated. It still works though