Skip to content

[3.0] OpenAL library names and example projects #2572

Description

@Exanite

Summary

Currently the example projects don't run out of the box on Windows for two reasons:

  1. The library names are not configured correctly (openal is the default name and the MacOS framework name is the only alternative)
  2. The native binaries are not copied over to the output directory

Ideally, the examples use/prefer Silk-provided binaries and work out of the box on all supported platforms.
Currently, the reason the example works on Linux (and I'm guessing Mac) is because they resolve to the system version instead.

Steps to reproduce

Try running the 3.0 OpenAL example on Windows.

Comments

I'll open a PR after we discuss this more here or in the Discord.


For the library names, I'm thinking of adding soft_oal followed by OpenAL32 to the alternative names:
Image

(The first parameter is not an alternative name, but rather the "key" used for the lookup)
Image
Image

This will make Silk 3 prefer the AL Soft binaries, with the names of the original proprietary binaries as a fallback.


For the example project, I'm thinking of applying this change:
Image

Link from the screenshot for reference: https://dotnet.github.io/Silk.NET/docs/v3/for-contributors/build-system#native-packaging

We also need to somehow reference the native project for OpenAL Soft.
I'm thinking we add a reference from the example project to the native project.
This notably avoids making the bindings reference the OpenAL Soft native project, which is important since OpenAL has multiple native implementations.


The new SDL example project I'm adding also requires the RuntimeIdentifier change. If we change the OpenAL example to use RuntimeIdentifier, then I'll also update SDL to do the same.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions