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

Author Topic: Cannot load csfml-audio-2  (Read 5041 times)

0 Members and 1 Guest are viewing this topic.

Felheart

  • Newbie
  • *
  • Posts: 23
    • View Profile
Cannot load csfml-audio-2
« on: November 03, 2011, 05:45:11 pm »
Hello

consider this little program:

Code: [Select]


using SFML.Audio;
using SFML.Graphics;
using SFML.Window;

namespace SFML2
{
static class Program
{
static RenderWindow _window;


public static void Main(string[] args)
{
_window = new RenderWindow(new VideoMode(800, 500), "Title", Styles.Default, new ContextSettings(32, 0, 8, 999, 999));

SoundBuffer buffer = new SoundBuffer("ui3.wav");
Sound sound = new Sound(buffer);

while (_window.IsOpened())
{
_window.WaitAndDispatchEvents();

sound.Play();

_window.Display();
}
}
}
}


In my VS project I have the following files:
csfml-audio-2.dll
csfml-graphics-2.dll
csfml-window-2.dll
sfmlnet-audio.dll
sfmlnet-graphics.dll
sfmlnet-window.dll

All set to: Copy if newer.

The program runs and crashes with the error:
System.DllNotFoundException csfml-audio-2.dll could not be found
(or something similar, my VS is in german)

But all files are there. I tried drawing simple sprites and it works.
How do I fix this?
Thanks for any help in advance. I really like sfml (and its bindings :D)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Cannot load csfml-audio-2
« Reply #1 on: November 03, 2011, 07:28:42 pm »
You also need sndfile.dll and openal32.dll.
Laurent Gomila - SFML developer

Felheart

  • Newbie
  • *
  • Posts: 23
    • View Profile
Cannot load csfml-audio-2
« Reply #2 on: November 03, 2011, 08:24:29 pm »
Thanks,
now it doesn't crash. But my wav file does not play.
I have 5 files, but only 3 of them are being played.

Could you have a look at it please?
Here is one of the files that doesn't play: http://dl.dropbox.com/u/3192286/ui3.rar

The others are just silent

Felheart

  • Newbie
  • *
  • Posts: 23
    • View Profile
Cannot load csfml-audio-2
« Reply #3 on: November 04, 2011, 08:46:38 am »
I tried many different files now but it's very strange, some sounds play and some don't.

But I can't find a reason why.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Cannot load csfml-audio-2
« Reply #4 on: November 04, 2011, 09:15:02 am »
Any error message in the console?

Have you tried to play these files with a regular audio player?
Laurent Gomila - SFML developer

Felheart

  • Newbie
  • *
  • Posts: 23
    • View Profile
Cannot load csfml-audio-2
« Reply #5 on: November 04, 2011, 10:20:20 am »
No error message in the console.
And yes I tried winamp and windows media player. Both play the file correctly.