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

Author Topic: Failed to open Audio Device  (Read 8296 times)

0 Members and 1 Guest are viewing this topic.

supperpiccle

  • Newbie
  • *
  • Posts: 17
    • View Profile
    • Email
Failed to open Audio Device
« on: July 03, 2012, 05:42:36 pm »
I just started trying to learn Audio in sfml today.  The graphics work fine although i had to download all the dlls online as i did with the audio part of sfml too.  Everytime i try to open a sound it gives the messege in the console failed to open audio device.  What does this mean how do I fix it.  I'm running code blocks too btw.  I have included the audio stuff in the compiler stuff too

mimipim

  • Newbie
  • *
  • Posts: 49
    • View Profile
Re: Failed to open Audio Device
« Reply #1 on: July 03, 2012, 05:46:03 pm »
You have to be more clear.
Which version of SFML are you using, well how you load the audio and make sure the path to the audio is correct.

EDIT:
What you mean with that you get the dll online?
« Last Edit: July 03, 2012, 05:48:16 pm by mimipim »

supperpiccle

  • Newbie
  • *
  • Posts: 17
    • View Profile
    • Email
Re: Failed to open Audio Device
« Reply #2 on: July 03, 2012, 05:49:44 pm »
I'm sorry I'm using sfml 1.6 here is my code


#include <SFML/Audio.hpp>
#include <SFML/System.hpp>
#include <Windows.h>
#include <iostream>

using namespace std;
int main()
{
    int c;
    sf::SoundBuffer Buffer;
    Buffer.LoadFromFile("beep-8.wav");
    sf::Sound Sound;
    Sound.SetBuffer(Buffer);
    Sound.SetLoop(true);
    Sound.Play();
    cout<<"here";
cin>>c;
}

I downloaded all the audio dlls from the same website that gave me the graphics dlls and graphics work.....Just not this i added the link stuff at link settings in code blocks

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Failed to open Audio Device
« Reply #3 on: July 03, 2012, 07:03:50 pm »
There's a code that and there's even a code=cpp tag, which will magically highlight your code... ::)

I highly recommend not to use SFML 1.6 since it's outdated and SFML 2 is already in RC state. You can download it here (so you don't need some strange website or so).

Are your audio devices working, i.e. can you listen to music with any music player?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Yukilay

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • Email
Re: Failed to open Audio Device
« Reply #4 on: January 25, 2013, 08:17:13 pm »
Hi all, I'm new here.

I'm learning to use SFML and I've got the same problem than you. I just try to compile the 'sound' sample that full SDK provide us and it doesn't work.

I usually speak in Skype and listen my music in Windows Media Player, so it isn't a sound card problem I guess.

I'm using Windows 7, CodeBlocks 12.11 with MinGW and SFML 1.6 because I would prefer 2.0 release isn't Beta version and I don't know if it's stable.

I hope you can help me! =)

Thanks

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Failed to open Audio Device
« Reply #5 on: January 25, 2013, 10:28:24 pm »
I usually speak in Skype and listen my music in Windows Media Player, so it isn't a sound card problem I guess.
What's your audio setup?
Do you have multiple audio cards? Are you running an application, which can take over the full audio card? Is the audio card driver uptodate?

I'm using Windows 7, CodeBlocks 12.11 with MinGW and SFML 1.6 because I would prefer 2.0 release isn't Beta version and I don't know if it's stable.
Then you should look at the FAQ, e.g. here.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Yukilay

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • Email
Re: Failed to open Audio Device
« Reply #6 on: January 26, 2013, 07:27:48 pm »
Well, I have the Asus Sabertooth X58 motherboard and any sound cards more.

In other hand, I've just read the FAQ and I think I will develop with SFML 2.0. It seems there won't be problems from Beta to Release. I will try if it works now...

Thanks.

Yukilay

  • Newbie
  • *
  • Posts: 6
    • View Profile
    • Email
Re: Failed to open Audio Device
« Reply #7 on: January 28, 2013, 01:53:11 am »
Finally, I downloaded SFML 2.0 (SJLJ), I changed the necessary member function to adapt my code and it works now. I don't know what was happening with 1.6, by the way.

Thanks again :)

 

anything