Unstable 1.2.1.0

This commit is contained in:
Markus Isberg
2023-11-10 17:45:19 +02:00
parent 2ea58c58a7
commit 8a2e2ea0ae
268 changed files with 4076 additions and 1843 deletions
@@ -16,7 +16,7 @@ namespace Barotrauma.Sounds
private short[] sampleBuffer = Array.Empty<short>();
private short[] muffleBuffer = Array.Empty<short>();
public OggSound(SoundManager owner, string filename, bool stream, XElement xElement) : base(owner, filename,
public OggSound(SoundManager owner, string filename, bool stream, ContentXElement xElement) : base(owner, filename,
stream, true, xElement)
{
var reader = new VorbisReader(Filename);
@@ -18,7 +18,7 @@ namespace Barotrauma.Sounds
public readonly string Filename;
public readonly XElement XElement;
public readonly ContentXElement XElement;
public readonly bool Stream;
@@ -60,14 +60,14 @@ namespace Barotrauma.Sounds
public float BaseNear;
public float BaseFar;
public Sound(SoundManager owner, string filename, bool stream, bool streamsReliably, XElement xElement = null, bool getFullPath = true)
public Sound(SoundManager owner, string filename, bool stream, bool streamsReliably, ContentXElement xElement = null, bool getFullPath = true)
{
Owner = owner;
Filename = getFullPath ? Path.GetFullPath(filename.CleanUpPath()).CleanUpPath() : filename;
Stream = stream;
StreamsReliably = streamsReliably;
XElement = xElement;
sourcePoolIndex = XElement.GetAttributeEnum("sourcepool", SoundManager.SourcePoolIndex.Default);
sourcePoolIndex = XElement?.GetAttributeEnum("sourcepool", SoundManager.SourcePoolIndex.Default) ?? SoundManager.SourcePoolIndex.Default;
BaseGain = 1.0f;
BaseNear = 100.0f;