Barotrauma Client Doc
Barotrauma.Sounds.VoipSound Class Reference
Inheritance diagram for Barotrauma.Sounds.VoipSound:
Barotrauma.Sounds.Sound

Public Member Functions

 VoipSound (string name, SoundManager owner, VoipQueue q)
 
override float GetAmplitudeAtPlaybackPos (int playbackPos)
 
void SetPosition (Vector3? pos)
 
void SetRange (float near, float far)
 
void ApplyFilters (short[] buffer, int readSamples)
 
override SoundChannel Play (float gain, float range, Vector2 position, bool muffle=false)
 
override SoundChannel Play (Vector3? position, float gain, float freqMult=1.0f, bool muffle=false)
 
override SoundChannel Play (float gain)
 
override SoundChannel Play ()
 
override int FillStreamBuffer (int samplePos, short[] buffer)
 
override void Dispose ()
 
- Public Member Functions inherited from Barotrauma.Sounds.Sound
 Sound (SoundManager owner, string filename, bool stream, bool streamsReliably, ContentXElement xElement=null, bool getFullPath=true)
 
override string ToString ()
 
virtual bool IsPlaying ()
 
virtual SoundChannel Play (float gain, float range, float freqMult, Vector2 position, bool muffle=false)
 
virtual SoundChannel Play (float? gain, string category)
 
virtual void InitializeAlBuffers ()
 
virtual void FillAlBuffers ()
 
virtual void DeleteAlBuffers ()
 

Public Attributes

bool UseRadioFilter
 
bool UseMuffleFilter
 
- Public Attributes inherited from Barotrauma.Sounds.Sound
readonly SoundManager Owner
 
readonly string Filename
 
readonly ContentXElement XElement
 
readonly bool Stream
 
readonly bool StreamsReliably
 
int MaxSimultaneousInstances = 5
 How many instances of the same sound clip can be playing at the same time More...
 
float BaseGain
 
float BaseNear
 
float BaseFar
 

Properties

override SoundManager.SourcePoolIndex SourcePoolIndex [get]
 
new bool IsPlaying [get]
 
float Near [get]
 
float Far [get]
 
float? Gain [get, set]
 
float??? CurrentAmplitude [get]
 
- Properties inherited from Barotrauma.Sounds.Sound
bool Disposed [get]
 
virtual SoundManager.SourcePoolIndex SourcePoolIndex [get]
 
SoundBuffersBuffers [get]
 
int ALFormat [get, protected set]
 
int SampleRate [get, protected set]
 

Additional Inherited Members

- Static Protected Member Functions inherited from Barotrauma.Sounds.Sound
static void CastBuffer (float[] inBuffer, short[] outBuffer, int length)
 
static short FloatToShort (float fVal)
 
static float ShortToFloat (short shortVal)
 
- Protected Attributes inherited from Barotrauma.Sounds.Sound
bool disposed
 
SoundBuffers buffers
 

Detailed Description

Definition at line 9 of file VoipSound.cs.

Constructor & Destructor Documentation

◆ VoipSound()

Barotrauma.Sounds.VoipSound.VoipSound ( string  name,
SoundManager  owner,
VoipQueue  q 
)

Definition at line 67 of file VoipSound.cs.

Member Function Documentation

◆ ApplyFilters()

void Barotrauma.Sounds.VoipSound.ApplyFilters ( short[]  buffer,
int  readSamples 
)

Definition at line 100 of file VoipSound.cs.

◆ Dispose()

override void Barotrauma.Sounds.VoipSound.Dispose ( )
virtual

Reimplemented from Barotrauma.Sounds.Sound.

Definition at line 172 of file VoipSound.cs.

◆ FillStreamBuffer()

override int Barotrauma.Sounds.VoipSound.FillStreamBuffer ( int  samplePos,
short[]  buffer 
)
virtual

Implements Barotrauma.Sounds.Sound.

Definition at line 150 of file VoipSound.cs.

◆ GetAmplitudeAtPlaybackPos()

override float Barotrauma.Sounds.VoipSound.GetAmplitudeAtPlaybackPos ( int  playbackPos)
virtual

Implements Barotrauma.Sounds.Sound.

Definition at line 84 of file VoipSound.cs.

◆ Play() [1/4]

override SoundChannel Barotrauma.Sounds.VoipSound.Play ( )
virtual

Reimplemented from Barotrauma.Sounds.Sound.

Definition at line 145 of file VoipSound.cs.

◆ Play() [2/4]

override SoundChannel Barotrauma.Sounds.VoipSound.Play ( float  gain)
virtual

Reimplemented from Barotrauma.Sounds.Sound.

Definition at line 140 of file VoipSound.cs.

◆ Play() [3/4]

override SoundChannel Barotrauma.Sounds.VoipSound.Play ( float  gain,
float  range,
Vector2  position,
bool  muffle = false 
)
virtual

Reimplemented from Barotrauma.Sounds.Sound.

Definition at line 130 of file VoipSound.cs.

◆ Play() [4/4]

override SoundChannel Barotrauma.Sounds.VoipSound.Play ( Vector3?  position,
float  gain,
float  freqMult = 1.0f,
bool  muffle = false 
)
virtual

Reimplemented from Barotrauma.Sounds.Sound.

Definition at line 135 of file VoipSound.cs.

◆ SetPosition()

void Barotrauma.Sounds.VoipSound.SetPosition ( Vector3?  pos)

Definition at line 89 of file VoipSound.cs.

◆ SetRange()

void Barotrauma.Sounds.VoipSound.SetRange ( float  near,
float  far 
)

Definition at line 94 of file VoipSound.cs.

Member Data Documentation

◆ UseMuffleFilter

bool Barotrauma.Sounds.VoipSound.UseMuffleFilter

Definition at line 35 of file VoipSound.cs.

◆ UseRadioFilter

bool Barotrauma.Sounds.VoipSound.UseRadioFilter

Definition at line 34 of file VoipSound.cs.

Property Documentation

◆ CurrentAmplitude

float??? Barotrauma.Sounds.VoipSound.CurrentAmplitude
get

Definition at line 62 of file VoipSound.cs.

◆ Far

float Barotrauma.Sounds.VoipSound.Far
get

Definition at line 38 of file VoipSound.cs.

◆ Gain

float? Barotrauma.Sounds.VoipSound.Gain
getset

Definition at line 51 of file VoipSound.cs.

◆ IsPlaying

new bool Barotrauma.Sounds.VoipSound.IsPlaying
get

Definition at line 19 of file VoipSound.cs.

◆ Near

float Barotrauma.Sounds.VoipSound.Near
get

Definition at line 37 of file VoipSound.cs.

◆ SourcePoolIndex

override SoundManager.SourcePoolIndex Barotrauma.Sounds.VoipSound.SourcePoolIndex
get

Definition at line 11 of file VoipSound.cs.