Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: sf::SoundBuffer buffer; produces interesting Windows console warning  (Read 6453 times)

0 Members and 1 Guest are viewing this topic.

Erdrick

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
    • Email
Hi,

This is my first message in the SFML forums.  Thank you to those of you who are building and/or supporting this library.

I have this statement in my code somewhere

sf::SoundBuffer buffer;
 

and I'm using Visual Studio 2015 with a console window on the side.  The following message appears on the console after this statement executes:

AL lib: (EE) MMDevApiMsgProc: Unexpected message: 49376

This is not causing any warnings or failures at compile/link time but I was wondering if anyone else saw this before and knows what it is?

Thanks!


eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
AW: sf::SoundBuffer buffer; produces interesting Windows console warning
« Reply #1 on: March 28, 2016, 06:42:40 pm »
Have you copied the openal32.dll that SFML provides next to your executable?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Erdrick

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
    • Email
Re: sf::SoundBuffer buffer; produces interesting Windows console warning
« Reply #2 on: March 29, 2016, 04:00:42 am »
Thanks for your response.

openal32.dll is currently in my Visual Studio 2015 working directory (not next to my .exe yet) and the sound objects are working fine, its just the strange console warning that I couldn't understand.  It appears behind my game so I don't even notice it unless I alt-tab.

If I move it next to my .exe Visual Studio won't compile my program, it wants it in the working directory.

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: sf::SoundBuffer buffer; produces interesting Windows console warning
« Reply #3 on: March 29, 2016, 06:23:39 am »
If I move it next to my .exe Visual Studio won't compile my program, it wants it in the working directory.
You might need to check this thoroughly.

The openal32.dll should be in the same folder as the built executable. That is, the executable that is built from Visual Studio, so this will likely be in the Debug/Release folder (depending on your build settings).

Out of curiosity, are you building dynamically or statically (although OpenAL is required with the executable either way)?
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Quote from: erdrick22 link=topic=20053.msg1#msg1 date=1459216842l
If I move it next to my .exe Visual Studio won't compile my program, it wants it in the working directory.
The compilation has nothing to do with the DLL. What error do you get?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Erdrick

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
    • Email
Re: sf::SoundBuffer buffer; produces interesting Windows console warning
« Reply #5 on: March 30, 2016, 06:12:06 am »
Hi,

In reply to Hapax, I'm building statically.

In reply to eXpl0it3r, you are correct and I was wrong, my program compiles fine if I move openal32.dll, but it won't run if I do that.  If I try to run "Using the local windows debugger from Visual Studio" after renaming the dll for example, it says "The program can't start because OpenAL32.dll is missing from your computer.  Try reinstalling the program to fix the problem."  When I put it back where it is now, in Visual Studio's working directory, the program runs fine even though the dll is not in the debug or release directory alongside the exe.

If I were to try to run the .exe OUTSIDE of Visual Studio though (Say from file explorer) I think you are correct, at that point the dll would need to be right next to the EXE along with my other game assets but for some reason within Visual Studio it looks somewhere else.

To make my Visual Studio directories as confusing as possible I accidentally named my Solution and Project the same thing so I have nested "Dark Ruins" directories.

Here's my actual directory structure within the top level Dark Ruins project directory.
Everything works fine when I run the debugger from inside Visual Studio.

C:\Users\Erdrick\Documents\Visual Studio 2015\Projects\Dark Ruins>tree /f
Folder PATH listing for volume Windows
Volume serial number is 2255-631E

│   contributors.txt
│   Dark Ruins.sdf
│   Dark Ruins.sln

├───Dark Ruins
│   │   20th_century_brown_vintage_paper.png
│   │   250773__ninafoletti__walks-on-stones.wav
│   │   Amarok-logo-small.png
│   │   arial.ttf
│   │   base_unit.png
│   │   constants.h
│   │   currency.png
│   │   Dark Ruins.vcxproj
│   │   Dark Ruins.vcxproj.filters
│   │   Dark Ruins.vcxproj.user
│   │   guild.cpp
│   │   guild.h
│   │   inventory.cpp
│   │   inventory.h
│   │   item.cpp
│   │   item.h
│   │   main.cpp
│   │   map.cpp
│   │   map.h
│   │   openal32.dll
│   │   reppin_fools_gold.wav
│   │   sandstone_floor0.png
│   │   test.txt
│   │   unit.cpp
│   │   unit.h
│   │
│   ├───Debug
│   │   │   Dark Ruins.Build.CppClean.log
│   │   │   Dark Ruins.log
│   │   │   inventory.obj
│   │   │   item.obj
│   │   │   main.obj
│   │   │   map.obj
│   │   │   unit.obj
│   │   │   vc140.idb
│   │   │   vc140.pdb
│   │   │
│   │   └───Dark Ruins.tlog
│   │           CL.command.1.tlog
│   │           CL.read.1.tlog
│   │           CL.write.1.tlog
│   │           Dark Ruins.lastbuildstate
│   │           link.command.1.tlog
│   │           link.read.1.tlog
│   │           link.write.1.tlog
│   │
│   ├───items
│   │       gold_sack.png
│   │       grey_gold_sack.png
│   │       no_item.png
│   │
│   ├───Release
│   │   │   Dark Ruins.Build.CppClean.log
│   │   │   Dark Ruins.log
│   │   │   guild.obj
│   │   │   inventory.obj
│   │   │   item.obj
│   │   │   main.obj
│   │   │   map.obj
│   │   │   unit.obj
│   │   │   vc140.pdb
│   │   │
│   │   └───Dark Ruins.tlog
│   │           CL.command.1.tlog
│   │           CL.read.1.tlog
│   │           CL.write.1.tlog
│   │           Dark Ruins.lastbuildstate
│   │           link.command.1.tlog
│   │           link.read.1.tlog
│   │           link.write.1.tlog
│   │
│   └───sounds
│           effect_fools_gold.wav

├───Debug
│       Dark Ruins.exe
│       Dark Ruins.ilk
│       Dark Ruins.pdb
│       SFML.pdb

└───Release
        Dark Ruins.exe
        Dark Ruins.iobj
        Dark Ruins.ipdb
        Dark Ruins.pdb

Kroyee

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: sf::SoundBuffer buffer; produces interesting Windows console warning
« Reply #6 on: March 30, 2017, 10:14:01 pm »
I am currently making a game using SFML. Today I had a player who reported this same error.
He said that when he launched the game as a normal user he would get this error on start up, then after some 3-4 minutes the game would crash.

If he instead started the game as administrator he would not get the error and the game would not crash.
I don't know what Windows version he was using, sorry.

Anyone know anything abut this?

 

anything