// function keys void handle_key_0(s32 val) { // load module if(val == 0) { return; } if(check_key(0)) { region_fill(headRegion, 0x0); font_string_region_clip(headRegion, "loading DSP module...", 0, 0, 0xa, 0); headRegion->dirty = 1; render_update(); net_clear_user_ops(); files_load_dsp(*pageSelect); bfin_wait_ready(); net_report_params(); bfin_enable(); // render status to head region region_fill(headRegion, 0x0); font_string_region_clip(headRegion, "finished loading.", 0, 0, 0xa, 0); headRegion->dirty = 1; render_update(); } show_foot(); }
void handle_key_2(s32 val) { // clear if(val == 1) { return; } if(check_key(2)) { notify("clearing..."); net_clear_user_ops(); redraw_ins(); redraw_outs(); redraw_ops(); redraw_scenes(); notify("done clearing."); } show_foot(); }
// set current state of system from global RAM buffer void scene_read_buf(void) { s8 modName[MODULE_NAME_LEN]; const u8* src = (u8*)&(sceneData->pickle); /// FIXME: we really should be using this comparison // s8 neq = 0; // u32 i; app_pause(); // store current mod name in scene desc memcpy(modName, sceneData->desc.moduleName, MODULE_NAME_LEN); ///// always load: print_dbg("\r\n loading module name: "); print_dbg(sceneData->desc.moduleName); files_load_dsp_name(sceneData->desc.moduleName); // } bfin_wait_ready(); net_clear_user_ops(); net_report_params(); // unpickle network print_dbg("\r\n unpickling network for scene recall..."); src = net_unpickle(src); // unpickle presets print_dbg("\r\n unpickling presets for scene recall..."); src = presets_unpickle(src); print_dbg("\r\n copied stored network and presets to RAM "); /* for(i=0; i<net->numParams; i++) { */ /* print_dbg("\r\n param "); */ /* print_dbg_ulong(i); */ /* print_dbg(" : "); */ /* print_dbg(net->params[i].desc.label); */ /* print_dbg(" ; val "); */ /* print_dbg_hex((u32)net->params[i].data.value); */ /* } */ // compare module name //// is strncmp f*****g with us?? /// neq = strncmp((const char*)modName, (const char*)sceneData->desc.moduleName, MODULE_NAME_LEN); // if(neq) { // load bfin module if it doesn't match the current scene desc //... bfin_wait_ready(); //// well let's try it, actually that would explain some things.. // delay_ms(10); // update bfin parameters net_send_params(); print_dbg("\r\n sent new params"); delay_ms(5); // enable audio processing bfin_enable(); app_resume(); }