Subversion Repositories svn.mios32

Compare Revisions

Ignore whitespace Rev 2489 → Rev 2490

/trunk/apps/synthesizers/midibox_quad_genesis/src/capturer.c
22,6 → 22,7
#include "syeng.h"
 
static u8 cvoice;
static void (*callback_f)();
 
static void DrawMenu(){
FrontPanel_GenesisLEDSet((selchan>>4), 0, 1, 1);
36,9 → 37,10
}
}
 
void Capturer_Start(u8 origvoice){
void Capturer_Start(u8 origvoice, void (*callback)()){
subscreen = SUBSCREEN_CAPTURER;
cvoice = origvoice;
callback_f = callback;
//Clear voice LEDs
u8 g, v;
for(g=0; g<GENESIS_COUNT; ++g){
136,7 → 138,12
prog->noteoffsource = CreateNewVGM(2, usage);
//Update usage
SyEng_RecalcSourceAndProgramUsage(prog, NULL);
//Clear voice selection LEDs
FrontPanel_GenesisLEDSet((selchan>>4), 0, 1, 0);
FrontPanel_GenesisLEDSet(((selchan>>2)&3), (selchan&3)+8, 1, 0);
//Done
subscreen = 0;
callback_f();
return;
}
}
/trunk/apps/synthesizers/midibox_quad_genesis/src/syeng.c
1032,11 → 1032,9
synproginstance_t* pi;
for(i=0; i<MBQG_NUM_PROGINSTANCES; ++i){
pi = &proginstances[i];
if(pi->head != NULL){
if(pi->head->source == src){
ClearPI(pi);
}
}
if(pi->head == NULL) continue;
if(pi->head->source != src) continue;
ClearPI(pi);
}
VGM_Source_Delete(src);
}
1043,6 → 1041,7
void SyEng_DeleteProgram(u8 chan){
synprogram_t* prog = channels[chan].program;
if(prog == NULL) return;
SyEng_HardFlushProgram(prog);
SyEng_DeleteSource(prog->initsource);
SyEng_DeleteSource(prog->noteonsource);
SyEng_DeleteSource(prog->noteoffsource);
/trunk/apps/synthesizers/midibox_quad_genesis/src/capturer.h
17,7 → 17,7
extern "C" {
#endif
 
extern void Capturer_Start(u8 origvoice);
extern void Capturer_Start(u8 origvoice, void (*callback)());
 
extern void Capturer_BtnSystem(u8 button, u8 state);
extern void Capturer_BtnGVoice(u8 gvoice, u8 state);
/trunk/apps/synthesizers/midibox_quad_genesis/src/mode_voice.c
147,6 → 147,11
FrontPanel_LEDSet(FP_LED_SELOP_1 + selop, 1);
}
}
static void CapturerDone(){
Mode_Voice_GotFocus();
MIOS32_LCD_CursorSet(0,0);
MIOS32_LCD_PrintString("-Captured- ");
}
 
void Mode_Voice_Tick(){
280,7 → 285,7
SyEng_PrintEngineDebugInfo();
break;
case FP_B_CAPTURE:
Capturer_Start(selvoice);
Capturer_Start(selvoice, &CapturerDone);
break;
}
}