Nuclide
Software Development Kit for id Technology

Music looping, stinger related functions. More...

Detailed Description

Music looping, stinger related functions.

This is the internal music handler. Games primarily will use in-game entities such as trigger_cdaudio and target_cdaudio to play/change music tracks.

This is the code that handles how music track id's are translated into different path/naming conventions and file formats.

Some tracks may only want to be played once (as opposed to looping).

Functions

string Music_GetPath (int id)
 Get the path to a single music track. More...
 
void Music_ParseTrack (string parm)
 This function is called by EV_MUSICTRACK events. More...
 
void Music_ParseLoop (string parm)
 This function is called by EV_MUSICLOOP events. More...
 
void Music_MenuStart (void)
 Called once when the menu is initialized. More...
 

Enumerations

enum  musicstyle_t { MUSIC_AUTO , MUSIC_FLAC , MUSIC_STEAMHL }
 

Variables

string g_steamhltracks [27]
 
var musicstyle_t autocvar_cl_musicstyle = MUSIC_AUTO
 

Function Documentation

◆ Music_GetPath()

string Music_GetPath ( int  id)

Get the path to a single music track.

Some installs may have the music in media/, others may be in music/.

Parameters
idThe music track in question.
Returns
Path to the music track.

◆ Music_MenuStart()

void Music_MenuStart ( void  )

Called once when the menu is initialized.

Will start playing whatever track is defined in the manifest or liblist file.

◆ Music_ParseLoop()

void Music_ParseLoop ( string  parm)

This function is called by EV_MUSICLOOP events.

Will play a music track that loops.

Parameters
parmThe music track in question. Mostly a track number.

◆ Music_ParseTrack()

void Music_ParseTrack ( string  parm)

This function is called by EV_MUSICTRACK events.

Will play a single music track once.

Parameters
parmThe music track in question. Mostly a track number.

Enumeration Type Documentation

◆ musicstyle_t

Enumerator
MUSIC_AUTO 

Auto selection (default).

MUSIC_FLAC 

Free-Lossless-Audio-Codec requires fteplug_ffmpeg.

MUSIC_STEAMHL 

MP3 tracks in the naming conventions of Steam Half-Life (2003)

Variable Documentation

◆ autocvar_cl_musicstyle

var musicstyle_t autocvar_cl_musicstyle = MUSIC_AUTO

◆ g_steamhltracks

string g_steamhltracks[27]
Initial value:
= {
"media/Half-Life01.mp3",
"media/Prospero01.mp3",
"media/Half-Life12.mp3",
"media/Half-Life07.mp3",
"media/Half-Life10.mp3",
"media/Suspense01.mp3",
"media/Suspense03.mp3",
"media/Half-Life09.mp3",
"media/Half-Life02.mp3",
"media/Half-Life13.mp3",
"media/Half-Life04.mp3",
"media/Half-Life15.mp3",
"media/Half-Life14.mp3",
"media/Half-Life16.mp3",
"media/Suspense02.mp3",
"media/Half-Life03.mp3",
"media/Half-Life08.mp3",
"media/Prospero02.mp3",
"media/Half-Life05.mp3",
"media/Prospero04.mp3",
"media/Half-Life11.mp3",
"media/Half-Life06.mp3",
"media/Prospero03.mp3",
"media/Half-Life17.mp3",
"media/Prospero05.mp3",
"media/Suspense05.mp3",
"media/Suspense07.mp3"
}