SFML community forums

Help => Audio => Topic started by: DyFxvt on October 15, 2020, 01:20:20 am

Title: The program crashes when I use "sf::Music"
Post by: DyFxvt on October 15, 2020, 01:20:20 am
When I use sf:Music my program crashes and a popup says "The application was unable to start correctly (0xc000007b). Click OK to close the application.". I looked it up for a few hours and saw it was because I didn't have a file called "libsndfile-1.dll". However I never got that file. When I try to re-install SFML I never get the file.
I install SFML by compiling with CMake.
What do I do?
Title: Re: The program crashes when I use "sf::Music"
Post by: eXpl0it3r on October 15, 2020, 10:34:41 am
If you build the examples that SFML comes with, do they work?

0xc000007b is often an indication of mixing x64 and x86, so make sure you're using the same compiler target for both building SFML and using SFML.
Title: Re: The program crashes when I use "sf::Music"
Post by: DyFxvt on October 15, 2020, 01:01:05 pm
I haven't tried all of the example programs, but yes, I did get the same error for the ones I tried.
I checked the build info on the gcc compiler, and it says I have 32bit, and I'm definitely sure I have 32bit SFML... Should I try re-installing them anyways?

Edit: I tried both Code::Blocks 32bit and 64bit, it still doesn't work...
Title: Re: The program crashes when I use "sf::Music"
Post by: Kvaz1r on October 24, 2020, 10:26:59 am
I also have the same issue with VS2019.
Title: Re: The program crashes when I use "sf::Music"
Post by: Kvaz1r on October 24, 2020, 11:49:29 am
Ok, found a workaround - I rebuilded "fresh" release of OpenAL(openal-soft-1.20.1) and replace .dll that came with SFML with new one. Everything works now.
I absolutely have any idea why it works though.

But maybe it's time to upgrade anyway?
Title: Re: The program crashes when I use "sf::Music"
Post by: eXpl0it3r on October 24, 2020, 01:48:29 pm
Sounds like you might have simply used the wrong version of the OpenAL DLL (x86 vs x64 architecture) and by rebuilding OpenAL yourself, you made sure to use the same compiler and thus matching architecture.