-
Notifications
You must be signed in to change notification settings - Fork 19
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
Could not find the native OpenAL library on MacOS #68
Comments
Hey there @Albator11, did you find a fix, or by a chance some good cross platform c# audio library? I just ported my game engine to MacOS and NAudio no longer works... Thank you :') |
Hey @hexiy! I recently found LibVLCSharp which seems to work pretty well! I tried OpenTK.OpenAL but it's pretty low-level. Which I'm more or less ok with, and it's (maybe) better if you're trying to do 3D audio effects as it (I think) was made with 3D space in mind. But it doesn't have any way to load audio files, so you're on your own for that... or you could use an audio file parser someone else has made. (most I've seen are only for There is also SFML.Audio and SDL2 (there's a lot of C# bindings for SDL2... so take your pick I guess) but I haven't tried either yet. SFML (as far as I know) just uses OpenAL for the backend, but (I think) should be a bit higher-level. I have no idea about SDL2... I actually didn't realize it did audio until just recently. I'm pretty sure both SFML and SDL2 would need an external solution to load audio files. So anyway, LibVLCSharp seems to be the only C# option to load multiple different kinds of audio/video files quite easily... although the first file I tested was a Here's some LibVLCSharp pseudo code: using LibVLCSharp.Shared;
Core.Initialize();
using (var lib_vlc = new LibVLC()) {
using (var media = new Media(lib_vlc, new Uri("/example/audio_file.m4a"), ":no-video")) {
using (var media_player = new MediaPlayer(lib_vlc)) {
media_player.Media = media;
media_player.Play();
while (media_player.WillPlay || media_player.IsPlaying) { Thread.Sleep(100); }
}
}
} Hopefully this is helpful in some way... I probably went a bit too in-depth... I don't know. |
Hey, i recently got a Macbook myself - i'll test this and push a fix |
hmm @Albator11 Do you have an intel or M1 mac? I'm having troubles making LibVLC work on my M1 macbook, and in their repo readme it says LibVLC.Mac only supports x86_64 platform... |
I use an Intel... I hadn't thought about ARM... sorry @hexiy. |
Hello there, any updates for m1 macs ? I'm on |
Should be fixed with the latest version to be honest. See #70 |
[m1 air, latest os] Didn't work out of the box and once i installed openal through brew, following instructions from here #43, still didn't work, so i copied libopenal.dylib to the build folder and it works now. |
I have a problem with
AudioEngine.CreateDefault()
trying to find the OpenAL library. (I'm using a Mac)I think a simple enough fix would be to add
/System/Library/Frameworks/OpenAL.framework/OpenAL
to the library search path like OpenTK.OpenAL does... or maybe you just want to use OpenTK.OpenAL (or some other OpenAL bindings) instead to avoid manually binding OpenAL yourself?P.S.
AudioEngine.CreateDefault()
doesn't tell you/warn that it can return null.The text was updated successfully, but these errors were encountered: