mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
* Fix ResPath CanonPath Apparently this is supposed to standardise to / but this isn't always the case. Alternatively we could just assert for performance reasons I'm good with either. The comment as written says this should happen. * Fixes * change * assert * Fix bad respath input * Buffer * Merge conflicts * review * Fix
42 lines
1.1 KiB
C#
42 lines
1.1 KiB
C#
using System;
|
|
using Robust.Shared.Graphics;
|
|
|
|
namespace Robust.Client.Audio;
|
|
|
|
/// <summary>
|
|
/// Has the metadata for a particular audio stream as well as the relevant internal handle to it.
|
|
/// </summary>
|
|
public sealed class AudioStream : IDisposable
|
|
{
|
|
private IAudioInternal _audio;
|
|
|
|
/// <summary>
|
|
/// Buffer ID for this audio in AL.
|
|
/// </summary>
|
|
internal int BufferId { get; }
|
|
|
|
public TimeSpan Length { get; }
|
|
internal IClydeHandle? ClydeHandle { get; }
|
|
public string? Name { get; }
|
|
public string? Title { get; }
|
|
public string? Artist { get; }
|
|
public int ChannelCount { get; }
|
|
|
|
internal AudioStream(IAudioInternal internalAudio, int bufferId, IClydeHandle? handle, TimeSpan length, int channelCount, string? name = null, string? title = null, string? artist = null)
|
|
{
|
|
_audio = internalAudio;
|
|
BufferId = bufferId;
|
|
ClydeHandle = handle;
|
|
Length = length;
|
|
ChannelCount = channelCount;
|
|
Name = name;
|
|
Title = title;
|
|
Artist = artist;
|
|
}
|
|
|
|
public void Dispose()
|
|
{
|
|
_audio.Remove(this);
|
|
}
|
|
}
|