void InstrumentWidget_create_audio_instrument_widget(struct Patch *patch, bool set_as_current){ create_audio_instrument_widget(patch, set_as_current); if (set_as_current){ // Schedule this happen a little bit later since GFX_PP_Update might do all sorts of things, which might not work very well before the instrument is finished initializing. int64_t patch_id = patch->id; QTimer::singleShot(g_set_current_delay + 3,[patch_id]{ struct Patch *patch = PATCH_get_from_id(patch_id); if(patch != NULL) GFX_PP_Update(patch,false); }); } }
static void MIDI_PP_Update(struct Instruments *instrument,struct Patch *patch){ GFX_PP_Update(patch); }