What is the easiest way to play any sound file?

Under Linux/X11, is there a way to generate a beep or play an audio sound file when a mouse click event is generated?

  • This is for a touchscreen kiosk application.  When the user touches the screen, there should be audio feedback.

  • Answer:

    Why not? How exactly depend on the language/framework you are using, but usually you get an event on mouse click, where you can execute code, including the one that plays sound. Also, depending on the library, you may get different events on mouse click or pressing the  touchscreen.

Gustavo Muslera at Quora Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.