예제 #1
0
파일: ogg.c 프로젝트: tomgreen66/yquake2
/*
 * Change position in the file being played.
 */
void
OGG_SeekCmd(void)
{
	if (ogg_status != STOP)
	{
		return;
	}

	if (Cmd_Argc() < 2)
	{
		Com_Printf("Usage: ogg_seek {n | <n | >n}\n");
		return;
	}

	switch (Cmd_Argv(1)[0])
	{
		case '>':
			OGG_Seek(REL, strtod(Cmd_Argv(1) + 1, (char **)NULL));
			break;
		case '<':
			OGG_Seek(REL, -strtod(Cmd_Argv(1) + 1, (char **)NULL));
			break;
		default:
			OGG_Seek(ABS, strtod(Cmd_Argv(1), (char **)NULL));
			break;
	}
}
예제 #2
0
파일: snd_ogg.c 프로젝트: ZwS/qudos
/*
==========
OGG_SeekCmd

Change position in the file being played.
==========
*/
void OGG_SeekCmd(void)
{

	if (ogg_status != STOP)
		return;

	if (Cmd_Argc() < 2) {
		Com_Printf("Usage: ogg_seek {n | <n | >n}\n");
		return;
	}

	switch (Cmd_Argv(1)[0]) {
		case '>':
			OGG_Seek(REL, atof(Cmd_Argv(1)+1));
			break;
		case '<':
			OGG_Seek(REL, -atof(Cmd_Argv(1)+1));
			break;
		default:
			OGG_Seek(ABS, atof(Cmd_Argv(1)));
			break;
	}
}