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

Public Member Functions

 VideoSound (SoundManager owner, string filename, int sampleRate, int channelCount, Video vid)
 
override float GetAmplitudeAtPlaybackPos (int playbackPos)
 
override bool IsPlaying ()
 
void Enqueue (short[] buf)
 
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 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 ()
 

Additional Inherited Members

- 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
 
- 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
 
- 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]
 

Detailed Description

Definition at line 14 of file VideoSound.cs.

Constructor & Destructor Documentation

◆ VideoSound()

Barotrauma.Sounds.VideoSound.VideoSound ( SoundManager  owner,
string  filename,
int  sampleRate,
int  channelCount,
Video  vid 
)

Definition at line 22 of file VideoSound.cs.

Member Function Documentation

◆ Dispose()

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

Reimplemented from Barotrauma.Sounds.Sound.

Definition at line 113 of file VideoSound.cs.

◆ Enqueue()

void Barotrauma.Sounds.VideoSound.Enqueue ( short[]  buf)

Definition at line 50 of file VideoSound.cs.

◆ FillStreamBuffer()

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

Implements Barotrauma.Sounds.Sound.

Definition at line 92 of file VideoSound.cs.

◆ GetAmplitudeAtPlaybackPos()

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

Implements Barotrauma.Sounds.Sound.

Definition at line 35 of file VideoSound.cs.

◆ IsPlaying()

override bool Barotrauma.Sounds.VideoSound.IsPlaying ( )
virtual

Reimplemented from Barotrauma.Sounds.Sound.

Definition at line 40 of file VideoSound.cs.

◆ Play() [1/4]

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

Reimplemented from Barotrauma.Sounds.Sound.

Definition at line 87 of file VideoSound.cs.

◆ Play() [2/4]

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

Reimplemented from Barotrauma.Sounds.Sound.

Definition at line 68 of file VideoSound.cs.

◆ Play() [3/4]

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

Reimplemented from Barotrauma.Sounds.Sound.

Definition at line 58 of file VideoSound.cs.

◆ Play() [4/4]

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

Reimplemented from Barotrauma.Sounds.Sound.

Definition at line 63 of file VideoSound.cs.