Reworked ISoundFormat.LengthInSeconds implementations

This commit is contained in:
penev92
2022-01-04 23:13:56 +02:00
committed by Matthias Mailänder
parent 631297417c
commit 87b92b53a4
7 changed files with 21 additions and 59 deletions

View File

@@ -40,7 +40,7 @@ namespace OpenRA.Mods.Cnc.AudioLoaders
{
public int SampleBits => 8;
public int Channels => 1;
public int SampleRate { get; private set; }
public int SampleRate { get; }
public float LengthInSeconds => (float)totalSamples / SampleRate;
public Stream GetPCMInputStream() { return new VocStream(new VocFormat(this)); }
public void Dispose() { stream.Dispose(); }