Files
RobustToolbox/SS14.Client/Audio/AudioStream.cs
Pieter-Jan Briers dbc88e253b Allow client to run headlessly. (#727)
AKA Without Godot.

Still links against GodotSharp, but this does mean that you can run headless or not from the same binary.
2019-01-19 18:23:41 +01:00

22 lines
546 B
C#

using System;
namespace SS14.Client.Audio
{
public abstract class AudioStream
{
internal abstract Godot.AudioStream GodotAudioStream { get; }
public TimeSpan Length => TimeSpan.FromSeconds(GodotAudioStream?.GetLength() ?? 0);
}
internal class GodotAudioStreamSource : AudioStream
{
internal override Godot.AudioStream GodotAudioStream { get; }
public GodotAudioStreamSource(Godot.AudioStream godotAudioStream)
{
GodotAudioStream = godotAudioStream;
}
}
}