mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
AKA Without Godot. Still links against GodotSharp, but this does mean that you can run headless or not from the same binary.
22 lines
546 B
C#
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;
|
|
}
|
|
}
|
|
}
|