In the Hearing section of the Universal Access dialog, you can enable features helping people with impaired hearing.
If the Visual Alerts are turned on, a window title or the entire screen is flashed when an alert sound occurs for the respective application.