![]() |
|
(Linux Compilation Tip) Force the Compiler to Include OpenAL Audio Backend - Printable Version +- Dolphin, the GameCube and Wii emulator - Forums (https://forums.dolphin-emu.org) +-- Forum: Dolphin Emulator Discussion and Support (https://forums.dolphin-emu.org/Forum-dolphin-emulator-discussion-and-support) +--- Forum: Support (https://forums.dolphin-emu.org/Forum-support) +--- Thread: (Linux Compilation Tip) Force the Compiler to Include OpenAL Audio Backend (/Thread-linux-compilation-tip-force-the-compiler-to-include-openal-audio-backend) |
(Linux Compilation Tip) Force the Compiler to Include OpenAL Audio Backend - Obadiah Hakeswill - 03-21-2012 EDIT: The solution that I am proposing is a workaround. To be clear, I am not suggesting that this fix be applied to the official Dolphin release. Still, I would recommend to anyone compiling Dolphin on Linux that he/she follow this procedure. As I discovered when I had the need to post this thread, it is useful for a user of Dolphin to have as many audio backend options as possible to ensure that at least one of them works well for him/her. Had I not found the need for this fix, applied it, and recompiled and reinstalled Dolphin, I would not have the OpenAL audio backend option, even though I have both libopenal1 and libopenal-dev installed from my repositories. First, check your repositories to see whether libopenal1 and libopenal-dev are installed. If not, install them. If they are not even in your repositories, Google them, and get them installed. The exact procedure for these steps depends on which distribution of Linux you are running. Now, follow the "Setting up to Build" steps on this page. Here is the fix: Before proceeding with the "Building" steps, run, "gedit CMakeLists.txt" in the terminal. Find the following block of code: Quote:include(FindOpenAL OPTIONAL) Change it to: Quote:include(FindOpenAL OPTIONAL) This fix removes the OPENAL_FOUND condition and includes OpenAL in your build regardless. On my system, this script failed to determine that I had OpenAL and its development libraries, hence the need for me to apply this fix and recompile and reinstall Dolphin. Finally, close gedit, and follow the rest of the instructions on the aforementioned page. When you run Dolphin, check the DSP settings, and look under "Backend Settings." You should have an "OpenAL" backend option, and it should provide working audio emulation when you emulate a game. This post could also be considered a bug report because the "FindOpenAL" function called by the script does not work properly. RE: (Linux Compilation Tip) Force the Compiler to Include OpenAL Audio Backend - scummos - 03-21-2012 If this is indeed a bug, then it's a bug in OpenAL, or in your distributions' OpenAL package. The solution proposed by you is a workaround and not the correct way to fix this problem. For me, this works, as far as I remember... maybe you want to pastebin your FindOpenAL.cmake? RE: (Linux Compilation Tip) Force the Compiler to Include OpenAL Audio Backend - Obadiah Hakeswill - 03-23-2012 (03-21-2012, 09:13 AM)scummos Wrote: If this is indeed a bug, then it's a bug in OpenAL, or in your distributions' OpenAL package. The solution proposed by you is a workaround and not the correct way to fix this problem. However, it is a working way to fix the problem. If I had the "correct" way to fix the problem, I would apply it. I searched my entire dolphin-emu directory for FindOpenAL.cmake, but no such file exists there. I added a preface to my instructions stating that I do not expect this change to be applied to the Dolphin release, but I would still suggest to someone who wishes to compile Dolphin on Linux that he/she should apply the fix. I also find it to be slightly presumptuous of you to rush to blame my distributor's OpenAL package for the problem. I can tell you that the problem likely has nothing to do with file locations because I have a libopenal.so and libopenal.so.1 symbolic link in /usr/lib, both of which link to libopenal.so.1.13.0 in that same directory. I also have OpenAL development headers located in /usr/include/AL. To list them, I have: al.h, alc.h, alext.h, efx.h, and efx-creative.h. As far as my humble mind can tell, either my OpenAL library and/or OpenAL development headers are out of date, or some script in Dolphin's source package either does not exist or is failing to locate the files. In addition, the OpenAL backend works when I use Dolphin, so my OpenAL library cannot be incompatible with the emulator. RE: (Linux Compilation Tip) Force the Compiler to Include OpenAL Audio Backend - scummos - 03-23-2012 (03-23-2012, 10:46 AM)Obadiah Hakeswill Wrote: I searched my entire dolphin-emu directory for FindOpenAL.cmake, but no such file exists there.Your distribution is responsible for providing that file. In other words, every program provides a Find<Foo>.cmake file which is used to configure itself. So, if you have OpenAL installed, you should have that file (it has nothing to do with dolphin). For me, the file is in /usr/share/cmake-2.8/Modules/FindOpenAL.cmake. (03-23-2012, 10:46 AM)Obadiah Hakeswill Wrote: I added a preface to my instructions stating that I do not expect this change to be applied to the Dolphin release, but I would still suggest to someone who wishes to compile Dolphin on Linux that he/she should apply the fix.As I said, there is something wrong with your setup, not with dolphin. The original version works for me: Code: -- Found OpenAL: /usr/lib64/libopenal.so (03-23-2012, 10:46 AM)Obadiah Hakeswill Wrote: I also find it to be slightly presumptuous of you to rush to blame my distributor's OpenAL package for the problem. I can tell you that the problem likely has nothing to do with file locations because I have a libopenal.so and libopenal.so.1 symbolic link in /usr/lib, both of which link to libopenal.so.1.13.0 in that same directory. I also have OpenAL development headers located in /usr/include/AL. To list them, I have: al.h, alc.h, alext.h, efx.h, and efx-creative.h. As far as my humble mind can tell, either my OpenAL library and/or OpenAL development headers are out of date, or some script in Dolphin's source package either does not exist or is failing to locate the files. In addition, the OpenAL backend works when I use Dolphin, so my OpenAL library cannot be incompatible with the emulator.I think the FindOpenAL.cmake might be broken for some reason. Or something else weird is going on. I don't know. ![]() However, I know cmake, and how it's done is how it's supposed to be done. You use FIND_PACKAGE(FOO), then IF (FOO_FOUND). If that doesn't work, then either OpenAL+cmake is broken in general, *or* your setup is broken. The fact that it works here, and the fact that somebody else would probably have noticed quickly if such a well-known package had a broken cmake file, makes the latter way more likely. Greetings |