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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - glu4it

Pages: [1]
1
Audio / Re: Failed to open the audio device
« on: December 11, 2013, 01:14:36 pm »
Promblem is solved!)
I used wrong openal32.dll and libsndfile-1.dll, so I change it to dlls from SFML directory and now it works. Thank you!

2
Audio / Re: Failed to open the audio device
« on: December 11, 2013, 01:01:14 pm »
Hmmm, I've only heard of this issue with SFML 1.6, but you still might try to apply similar fixes (you can find other posts here).

Try updating your audio card's driver from the manufacturer's website.
Make sure you copy the OpenAL dll next to your executable, that way you ensure the DLL that ships with SFML gets used and not a random on in PATH.
All the drivers are the latest. OpenAL32.dll I added to project's directory and to Debug directory. But it still doesn't work :(

3
Audio / Failed to open the audio device
« on: December 11, 2013, 12:29:37 pm »
Here is my code:
#include <SFML/Audio.hpp>

int main () {
sf::Music Music;
return 0;
}
 
I use Windows 8.1, sfml 2.1. Also i tried it on Windows 7.
and whenever I create my music file I get an error in the console window that says

"Failed to open the audio device"

I've added the audio to the linker.
Graphics and stuff work fine. I just started on music today and now I can't figure out the problem.
Help me please!

4
Audio / Re: Music doesn't work
« on: November 20, 2013, 08:09:24 pm »
I noticed that in the console there is the following message:
"Failed to open the audio device"

5
Audio / Re: Music doesn't work
« on: November 20, 2013, 06:28:58 pm »
I use Microsoft Visual Studio 2008, SFML 2.1, Windows 7.
I also tried to change code to
SoundBuffer buffer;
        if(!buffer.loadFromFile("sounds/171673__fins__failure-1.wav"))
                return EXIT_FAILURE;
        Sound sound;
        sound.setBuffer(buffer);
            sound.play();
 

In this case, the music is not playing, but the game does not break

6
Audio / Re: Music doesn't work
« on: November 20, 2013, 04:49:51 pm »
Supported formats.
Thank you!

UPD
Music mMusic;
        if(!mMusic.openFromFile("sounds/mMusic.ogg"))
                return EXIT_FAILURE;
        mMusic.play();
Recoded to ogg and it still does not work.

7
Audio / Music doesn't work
« on: November 20, 2013, 04:35:08 pm »
Hi. I make a game and try to add a music. But it doesn't work and game crashes :(
What i do wrong?
Music mMusic;
if(!mMusic.openFromFile("sounds/mMusic.mid"))
        return EXIT_FAILURE;
 

8
System / Re: pause in a game
« on: November 15, 2013, 04:53:37 pm »
Thank you! Now it works :)

9
System / pause in a game
« on: November 15, 2013, 04:27:19 pm »
Hi. I'm making a game. And now i want to make a pause. Here my code
while(window.isOpen())
        if(Keyboard::isKeyPressed(Keyboard::Return))
        {
                while(window.isOpen())
                {

                                Event event;
                                while(window.pollEvent(event))
                                {
                                        if(event.type == Event::Closed)
                                                window.close();
                                        else
                                                if (event.type == Event::KeyPressed)
                                                        wait=false;
                                       
                                }
                                if(!wait){
                                               
                               
                                if(Keyboard::isKeyPressed(Keyboard::Escape))
                                {
                                        window.close();
                                }
                               
                               
                                if( Keyboard::isKeyPressed(Keyboard::P))
                                {
                                        wait = true;
                                }

                        window.display();
                  }

           }
 
So, after I press P in game, it stop's, I press P again but game still soped. And when I press another key game starts. What am I doing wrong?
PS Sorry for my bad English.

Pages: [1]
anything