Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 3495 → Rev 2593

/programs/media/ac97snd/ac97snd/ac97wav.c
64,8 → 64,6
DWORD status;
DWORD first_sync;
DWORD PLStatus=0; //Asper+
byte replay=0;
byte hidden=0;
 
#ifdef DOCKABLE_WINDOW
byte thread_info[1024]; //Asper+
94,7 → 92,6
char buttons_xm[] = " Play Stop Vol- Vol+"; /* uFMOD integration */
char buttons_wav[] = " Play Stop << >> Vol- Vol+"; /* uFMOD integration */
char button_PL[] = "PL"; //Asper+
char button_R[] = "R"; //Asper+
char *buttons_text = buttons_wav; /* uFMOD integration */
 
void play_xm(); /* uFMOD integration */
226,46 → 223,10
exit();
break;
 
case 0x19: //P - playlist
switch (PLStatus)
{ case 0x00: //PL not started.
pl_tid=create_thread(pl_thread_proc, 0, 4096);
PLStatus=0x12;
break;
case 0x01: //PL started, but hidden.
PLStatus=0x12;
break;
case 0x02: //PL started and showed.
PLStatus=0x11;
break;
}
break;
 
case 0x1C: //Enter
currActive=currFirstShowed+currSelected-1;
status = ST_TRACK;
break;
 
case 0x2C: //Z - previous
currActive-=2;
status = ST_TRACK;
break;
case 0x2D: //X - play
status = ST_PLAY;
break;
case 0x2E: //C - pause
break;
case 0x2F: //V - stop
status = ST_STOP;
break;
case 0x30: //B - next
status = ST_TRACK;
break;
 
case 0x47: //Home
if(l_vol < 0)
{ l_vol+=100;
278,7 → 239,6
{
if (currFirstShowed>0)
currFirstShowed--;
else break;
ShowPLContent(pl_buff);
break;
}
329,9 → 289,16
PLStatus=0x00;
exit();
}
currActive=currFirstShowed+button-0x10-1;
for (i=0;i<PL_MAX_SHOWN_ITEMS;i++)
{
if (button==0x10+i)
{
currActive=currFirstShowed+i-1;
status = ST_TRACK;
break;
}
}
break;
case EV_IPC:
*ipc_buff='\0';
ShowPLContent(pl_buff);
377,9 → 344,9
count++;
if (count-1==index)
{
if (j>MAX_TEXT_WIDTH || ch=='\r' || ch=='\n')
if (j>MAX_TEXT_WIDTH || ch=='\n')
{
name[j]='\0';
name[j-1]='\0';
break;
}
if (ch=='\\') ch='/';
430,27 → 397,22
return 1;
}
//Asper_____________________Play List code end_____________________________
void redraw_R_button() //Asper +
{
DWORD rc = 0xA0FFA0; //R button text color
if (!replay) rc = 0x404040;
write_text(14,74,rc|FONT0,button_R,sizeof(button_R)-1);
}
 
void update_dinamic_content() //Asper +
{
int len = strlen(filename);
if (len > 47) len = 47;
int len; /* uFMOD integration */
draw_bar(7,41,286,11,main_wc);
draw_bar(7,55,286,11,main_wc);
write_text(11,57,0x00FF20|FONT0, filename, len);
len = strlen(filename); /* uFMOD integration */
if(len > 47) len = 47; /* uFMOD integration */
write_text(11,57,0x00FF20|FONT0, filename, len); /* uFMOD integration */
}
 
void draw_window()
{
BeginDraw();
if (!hidden)
{
 
DrawWindow(100,100,299,main_wh,main_wc,4,0,0,0); //Asper+
 
make_button(7,24,45,13, 0x10|BT_NORMAL,main_bc);
461,7 → 423,6
make_button(248,24,45,13, 0x15|BT_NORMAL,main_bc);
 
make_button(268,70,25,13, 0x16|BT_NORMAL,main_bc); //Asper+ PL button
make_button(10,70,12,13, 0x17|BT_NORMAL,main_wc); //Asper+ R button
 
make_button(7,41,286,11, 0x30|BT_HIDE|BT_NOFRAME,main_wc);
 
472,8 → 433,6
 
write_text(276,74,main_wc|FONT0,button_PL,sizeof(button_PL)-1); //Asper+ PL button text
write_text(275,73,0xA0FFA0|FONT0,button_PL,sizeof(button_PL)-1); //Asper+
redraw_R_button();
}
EndDraw();
};
 
665,14 → 624,9
int err, ver;
int i;
char ipc_msg[2]="\0\0";
pl_items_number=0;
 
if (argv[1][0]=='-' && argv[1][1]=='h')
{
hidden = 1;
argv[1]+=3;
}
strcpy (full_filename, argv[1]);
pl_items_number=0;
InitHeap(1024*1024);
709,13 → 663,7
if (LoadFile(full_filename))
status = ST_PLAY;
}
else
{
currSelected=currFirstShowed=0;
currActive=-1;
if (!replay) status = ST_STOP;
continue;
}
else status = ST_STOP;
 
//Update ac97snd and PL windows
i=currActive-currFirstShowed;
956,46 → 904,6
exit();
break;
case 0x13: //R - repeat on/off
replay=!replay;
redraw_R_button();
break;
 
case 0x19: //P - playlist
switch (PLStatus)
{ case 0x00: //PL not started.
pl_tid=create_thread(pl_thread_proc, 0, 4096);
PLStatus=0x12;
break;
case 0x01: //PL started, but hidden.
PLStatus=0x12;
break;
case 0x02: //PL started and showed.
PLStatus=0x11;
break;
}
break;
 
case 0x2C: //Z - previous
currActive-=2;
status = ST_TRACK;
break;
case 0x2D: //X - play
status = ST_PLAY;
break;
case 0x2E: //C - pause
break;
case 0x2F: //V - stop
status = ST_STOP;
break;
case 0x30: //B - next
status = ST_TRACK;
break;
 
case 0x47: //Home
if(l_vol < 0)
{ l_vol+=100;
1036,7 → 944,7
case 0x10:
status = ST_PLAY;
break;//continue;
continue;
 
case 0x11:
status = ST_STOP;
1079,10 → 987,6
break;
}
break;
case 0x17: //Asper+ PL button action
replay=!replay;
redraw_R_button();
break;
 
case 0x30:
if(status==ST_DONE)
1278,7 → 1182,7
 
 
///*********
void *memmove ( void * dst, void * src, unsigned int count) /* uFMOD integration */
void *__cdecl memmove ( void * dst, const void * src, unsigned int count) /* uFMOD integration */
{ void *ret;
ret = dst;