SFML community forums

Help => Audio => Topic started by: Greentoast on May 17, 2015, 09:29:15 pm

Title: Making sound play on a Keyboard Event.
Post by: Greentoast 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.
Title: Re: Making sound play on a Keyboard Event.
Post by: Greentoast on May 17, 2015, 09:35:11 pm
Line 83-90 is where the issue is.
Title: Re: Making sound play on a Keyboard Event.
Post by: G. 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.
Title: Re: Making sound play on a Keyboard Event.
Post by: Greentoast on May 17, 2015, 09:47:09 pm
Thanks that worked!