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

Author Topic: Making sound play on a Keyboard Event.  (Read 2703 times)

0 Members and 1 Guest are viewing this topic.

Greentoast

  • Newbie
  • *
  • Posts: 9
    • View Profile
Making sound play on a Keyboard Event.
« on: May 17, 2015, 09:29:15 pm »
So basically I want the designated sound to play once I click right. I keep getting the errors
"Expect ; before buffer" ,"Sound Buffer is not a member of sf" and "Buffer was not declared on this scope"
http://pastebin.com/TXaW21MS

Please help me out! When I get experienced I will be sure to help out people too.

Greentoast

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Making sound play on a Keyboard Event.
« Reply #1 on: May 17, 2015, 09:35:11 pm »
Line 83-90 is where the issue is.

G.

  • Hero Member
  • *****
  • Posts: 1593
    • View Profile
Re: Making sound play on a Keyboard Event.
« Reply #2 on: May 17, 2015, 09:40:49 pm »
sf::SoundBuffer is part of the SFML audio module.
Include SFML/Audio.hpp if you want to use it.

Greentoast

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Making sound play on a Keyboard Event.
« Reply #3 on: May 17, 2015, 09:47:09 pm »
Thanks that worked!