예제 #1
0
/*
==========
S_OGG_Init

Initialize the Ogg Vorbis subsystem
Based on code by QuDos
==========
*/
void S_OGG_Init (void)
{
	if (ogg_started)
		return;

	// Cvars
	ogg_loopcount = Cvar_Get ("ogg_loopcount", "5", CVAR_ARCHIVE);
	ogg_ambient_track = Cvar_Get ("ogg_ambient_track", "track11", CVAR_ARCHIVE);

	// Console commands
	Cmd_AddCommand("ogg", S_OGG_ParseCmd);

	// Build list of files
	Com_Printf("Searching for Ogg Vorbis files...\n");
	ogg_numfiles = 0;
	S_OGG_LoadFileList ();
	Com_Printf("%d Ogg Vorbis files found.\n", ogg_numfiles);

	// Initialize variables
	if (ogg_first_init) {
	//	srand(time(NULL));
	//	ogg_curfile = -1;
		ogg_status = STOP;
		ogg_first_init = false;
	}

	ogg_started = true;
}
예제 #2
0
/*
==========
S_OGG_Init
Initialize the Ogg Vorbis subsystem
==========
*/
void S_OGG_Init (void)
{
	if (!sound_started)
		return;

	if (ogg_started)
		return;

	// cvars
	ogg_loopcount = Cvar_Get ("ogg_loopcount", "5", CVAR_ARCHIVE);
	ogg_ambient_track = Cvar_Get ("ogg_ambient_track", "track11", CVAR_ARCHIVE);

	// console commands
	Cmd_AddCommand("ogg", S_OGG_ParseCmd);

	// build list of files
	ogg_numfiles = 0;
	S_OGG_LoadFileList ();
	Com_Printf("%d Ogg Vorbis files found.\n", ogg_numfiles);

	// initialize variables
	if (ogg_first_init)
	{
		ogg_status = STOP;
		ogg_first_init = false;
	}

	ogg_started = true;
}