SFML community forums
Help => Audio => Topic started by: acrin1 on June 04, 2008, 12:14:23 am
-
I recently added some sounds to my current project and noticed that there were some very brief delays in my display and then several seconds later a much longer pause - basically the program locks up for a few seconds. It was very noticeable as it's a scrolling 3D view drawn with OpenGL. I'm tried WAV and OGG files and the result is the same. The sounds themselves seem to play fine.
I've tried adding a simple sound to play in the SFML OpenGL example of the white cube and got the same results. I added these lines just before the start game loop:
sf::SoundBuffer doorBuffer;
sf::Sound doorSound;
doorBuffer.LoadFromFile("datas/audio/door.wav");
doorSound.SetBuffer(doorBuffer);
doorSound.Play();
I'm using Windows XP, the latest SVN and Visual Studio. I haven't had the chance to test this on another PC yet.
Thanks.
-
That's weird. I'll check this as soon as possible, thanks for the feedback.
-
I've tried your code in the OpenGL sample, and couldn't reproduce the bug.
Can you try again with the latest SVN, and footsteps.wav from the samples data ?
-
I've tried your code in the OpenGL sample, and couldn't reproduce the bug.
Can you try again with the latest SVN, and footsteps.wav from the samples data ?
I've updated to the latest SVN and tried the footsteps.wav file and I get the same result. As far as I can see I'm using the most recent verions of everything.
I've tried a few different sound files and it appears that the freeze appears about 20 seconds after the sound finishes playing. I also tried this on another PC and had the same result.
-
Which version of SFML are you using ? Debug / release ? Static / dynamic ?
Which version of Visual Studio ?
I still can't reproduce the bug, although I'm using the exact same configuration and code as you.
-
Which version of SFML are you using ? Debug / release ? Static / dynamic ?
Which version of Visual Studio ?
I still can't reproduce the bug, although I'm using the exact same configuration and code as you.
I'm using the latest SVN. I had previously used 1.2 and experienced the same problem. I'm using debug mode with I think dynamic libraries (I need to include the SFML DLLs in my project folder in order to run my executable).
The following libraries are in the project settings:
sfml-system-d.lib sfml-window-d.lib sfml-graphics-d.lib sfml-audio-d.lib opengl32.lib glu32.lib
I'll try release / static.
Thanks.
-
... and Visual Studio 2005 Professional with C++.
-
Ok, let me know if there's a difference with static libraries.
-
Ok, let me know if there's a difference with static libraries.
After more tests with different PCs and the different libraries it seems to have been some strange combination problem with my Visual Studio setup / libraries on my main PC rather than SFML. Sorry. Thanks for your looking into this.
-
Ok, that's a good news :)