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 build is broken again. #691

Open
perkinslr opened this issue Nov 28, 2022 · 4 comments
Open

OpenAL build is broken again. #691

perkinslr opened this issue Nov 28, 2022 · 4 comments

Comments

@perkinslr
Copy link

Building develop branch fails with numerous errors if cmake is invoked with -DOPENAL_ENABLED=ON.

initSoundEngine, exitSoundEngine and loadSoundResources and freeSoundResources are only defined in the header under FMOD, playMusic is playmusic under OpenAL. And struct OPENAL_BUFFER doesn't have a pointer to a release function in its forward declaration. There may be further issues, as I'm out of time for now.

If no one else gets to this, I'll probably kick it a few more times and open a PR.

@rfht
Copy link

rfht commented Oct 22, 2023

Any updates on this by any chance? I tried buildin on OpenBSD where the (closed-source, proprietary) FMOD library is just not an option, and I'm running into the exact issue above...

Is there a fix coming? Or are you dropping OpenAL support?

@damiencarol
Copy link
Contributor

damiencarol commented Mar 9, 2024

pushed a PR to fix this, it's based on a very recent master, you can test it and make feedback #831

@vanfanel
Copy link

vanfanel commented Sep 22, 2024

@damiencarol I am trying to build latest stable version (https://github.com/TurningWheel/Barony/archive/refs/tags/v4.2.1.tar.gz) which seems to be way newer than the main branch, and this is still failing to build.

I am confused: shouldn't your PR be incorporated into 4.1 stable version?

@ohol-vitaliy
Copy link

+1 compilation with OpenAL or without sound is broken

Used this one:
cmake -DCMAKE_BUILD_TYPE=Release -DOPENAL_ENABLED=OFF -DFMOD_ENABLED=OFF ..

Gives following error:

[ 94%] Building CXX object CMakeFiles/barony.dir/src/engine/audio/init_audio.cpp.o
repos/Barony/src/ui/MainMenu.cpp: In member function ‘int MainMenu::AllSettings::save()’:
repos/Barony/src/ui/MainMenu.cpp:2873:13: error: ‘fmod_speakermode’ was not declared in this scope; did you mean ‘speaker_mode’?
 2873 |         if (fmod_speakermode != speaker_mode) {
      |             ^~~~~~~~~~~~~~~~
      |             speaker_mode
repos/Barony/src/ui/MainMenu.cpp:2874:33: error: ‘FMOD_SPEAKERMODE’ was not declared in this scope
 2874 |             fmod_speakermode = (FMOD_SPEAKERMODE)speaker_mode;
      |                                 ^~~~~~~~~~~~~~~~
repos/Barony/src/ui/MainMenu.cpp: In static member function ‘static MainMenu::AllSettings MainMenu::AllSettings::load(bool)’:
repos/Barony/src/ui/MainMenu.cpp:2977:38: error: ‘fmod_speakermode’ was not declared in this scope; did you mean ‘speaker_mode’?
 2977 |         settings.speaker_mode = (int)fmod_speakermode;
      |                                      ^~~~~~~~~~~~~~~~
      |                                      speaker_mode
repos/Barony/src/ui/MainMenu.cpp: In function ‘void MainMenu::settingsAudio(Button&)’:
repos/Barony/src/ui/MainMenu.cpp:6445:22: error: ‘num_drivers’ was not declared in this scope
 6445 |                 if ( num_drivers > 0 )
      |                      ^~~~~~~~~~~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants