UFO: Alien Invasion
|
Specifies music API. More...
#include "../../shared/ufotypes.h"
Go to the source code of this file.
Data Structures | |
struct | musicStream_s |
Macros | |
#define | SAMPLE_SIZE 4 |
#define | MAX_RAW_SAMPLES 4096 * SAMPLE_SIZE |
Typedefs | |
typedef struct musicStream_s | musicStream_t |
Functions | |
void | M_AddToSampleBuffer (musicStream_t *userdata, int rate, int samples, const byte *data) |
Add stereo samples with a 16 byte width to the stream buffer. More... | |
void | M_StopMusicStream (musicStream_t *userdata) |
void | M_ParseMusic (const char *name, const char **text) |
Parses music definitions for different situations. More... | |
void | M_Frame (void) |
void | M_Init (void) |
void | M_Shutdown (void) |
void | M_Stop (void) |
Specifies music API.
Definition in file s_music.h.
#define MAX_RAW_SAMPLES 4096 * SAMPLE_SIZE |
Definition at line 35 of file s_music.h.
Referenced by M_AddToSampleBuffer(), and M_MusicStreamCallback().
typedef struct musicStream_s musicStream_t |
void M_AddToSampleBuffer | ( | musicStream_t * | userdata, |
int | rate, | ||
int | samples, | ||
const byte * | data | ||
) |
Add stereo samples with a 16 byte width to the stream buffer.
[in] | samples | The amount of stereo samples that should be added to the stream buffer (this is usually 1/4 of the size of the data buffer, one sample should have 4 bytes, 2 for each channel) |
[in] | data | The stereo sample buffer |
[in,out] | userdata | The music stream |
[in] | rate | The sample rate |
Definition at line 431 of file s_music.cpp.
References i, s_env_s::initialized, LittleShort, M_PlayMusicStream(), MAX_RAW_SAMPLES, s_env_s::rate, s_env, musicStream_s::sampleBuf, musicStream_s::samplePos, and scale.
Referenced by CIN_OGM_LoadAudioFrame(), CIN_ROQ_DecodeSoundMono(), and CIN_ROQ_DecodeSoundStereo().
Definition at line 317 of file s_music.cpp.
References music_s::category, music_s::currentTrack, cvar_s::integer, M_MusicStreamUpdate(), M_PlayRandomByCategory(), M_Start(), M_Stop(), cvar_s::modified, music_s::nextTrack, music_s::playing, music_s::playingStream, Q_strvalid, and cvar_s::string.
Referenced by S_Frame().
Definition at line 359 of file s_music.cpp.
References Cmd_AddParamCompleteFunction(), Cmd_Exists(), Cmd_RemoveCommand(), Cmd_TableAddList(), CVAR_ARCHIVE, Cvar_Get(), cvar_s::integer, M_CompleteMusic(), cvar_s::modified, and music_s::playing.
Referenced by S_Init().
void M_ParseMusic | ( | const char * | name, |
const char ** | text | ||
) |
Parses music definitions for different situations.
Definition at line 73 of file s_music.cpp.
References cl_genericPool, Com_Error(), Com_ParseList(), Com_Printf(), ERR_DROP, i, LIST_Delete(), Mem_PoolStrDup, MUSIC_AIRCOMBAT, MUSIC_BATTLESCAPE, MUSIC_GEOSCAPE, MUSIC_MAIN, MUSIC_MAX_ENTRIES, musicArrayLength, musicArrays, linkedList_t::next, and Q_streq.
Referenced by CL_ParseClientData().
Definition at line 372 of file s_music.cpp.
References Cmd_TableRemoveList(), and M_Stop().
Referenced by S_Shutdown().
Definition at line 114 of file s_music.cpp.
References music_s::buffer, music_s::data, FS_FreeFile(), and music_s::playingStream.
Referenced by M_Frame(), M_PlayMusicStream(), M_Shutdown(), and M_Start().
void M_StopMusicStream | ( | musicStream_t * | userdata | ) |
Definition at line 465 of file s_music.cpp.
References music_s::interruptStream, musicStream_s::playing, and music_s::playingStream.
Referenced by CIN_OGM_CloseCinematic(), CIN_ROQ_CloseCinematic(), and M_MusicStreamUpdate().