Subversion Repositories svn.mios32

Compare Revisions

Ignore whitespace Rev 2493 → Rev 2494

/trunk/apps/synthesizers/midibox_quad_genesis/src/demoprograms.c
286,9 → 286,9
prog->noteonsource = NULL;
source = VGM_SourceStream_Create();
VgmFileMetadata md;
s32 res = VGM_ScanFile("/GENESIS/SOR1/BEATNIK.VGM", &md);
s32 res = VGM_File_ScanFile("/GENESIS/SOR1/BEATNIK.VGM", &md);
if(res >= 0){
res = VGM_SourceStream_Start(source, &md);
res = VGM_File_StartStream(source, &md);
if(res >= 0){
/*
source->usage = (VgmUsageBits){.fm1=1, .fm2=1, .fm3=1, .fm4=1, .fm5=1, .fm6=1,
/trunk/apps/synthesizers/midibox_quad_genesis/src/interface.c
88,8 → 88,8
for(g=0; g<4; ++g){
FrontPanel_LEDSet(FP_LED_SELOP_1 + g, 0);
}
//Clear all non-system buttons
for(g=FP_LED_MUTE; g<=FP_LED_STATE; ++g){
//Clear all system buttons
for(g=FP_LED_SYSTEM; g<=FP_LED_STATE; ++g){
FrontPanel_LEDSet(g, 0);
}
//Clear VGM Matrix
101,8 → 101,6
FrontPanel_DrawDigit(FP_LED_DIG_MAIN_2, ' ');
FrontPanel_DrawDigit(FP_LED_DIG_MAIN_3, ' ');
FrontPanel_DrawDigit(FP_LED_DIG_MAIN_4, ' ');
//Turn off the old mode light
FrontPanel_LEDSet(FP_LED_SYSTEM + interfacemode - MODE_SYSTEM, 0);
//Change modes
interfacemode = wantmodechange;
VGM_Player_docapture = 0;
/trunk/apps/synthesizers/midibox_quad_genesis/src/syeng.c
1056,7 → 1056,7
}
 
void SyEng_PrintEngineDebugInfo(){
u8 i, g, v;
u8 /*i,*/ g, v;
DBG("=====================================================");
DBG("============ SyEng_PrintEngineDebugInfo =============");
DBG("=====================================================");
/trunk/apps/synthesizers/midibox_quad_genesis/src/mode_prog.c
82,7 → 82,7
//Create source and get VGM file metadata
*ss = VGM_SourceStream_Create();
VgmFileMetadata md;
s32 res = VGM_ScanFile(filename, &md);
s32 res = VGM_File_ScanFile(filename, &md);
if(res < 0){
VGM_Source_Delete(*ss);
*ss = NULL;
105,7 → 105,7
return;
}
//Try to load
res = VGM_SourceStream_Start(*ss, &md);
res = VGM_File_StartStream(*ss, &md);
if(res == -50){
VGM_Source_Delete(*ss);
*ss = NULL;
140,10 → 140,14
DrawMenu();
return;
}
//TODO
s32 res = VGM_File_SaveRAM(*ss, filename);
DrawMenu();
MIOS32_LCD_CursorSet(0,0);
MIOS32_LCD_PrintFormattedString("Saved ");
if(res < 0){
MIOS32_LCD_PrintFormattedString("Error %d saving", res);
}else{
MIOS32_LCD_PrintString("Saved ");
}
}
 
void Mode_Prog_Init(){
238,10 → 242,10
if(*ss != NULL){
MIOS32_LCD_CursorSet(0,0);
MIOS32_LCD_PrintString("Delete VGM before loading a new one!");
}else{
FrontPanel_LEDSet(FP_LED_LOAD, 1);
Filebrowser_Start(NULL, "VGM", 0, &FilebrowserDoneLoading);
return;
}
FrontPanel_LEDSet(FP_LED_LOAD, 1);
Filebrowser_Start(NULL, "VGM", 0, &FilebrowserDoneLoading);
}
break;
case FP_B_SAVE:
251,10 → 255,15
if(*ss == NULL){
MIOS32_LCD_CursorSet(0,0);
MIOS32_LCD_PrintString("No VGM to save!");
}else{
FrontPanel_LEDSet(FP_LED_SAVE, 1);
Filebrowser_Start(NULL, "VGM", 1, &FilebrowserDoneSaving);
return;
}
if((*ss)->type != VGM_SOURCE_TYPE_RAM){
MIOS32_LCD_CursorSet(0,0);
MIOS32_LCD_PrintString("Can't save streamed VGM!");
return;
}
FrontPanel_LEDSet(FP_LED_SAVE, 1);
Filebrowser_Start(NULL, "VGM", 1, &FilebrowserDoneSaving);
}
break;
case FP_B_NEW:
264,12 → 273,12
if(*ss != NULL){
MIOS32_LCD_CursorSet(0,0);
MIOS32_LCD_PrintString("Delete VGM before creating a new one!");
}else{
submode = 1;
newvgmusage.all = selprogram->usage.all;
DrawMenu();
DrawUsageOnVoices(newvgmusage, 0);
return;
}
submode = 1;
newvgmusage.all = selprogram->usage.all;
DrawMenu();
DrawUsageOnVoices(newvgmusage, 0);
}
break;
case FP_B_DELETE:
/trunk/apps/synthesizers/midibox_quad_genesis/src/filebrowser.c
97,6 → 97,7
}
 
static void NameEditorFinished(){
subscreen = SUBSCREEN_FILEBROWSER; //nameeditor reset this
innameeditor = 0;
if(cursor){
//Was editing file name