[SDL] Ring a bell...
Chris Nystrom
cnystrom at newio.org
Sun May 6 16:12:18 PDT 2007
On 5/6/07, Manuel García Cabrera <manugarciac5 at yahoo.com.ar> wrote:
> My application exits when ESCAPE is pressed. However, if another key is
> pressed I'd like the application to make a sound (like an error bell
> sound, like those you get when you pressed all the keys on the keyboard
> at once sometimes). Is there an SDL function to do this? If not, just
> some simple C++ way to do this should help.
You probable want to use SDL_Mixer.
http://www.kekkai.org/roger/sdl/mixer/
See part 2: Making a noise. Substitute "error bell" for noise and some
logic like if (key != ESC) and you should be all set.
Chris
--
E-Mail: Chris Nystrom <cnystrom at newio.org>
Saving the world from web programming.
http://www.newio.org/ - AIM: nystromchris
More information about the SDL
mailing list