Backend Question

84 views
Skip to first unread message

Max Denning

unread,
May 27, 2021, 7:25:37 PM5/27/21
to SoLoud audio engine
Hi everyone!

I am trying to get into making some games in C++ and opengl.  This library looks really cool!  I would like to try to statically link it and use it for an audio system in a game.  I have looked at the documentation some and am a little confused about how backends work with SoLoud.

Currently, I am trying to use Mingw64 as a compiler.  I am also using glfw.  It looks like when you add SoLoud to a project, you need to specify a backend.  From what I understand if I was using SDL instead of glfw, I could just build SoLoud with genie for SDL and then specify I am using SDL in my program.  I am a little confused what happens if you currently are not using a backend.  Would SoLoud not work?  Or is that what the WITH_NOSOUND and WITH_NULL options are for?  Basically, do I need to find another library to use in conjunction with SoLoud or switch from glfw to SLD if I want to use SoLoud?

Thanks!

bo samson

unread,
May 27, 2021, 9:38:40 PM5/27/21
to Max Denning, SoLoud audio engine
Hi Max!
My current project is quite similar to yours: a glfw/openGL based game. (but compiling with VS). I must admit I had the same doubt at first. Like, what good is it to use SoLoud if I also need OpenAL/SDL/etc? Truth is, you don't need any extra library. By default, it's gonna use whatever's best on your system. BUT you can override it if you really want to.
Good luck!


--
You received this message because you are subscribed to the Google Groups "SoLoud audio engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to soloud+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/soloud/e0010234-94d3-4e62-958c-bca2d48e6ef3n%40googlegroups.com.

Max Denning

unread,
May 29, 2021, 2:18:42 PM5/29/21
to SoLoud audio engine

Cool!  That makes a lot of sense.  I would really like to try to use it in my project!

However, I have run into an issue when building and including it my project in the last day or two.  Everything seemed to go smoothly at first, I used genie to create a gmake folder.
I then use mingw32-make.exe to create a library file "libsoloud_static.a" , which I put into my mingw64 lib folders.  Next, I linked the library with -lsoloud_static
and copied all the include files into my many project folder.  I then included soloud.h and soloud_wav.h and tried to to run the code "SoLoud::Soloud s;".  However when I tried to compile, I got some errors:
"
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib/libsoloud_static.a(soloud_winmm.o): In function `winMMThread':
C:\Users\maxde\Downloads\sLoud\soloud20200207\build\gmake/../../src/backend/winmm/soloud_winmm.cpp:94: undefined reference to `__imp_waveOutWrite'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib/libsoloud_static.a(soloud_winmm.o): In function `winMMCleanup':
C:\Users\maxde\Downloads\sLoud\soloud20200207\build\gmake/../../src/backend/winmm/soloud_winmm.cpp:126: undefined reference to `__imp_waveOutReset'
C:\Users\maxde\Downloads\sLoud\soloud20200207\build\gmake/../../src/backend/winmm/soloud_winmm.cpp:130: undefined reference to `__imp_waveOutUnprepareHeader'
C:\Users\maxde\Downloads\sLoud\soloud20200207\build\gmake/../../src/backend/winmm/soloud_winmm.cpp:136: undefined reference to `__imp_waveOutClose'
C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/lib/../lib/libsoloud_static.a(soloud_winmm.o): In function `SoLoud::winmm_init(SoLoud::Soloud*, unsigned int, unsigned int, unsigned int, unsigned int)':
C:\Users\maxde\Downloads\sLoud\soloud20200207\build\gmake/../../src/backend/winmm/soloud_winmm.cpp:177: undefined reference to `__imp_waveOutOpen'
C:\Users\maxde\Downloads\sLoud\soloud20200207\build\gmake/../../src/backend/winmm/soloud_winmm.cpp:190: undefined reference to `__imp_waveOutPrepareHeader'
collect2.exe: error: ld returned 1 exit status
"
I thought I had included the projected correctly.  The error messages are a little confusing as they seem to mention the folder I download soloud in the first place.

Did I miss any steps?
Thanks!

bo samson

unread,
May 31, 2021, 3:19:23 PM5/31/21
to Max Denning, SoLoud audio engine
This looks like a missing winmm.lib in the linker's input.
However, you may be having a deeper problem than that. With a MinGW and building a .a, this looks like cross compiling from Win to Linux, but with SoLoud somehow defaulting to WinMM as backend. You can specify the desired backend with InitEx. The default is supposed to be ALSA on Linux.


Reply all
Reply to author
Forward
0 new messages