-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[audio] Is there a lightweight alternative to OpenAL Soft? #52
Comments
I saw this lightweight cross-platform audio library on Hacker News a few days ago. Have you also considered SDL2_mixer, or plain SDL2, which are both cross platform MIT licensed? |
Hello clix9, libsound.io looks very good, I'll take a closer look. SDL2_mixer has many external dependencies that I'm trying to avoid (flac, libmikmod, libogg, libvorbis, smpeg). I just want access to audio device. SDL2 itself would be a full replacement for raylib... :P |
Hekkus sound system is a nice library and he has considered open sourcing it. It can play wave, ogg files, and mod music files. It supports nearly any modern device, except maybe BlackBerry. Porting it to a new system is very easy. |
Thanks for the info cdoty! I've been taking a look to Hekkus and it's too big for my taste; I'm looking for something simpler and lightweight, no external dependencies, no need for lots of audio formats support... libsound.io really seems a good candidate. |
Just for reference, here it is an interesting audio library: https://github.com/kinetiknz/cubeb |
Isn't it possible to compile openal-soft statically, in which case the dll would not need to be distributed? |
I think so but last time I tried I got some missing dependencies with my old MinGW and I just left it... I've just updated MinGW to latest version and need to try again... |
@oswjk, I just tried compiling OpenAL Soft as static library using latest MinGW and CMake and it didn't work for me... did you tried it? did it work for you? |
At least on Linux it went smoothly. I'll try to compile it on Windows tomorrow. |
I cloned https://github.com/kcat/openal-soft and did the following:
And the build completed successfully. I'm using mingw64 from msys2. I also tried to compile the library statically with VS2015 and it worked fine too. |
Try SoLoud, it's an amazing sound library. |
Hi @oswjk, I tried running cmake again for openal-soft (master branch) using MinGW (32bit, GCC 5.3.0) and running from Windows CMD and it didn't work (here it is output log). It also keeps poping malware messages from Windows Defender (probably related to programs that cmake tries to run). I imagine is a related to permissions... UPDATE: Ok, I tried again running CMake as administrator and Makefile generation worked ok but when trying to build, it failed (output log)... got a redefinition of 'struct timespec'... Tried to solve the issue manually but got a new bunch of errors... |
Hi @pixelpicosean! Thanks for the proposal, I knew SoLoud but I discarded it earlier for being C++... now I see there is also a C API... For the moment I will continue with OpenAL (really multiplatform) but I would like to use it as static lib and if possible reduce it size (don't need most of the extension features)... I know it's asking for too much but it would be amazing a simple single-file header-only audio library to just open-close audio device and push data for playing... |
@raysan5 The errors you were receiving might be caused by antivirus tools. Someone has had similar problems earlier (http://public.kitware.com/pipermail/cmake/2014-March/057171.html). I haven't seen such problems earlier on any of my Windows machines. The antivirus is my best bet, because you said that defender keeps popping up. |
Hey @oswjk, thanks for the answer! Yes, I already solved that issue with permissions, the problem seems to be in MinGW32 libs (http://openal.org/pipermail/openal/2014-May/000123.html), there are some incompatibilities... |
Finally I managed to compile OpenAL Soft statically with MinGW32, there were some issues with MinGW32 libs (solved in MinGW-w64) and OpenAL Soft current CMake configuration. More info here: kcat/openal-soft#13 Right now I'm quite happy with OpenAL Soft API, I'm closing this issue. |
https://github.com/dr-soft/mini_al looks nice. Single header, public domain. I don't see it in recommendations. Supports Linux (ALSA), Windows (DirectSound/WASAPI), Android (OpenSL|ES) and Other (OpenAL) . Doesn't have direct support for CoreAudio on OSX but there it can use OpenAL like it is now. And there is also https://github.com/RandyGaul/tinyheaders/blob/master/tinysound.h with DirectSound, CoreAudio and SDL2 (for other, not very nice). |
Hey @gen2brain, thanks for the proposed libs! Right now reimplementing audio module with a new module implies some work, need to analize it carefully... |
Update raylib_textures.c with square gradient
There's MojoAL |
Since raylib creation I've been looking for an alternative to OpenAL Soft. It works great but OpenAL Soft is a very big library and raylib programs must be distributed with openal32.dll, I don't like it.
Ideally, I would like to find an audio library with the following features:
I've been analyzing the possibility of using PortAudio, but I'm not sure if it would be a good replacement... ¿any ideas?¿anyone knows about an alternative?
The text was updated successfully, but these errors were encountered: