brutal/Brutal.OpenAl/Generated/Al/Al.Verbs.gen.cs
Rian Drake b578433e37 first
2026-10-15 17:10:50 +13:00

61 lines
2.2 KiB
C#

// <auto-generated/>
// Generated by Brutal.OpenAl.Generate; do not edit by hand.
#nullable enable
namespace Brutal.OpenAlApi
{
public static unsafe partial class Al
{
/// <summary>
/// Pauses playback of the given sources (<c>alSourcePausev</c>), as one operation.
/// </summary>
/// <param name="sources">The sources to pause.</param>
public static void PauseSources(ReadOnlySpan<AlSource> sources)
{
if (sources.IsEmpty)
return;
var names = sources.Cast<AlSource, uint>();
fixed (uint* p = names)
Al.PInvoke.SourcePausev(names.Length, p);
}
/// <summary>
/// Starts or resumes playback of the given sources (<c>alSourcePlayv</c>). The sources start as one operation, which is what makes a multi-source cue sample-aligned.
/// </summary>
/// <param name="sources">The sources to play.</param>
public static void PlaySources(ReadOnlySpan<AlSource> sources)
{
if (sources.IsEmpty)
return;
var names = sources.Cast<AlSource, uint>();
fixed (uint* p = names)
Al.PInvoke.SourcePlayv(names.Length, p);
}
/// <summary>
/// Rewinds the given sources to the start of their buffers (<c>alSourceRewindv</c>), as one operation.
/// </summary>
/// <param name="sources">The sources to rewind.</param>
public static void RewindSources(ReadOnlySpan<AlSource> sources)
{
if (sources.IsEmpty)
return;
var names = sources.Cast<AlSource, uint>();
fixed (uint* p = names)
Al.PInvoke.SourceRewindv(names.Length, p);
}
/// <summary>
/// Stops playback of the given sources (<c>alSourceStopv</c>), as one operation.
/// </summary>
/// <param name="sources">The sources to stop.</param>
public static void StopSources(ReadOnlySpan<AlSource> sources)
{
if (sources.IsEmpty)
return;
var names = sources.Cast<AlSource, uint>();
fixed (uint* p = names)
Al.PInvoke.SourceStopv(names.Length, p);
}
}
}