Beispiel #1
0
/*ARGSUSED*/
static void ctl_lyric(int lyricid)
{
    char *lyric;

    lyric = event2string(lyricid);
    if(lyric != NULL)
    {
	if(*lyric == ME_KARAOKE_LYRIC)
	{
	    if(lyric[1] == '/')
	    {
		display_lyric("\n", LYRIC_WORD_NOSEP);
		display_lyric(lyric + 2, LYRIC_WORD_NOSEP);
	    }
	    else if(lyric[1] == '\\')
	    {
		display_lyric("\r", LYRIC_WORD_NOSEP);
		display_lyric(lyric + 2, LYRIC_WORD_NOSEP);
	    }
	    else if(lyric[1] == '@' && lyric[2] == 'T')
	    {
		if(ctl.trace_playing)
		{
		    display_lyric("\n", LYRIC_WORD_NOSEP);
		    display_lyric(lyric + 3, LYRIC_WORD_SEP);
		}
		else
		    display_title(lyric + 3);
	    }
	    else if(lyric[1] == '@' && lyric[2] == 'L')
	    {
		init_lyric(lyric + 3);
	    }
	    else
		display_lyric(lyric + 1, LYRIC_WORD_NOSEP);
	}
	else
	{
	    if(*lyric == ME_CHORUS_TEXT || *lyric == ME_INSERT_TEXT)
		display_lyric("\r", LYRIC_WORD_SEP);
	    display_lyric(lyric + 1, LYRIC_WORD_SEP);
	}
    }
}
Beispiel #2
0
/* Function name: music
 * Description:
 * 		The most important function, it will hold some function of music
 * 		player such as: play, stop, pause,... display lyric,...
 * Return value:
 * 		SUCCESSFULL
 * 		FAIL
 **/
int music(void){	
	int mode = PLAY_SONG_LYRIC;
	playerMP3("Maroon5.mp3");
	switch (mode){
		case CHOOSE_SONG:	
		break;
		
		case PLAY_SONG_LYRIC:	
				display_lyric("MAROON5.TXT");
		break;
		
		case WAITING:
		break;
	}
	return 0;
}