Be the first to rate this file! 144 downloads (last 30 days) File Size: 1.86 KB File ID: #24033

play_sound

by Phillip M. Feldman

 

07 May 2009

Code covered by BSD License  

play_sound loads and plays the specified sound file.

Download Now | Watch this File

File Information
Description

OVERVIEW

play_sound(id) loads and plays the specified sound file.

INPUTS

id identifies the sound file to be loaded, and can be either a string or an integer. If id equals zero, play_sound returns immediately without playing any sound. If id is an integer between 1 and 6, the value is mapped to a Windows system sound as follows:

1: chimes 2: chord 3: ding 4: notify 5: tada 6: Windows XP Battery Critical

If id is a string, the string may include the full path to the file. If the path is not provided, play_sound looks in the current directory, and then in the directory C:\Windows\media.

MATLAB release MATLAB 7.7 (R2008b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
18 Aug 2009 Tim

Missing function substr

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
sound Phillip M. Feldman 08 May 2009 10:11:43
play_sound Phillip M. Feldman 08 May 2009 10:11:43
sound file Phillip M. Feldman 08 May 2009 10:11:43
beep Phillip M. Feldman 08 May 2009 10:11:43
chimes Phillip M. Feldman 08 May 2009 10:11:43
chord Phillip M. Feldman 08 May 2009 10:11:43
ding Phillip M. Feldman 08 May 2009 10:11:43
tada Phillip M. Feldman 08 May 2009 10:11:43
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com