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

Author Topic: [MAC] Unwanted Alert Sound playing when pressing ESCAPE  (Read 4319 times)

0 Members and 1 Guest are viewing this topic.

AdrianM

  • Newbie
  • *
  • Posts: 43
    • View Profile
[MAC] Unwanted Alert Sound playing when pressing ESCAPE
« on: August 16, 2009, 12:30:00 am »
I have created a simple cocoa application from the template, renamed main.m to main.mm and added the opengl sample from the samples directory which comes with the sfml SDK. I modified it a little bit so that no background image is loaded and when you press escape to not exit. But everytime i press escape an alert sound plays. I don't want this to happen, how can i prevent it?
I want the bundle with the window to use it for registering the application (outside opengl), so this is a must, everything is done and working except for this naughty alert sound. :D. How can i prevent it?

Here is an example project: just run it and press escape, an alert sound will be played. Also i am using SFML 1.5.

http://www.gamesrebirth.com/adrian/alert_test.zip

Meltra Bour

  • Newbie
  • *
  • Posts: 28
    • View Profile
[MAC] Unwanted Alert Sound playing when pressing ESCAPE
« Reply #1 on: August 16, 2009, 09:27:30 am »
I had a similar problem while running tutorials on a linux, my conclusion back then was ...

App.Close(); destroys the openGL context, so in your main loop you first destroy openGL and then you start making openGL calls.

Ether break out of the while loop right after calling App.Close() or
work with a boolean to keep the loop active and move App.Close() to a nice spot after the while loop.

*cross fingers* :P

AdrianM

  • Newbie
  • *
  • Posts: 43
    • View Profile
[MAC] Unwanted Alert Sound playing when pressing ESCAPE
« Reply #2 on: August 16, 2009, 02:16:16 pm »
Quote from: "Meltra Bour"
I had a similar problem while running tutorials on a linux, my conclusion back then was ...

App.Close(); destroys the openGL context, so in your main loop you first destroy openGL and then you start making openGL calls.

Ether break out of the while loop right after calling App.Close() or
work with a boolean to keep the loop active and move App.Close() to a nice spot after the while loop.

*cross fingers* :P


It sounds similar but it is not quite my problem. I never close the application.  The alert sound plays when running the app, i don't call App.Close() when the escape is pressed...

Ceylo

  • Hero Member
  • *****
  • Posts: 2325
    • View Profile
    • http://sfemovie.yalir.org/
    • Email
[MAC] Unwanted Alert Sound playing when pressing ESCAPE
« Reply #3 on: August 16, 2009, 03:24:07 pm »
This has been fixed in the sources of the Subversion repository. You should try to build the frameworks from these sources.
Want to play movies in your SFML application? Check out sfeMovie!

AdrianM

  • Newbie
  • *
  • Posts: 43
    • View Profile
[MAC] Unwanted Alert Sound playing when pressing ESCAPE
« Reply #4 on: August 16, 2009, 07:34:20 pm »
Quote from: "Ceylo"
This has been fixed in the sources of the Subversion repository. You should try to build the frameworks from these sources.


Thanks Ceylo, i compiled the last svn sources and the alert sound is gone!

 

anything