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 - Lurnon

Pages: [1]
1
Audio / Sound in Class function vs Sound in Main function
« on: May 25, 2013, 01:46:33 am »
Hello,
everybody.
I use the following code
sf::SoundBuffer SB;
SB.loadFromFile("Sounds\\Richtig.ogg");
sf::Sound Sound(SB);
Sound.play();

One time I use it in the main loop of my application the other time in a function of one of my classes. Both use the exact same for lines of code. The problem is the sound in the main loop is played correctly. In my class function I don't hear anything. I checked the return value of
SB.loadFromFile("Sounds\\Richtig.ogg");
and shows me no problem. But still I can't hear any sound. Does somebody know the
reason for that?

Best regards
Lurnon

Pages: [1]