DarkPlaces
Game engine based on the Quake 1 engine by id Software, developed by LadyHavoc
 
channel_t Struct Reference

#include <snd_main.h>

+ Collaboration diagram for channel_t:

Data Fields

float basespeed
 playback rate multiplier for pitch variation
 
float basevolume
 0-1 master volume
 
vec_t distfade
 distance multiplier (attenuation/clipK)
 
int entchannel
 which channel id on the entity
 
int entnum
 makes sound follow entity origin (allows replacing interrupting existing sound on same id)
 
voidfetcher_data
 Per-channel data for the sound fetching function.
 
unsigned int flags
 cf CHANNELFLAG_* defines
 
float mixspeed
 these are often updated while mixer is running, glitching should be minimized (mismatched channel volumes from spatialization is okay) spatialized playback speed (speed * doppler ratio)
 
vec3_t origin
 origin of sound effect
 
double position
 updated ONLY by mixer position in sfx, starts at 0, loops or stops at sfx->total_length
 
int prologic_invert
 whether a sound is played on the surround channels in prologic
 
struct sfx_ssfx
 pointer to sound sample being used
 
float volume [SND_LISTENERS]
 spatialized volume per speaker (mastervol * distanceattenuation * channelvolume cvars)
 

Detailed Description

Definition at line 86 of file snd_main.h.

Field Documentation

◆ basespeed

float channel_t::basespeed

playback rate multiplier for pitch variation

Definition at line 98 of file snd_main.h.

Referenced by S_ClearUsed(), S_SetChannelSpeed(), S_StartSound_StartPosition_Flags(), and SND_Spatialize_WithSfx().

◆ basevolume

float channel_t::basevolume

0-1 master volume

Definition at line 90 of file snd_main.h.

Referenced by S_ClearUsed(), S_SetChannelVolume(), S_UpdateAmbientSounds(), and SND_Spatialize_WithSfx().

◆ distfade

vec_t channel_t::distfade

distance multiplier (attenuation/clipK)

Definition at line 95 of file snd_main.h.

Referenced by S_PlaySfxOnChannel(), S_StartSound_StartPosition_Flags(), and SND_Spatialize_WithSfx().

◆ entchannel

int channel_t::entchannel

which channel id on the entity

Definition at line 93 of file snd_main.h.

Referenced by S_GetEntChannelPosition(), S_PlaySfxOnChannel(), S_StartSound_StartPosition_Flags(), SND_PickChannel(), and SND_Spatialize_WithSfx().

◆ entnum

int channel_t::entnum

makes sound follow entity origin (allows replacing interrupting existing sound on same id)

Definition at line 92 of file snd_main.h.

Referenced by S_GetEntChannelPosition(), S_PlaySfxOnChannel(), S_StartSound_StartPosition_Flags(), SND_PickChannel(), and SND_Spatialize_WithSfx().

◆ fetcher_data

void* channel_t::fetcher_data

Per-channel data for the sound fetching function.

Definition at line 96 of file snd_main.h.

Referenced by OGG_GetSamplesFloat(), OGG_StopChannel(), S_StopChannel(), XMP_GetSamplesFloat(), and XMP_StopChannel().

◆ flags

◆ mixspeed

float channel_t::mixspeed

these are often updated while mixer is running, glitching should be minimized (mismatched channel volumes from spatialization is okay) spatialized playback speed (speed * doppler ratio)

Definition at line 102 of file snd_main.h.

Referenced by S_ClearUsed(), S_MixToBuffer(), and SND_Spatialize_WithSfx().

◆ origin

vec3_t channel_t::origin

origin of sound effect

Definition at line 94 of file snd_main.h.

Referenced by S_PlaySfxOnChannel(), and SND_Spatialize_WithSfx().

◆ position

double channel_t::position

updated ONLY by mixer position in sfx, starts at 0, loops or stops at sfx->total_length

Definition at line 108 of file snd_main.h.

Referenced by S_GetChannelPosition(), S_MixToBuffer(), S_PlaySfxOnChannel(), S_StartSound_StartPosition_Flags(), and SND_PickChannel().

◆ prologic_invert

int channel_t::prologic_invert

whether a sound is played on the surround channels in prologic

Definition at line 97 of file snd_main.h.

Referenced by S_MixToBuffer(), and SND_Spatialize_WithSfx().

◆ sfx

◆ volume

float channel_t::volume[SND_LISTENERS]

spatialized volume per speaker (mastervol * distanceattenuation * channelvolume cvars)

Definition at line 104 of file snd_main.h.

Referenced by S_MixToBuffer(), S_Update(), S_UpdateAmbientSounds(), and SND_Spatialize_WithSfx().


The documentation for this struct was generated from the following file: