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

Author Topic: openal32.dll  (Read 4597 times)

0 Members and 1 Guest are viewing this topic.

Xander314

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
    • http://sfmlcoder.wordpress.com/
    • Email
openal32.dll
« on: July 08, 2011, 10:33:07 am »
I had always assumed this file to be necessary to any application using audio, or at least those using positional audio. However, the following code runs perfectly happily when linked statically to SFML and provided only with libsndfile-1.dll, not openal32.dl.

When is openal32.dll necessary?

Code: [Select]

#include <SFML/Graphics.hpp>
#include <SFML/Audio.hpp>

int main()
{
sf::RenderWindow Window(sf::VideoMode(800, 600, 32), "SFML Sample Application");

sf::Image Image;
Image.LoadFromFile("image.png");
sf::Sprite Sprite(Image);
Sprite.Resize(800.0f, 600.0f);

sf::SoundBuffer Buffer;
Buffer.LoadFromFile("sound.wav");
sf::Sound Sound(Buffer, true);
  Sound.SetPosition(5.0f, 1.0f, 10.0f);
Sound.Play();
  sf::Listener::SetPosition(0.0f, 0.0f, 0.0f);

while (Window.IsOpened())
{
sf::Event Event;
while (Window.PollEvent(Event))
{
switch (Event.Type)
{
case sf::Event::Closed:
Window.Close();
break;
default:
break;
}
}

Window.Clear();
Window.Draw(Sprite);
Window.Display();
}

return 0;
}

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
openal32.dll
« Reply #1 on: July 08, 2011, 10:36:37 am »
It is necessary, but you might already have (a bad) one installed in Windows/System32.
Laurent Gomila - SFML developer

Xander314

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
    • http://sfmlcoder.wordpress.com/
    • Email
openal32.dll
« Reply #2 on: July 08, 2011, 10:39:39 am »
Oh yes, so I do ;)

Quote
bad

As in outdated?

If I provide the other one in the project directory, will the application find that one before it searches system32?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
openal32.dll
« Reply #3 on: July 08, 2011, 10:41:16 am »
Quote
As in outdated?

As in "outdated" and "buggy" ;)

Quote
If I provide the other one in the project directory, will the application find that one before it searches system32?

Yes.
Laurent Gomila - SFML developer

Xander314

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
    • http://sfmlcoder.wordpress.com/
    • Email
openal32.dll
« Reply #4 on: July 08, 2011, 10:43:40 am »
Quote
As in "outdated" and "buggy"

Mostly, I find that outdated implies buggy :P

Thanks for the help :)

 

anything