Hello! I write game with DarkGDK, and now I need better audio engine, then DarkGDK internal engine. I tested some freeware engines and found SFML-audio comfortable and easy. But I need answers on some questions. Please, answer on every. (I use Windows 7 Pro x64 and VS2008 Express, computer with modern i5 CPU and old Creative soundcard, OpenAL drivers in Windows are installed.)
1) I wrote a small test program with DarkGDK (for graphics) and SFML-audio (for audio), based on the example from SFML SDK. In the configuration "Release" with libraries "sfml-audio.lib sfml-system.lib" everything (playing sound and music) works perfectly. But in the configuration "Debag" with libraries "sfml-audio-d.lib sfml-system-d.lib" program returns into Windows on 16 line:
14 // Load a sound buffer from a .wav file
15 sf::SoundBuffer buffer;
16 if (!buffer.loadFromFile("sounds/canary.wav")) {return;}
i.e. it can not load sound, and returns. Why? All paths to folders (with .h and .lib) spelled correctly. VS does not give me error, just a program quietly terminates. So now I use "sfml-audio.lib sfml-system.lib" in Debug mode and it
works perfectly.
EDIT So can I continue using libraries without "-d" in Debug mode?
2) I can not get rid of extra DLL by using "-s" libs. I do not think this is the problem of DarkGDK. Can anybody help me?
EDIT Yes, I use SFML_STATIC.
With "sfml-audio-s.lib sfml-system-s.lib" in Release mode VS gives me 58 errors "sfml-audio-s.lib(ALCheck.cpp.obj) : error LNK2001", "sfml-audio-s.lib(SoundStream.cpp.obj) : error LNK2019" etc. (unresolved external symbol), and 57 warnings "sfml-audio-s.lib(SoundFile.cpp.obj) : warning LNK4217", "sfml-audio-s.lib(ALCheck.cpp.obj) : warning LNK4049" etc. (imported locally defined symbol).
With "sfml-audio-s-d.lib sfml-system-s-d.lib" in Debug mode VS gives me many errors "msvcprtd.lib(MSVCP90D.dll) : error LNK2005:" (... already defined in ...), "sfml-system-s-d.lib(ThreadImpl.cpp.obj) : error LNK2019" etc., and many warnings "sfml-audio-s-d.lib(Music.cpp.obj) : warning LNK4217", "sfml-audio-s-d.lib(SoundBuffer.cpp.obj) : warning LNK4049" and other.
3) ...
EDIT Thanks, already answered.
4) Does SFML-audio use SSE, SSE2, SSE3 ? (I do not know, laptop processors have SSE3? They will be able to use my game with SFML-audio?)
5) Does SFML-audio work in Windows XP,Vista,7,8 only with 256 sounds? Can you give me exact number of
buffers and exact number of
sounds and musics for Windows machines? (I need this for specify an array of sounds, buffers.)
EDIT I'm afraid that the game will load into memory more sound files, than player's
hardware driver can create buffers on player's PC.
6.1) Do I need to distribute driver with my game? (oalinst.exe from Creative) I think: does SFML-audio self-sufficient, or users need to install in Windows external driver oalinst.exe? I remember this example from forum:
http://en.sfml-dev.org/forums/index.php?topic=13346.0 Or with Windows Vista,7,8 situation is better then with XP?
6.2) My game loads OpenAL32.dll from Windows/SysWOW64. When I delete this file, game loads OpenAL32.dll from "working directory" where Main.cpp lies. In both cases, everything is working correctly. I.e. OpenAL32.dll from SFML-audio is needed only on computers where no drivers (oalinst.exe) installed?
7) Memory deallocation happens automatically when the variable (sf::Sound sound) goes out of scope, or should we stop the sound, and then destroy it? The same question applies to the sf::SoundBuffer buffer.
Thank you very much for your answers!