Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenAL MCFormats extension #1618

Merged
merged 3 commits into from
Aug 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace Silk.NET.OpenAL.Extensions.EXT.Enums
{
/// <summary>
/// Defines valid format specifiers for sound samples. This covers the additions from the OpenAL multi-channel buffers
/// extension.
/// </summary>
public enum MCBufferFormat
{
/// <summary>
/// 4 channels, unsigned 8-bit
/// </summary>
Quad8 = 0x1204,
/// <summary>
/// 4 channels, signed 16-bit
/// </summary>
Quad16 = 0x1205,
/// <summary>
/// 4 channels, 32-bit float
/// </summary>
Quad32 = 0x1206,

/// <summary>
/// 2 channels, unsigned 8-bit
/// </summary>
Rear8 = 0x1207,
/// <summary>
/// 2 channels, signed 16-bit
/// </summary>
Rear16 = 0x1208,
/// <summary>
/// 2 channels, 32-bit float
/// </summary>
Rear32 = 0x1209,

/// <summary>
/// 5.1 (6 channels), unsigned 8-bit
/// </summary>
S51Chn8 = 0x120A,
/// <summary>
/// 5.1 (6 channels), signed 16-bit
/// </summary>
S51Chn16 = 0x120B,
/// <summary>
/// 5.1 (6 channels), 32-bit float
/// </summary>
S51Chn32 = 0x120C,

/// <summary>
/// 6.1 (7 channels), unsigned 8-bit
/// </summary>
S61Chn8 = 0x120D,
/// <summary>
/// 6.1 (7 channels), signed 16-bit
/// </summary>
S61Chn16 = 0x120E,
/// <summary>
/// 6.1 (7 channels), 32-bit float
/// </summary>
S61Chn32 = 0x120F,

/// <summary>
/// 7.1 (8 channels), unsigned 8-bit
/// </summary>
S71Chn8 = 0x1210,
/// <summary>
/// 7.1 (8 channels), signed 16-bit
/// </summary>
S71Chn16 = 0x1211,
/// <summary>
/// 7.1 (8 channels), 32-bit float
/// </summary>
S71Chn32 = 0x1212
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using Silk.NET.Core.Attributes;
using Silk.NET.Core.Contexts;
using Silk.NET.Core.Native;
using Silk.NET.OpenAL.Extensions.EXT.Enums;

namespace Silk.NET.OpenAL.Extensions.EXT
{

/// <summary>
/// Exposes the OpenAL multi-channel buffers extension.
/// </summary>
[Extension("AL_EXT_MCFORMATS")]
[NativeApi(Prefix = "al")]
public partial class MCFormats : FormatExtensionBase<MCBufferFormat>
{
/// <inheritdoc cref="ExtensionBase" />
public MCFormats(INativeContext ctx)
: base(ctx)
{
}
}

}
Loading