SoundVolume - set or get the system speaker sound volume
SoundVolume sets or gets the computer's system speaker sound volume
Syntax:
volume = SoundVolume(volume);
SoundVolume(volume) sets the system speaker sound volume. The volume value should be numeric, between 0.0 (=muted) and 1.0 (=max).
volume = SoundVolume gets the current speaker sound volume (0.0-1.0).
volume = SoundVolume(volume) sets the system speaker sound volume and returns the previous volume value (from before setting the new value).
Note:
SoundVolume relies on Java functionality that is fully supported and documented. In this respect, SoundVolume is different from some of my other Matlab-Java utilities that rely on undocumented code.
Bugs and suggestions:
Please send to Yair Altman (altmany at gmail dot com)
Technical description:
http://UndocumentedMatlab.com/blog/updating-speaker-sound-volume
http://java.sun.com/docs/books/tutorial/sound
Cite As
Yair Altman (2026). SoundVolume - set or get the system speaker sound volume (https://www.mathworks.com/matlabcentral/fileexchange/25584-soundvolume-set-or-get-the-system-speaker-sound-volume), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- MATLAB > Data Import and Analysis > Data Import and Export > Standard File Formats > Audio and Video Data >
Tags
Acknowledgements
Inspired: MEAP - Matlab Enhanced Audio Player
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
