20

At times, my computer suddenly played some annoying short sound (sounds like darrrt, seems not from the system), and it's so short that I have no idea where it comes from (and cannot capture it).

Is there any ways to find which program/process did that? (I really want to kill it!)

I am using OS X Mavericks.

migrated from unix.stackexchange.com Nov 15 '13 at 20:25

This question came from our site for users of Linux, FreeBSD and other Un*x-like operating systems.

  • Short buzzer sound is used by the calendar notifications in most cases. Observe whether a reminder appears on top right of the screen or in the notification center. – bayindirh Nov 15 '13 at 7:50
  • dtrace might be able to probe the information. A quick look over the in built scripts doesn't seem to provide anything to probe specific devices though so probably needs a custom script – mindthemonkey Nov 15 '13 at 9:23
  • Thanks for coming back with an answer, but can you please add it as an answer below (and accept it) instead of modifying the question? – nohillside Dec 5 '13 at 8:00
  • 1
    @patrix Thanks for your comment. I just followed your advice. – qweszxcj Jul 7 '14 at 18:52
5

Sounds like the iMessage logged in notification.

Try this command in terminal to verify:

afplay "/Applications/Messages.app/Contents/Resources/Logged In.aiff"

To turn if off you can turn off "Play sound effects" in the iMessage preferences.

4

SoundBunny might be able to help with this. The primary purpose of the app is to let you control various apps' sound levels, but it also usually shows you what apps have recently made sounds, which might help.

You can download a free demo from their website and leave it running until you hear the noise again, then switch over to SoundBunny and see what it shows.

  • 4
    How does it show what apps have recently made sounds? From what I can tell it just shows an alphabetical list of the apps that are open. And the log doesn't show when sounds are played, just when apps start/end. – studgeek May 27 '16 at 18:57
4

While it's not possible to check that directly, here are some workarounds:

  • If you're using Google Chrome (or similar web-browser), look for speaker icon next to tab or window (e.g. check in Window menu).
  • If you're using Safari, you should see also speaker icon next to the tab which is playing.
  • Some apps such as SoundFlower can provide extra kernel extension for pass-through audio, so then they can check which processes are accessing sound device.
  • Double check Notifications in System Preferences, and either set Do Not Disturb or disable Play sound for notifications for the recent or all apps. See this post.
  • Check for log entries, e.g. by the following command:

    log stream --level=debug
    
  • Check for any file activity by fs_usage command, e.g.

    sudo fs_usage
    
  • Using trial and error, pause and resume processes to find out about the process, e.g.

    ps d
    kill -STOP 1234 5678 # Stop processes via PID(s).
    kill -CONT 1234 5678 # Resume selected processes.
    
2

Here is what I did to find a pesky application playing a system file. Go to System Preferences -> Sound -> Sound Effects. Toggle through the effects and make note of the sound that your mystery application is playing. When you find it go to the terminal and type:

sudo fs_usage | grep "aiff"

Enter in the system password if asked.

Wait for the sound to get played again and then look at the terminal output. Look for the name of the sound file you noted in the sound effects and look all the way to the right. On the right you should see the application that played the sound file. Now simply go to that application and tell it to disable playing the sound file if possible.

1

Thanks for all answers! The problem was solved, it was turned out to be caused by a Safari plug-in( notifier of Gmail ). Method: inspiration(sorry guys I just found it out by realizing I installed a weird plugin... really hard to explain how the idea came to my mind...).

  • 8
    It would probably help others if you explained how you figured out the cause (i.e., what method you used to identify which app was responsible). That might help others in the same situation, even if they don't have the same Safari plug-in. – D.W. Jul 8 '14 at 5:54
1

Boom 3D can do this, and a lot more.

Install it, enable system-wide support in the main window of the app (it requires you to install another extension), then you can click on the tray icon:

Just click on the purple button near the top-right corner, and you will be shown a list of all the apps and their volume. Apps playing music will have a little green circle:

  • @Allan I know, but this is just sharing a program's name, the link is there only for convenience. And there is really not much to explain why it is the best, as it is not the best. Other answers are just as valid. – HappyFace Mar 23 '18 at 14:00
  • Can you edit your answer to explain how somebody could use this application to solve the problem described in the question? From looking at the feature description it's hard to see how this could work. – nohillside Mar 23 '18 at 14:18
  • 1
    @patrix Done ;) – HappyFace Mar 23 '18 at 17:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .