SafeSnd - A safer version of sound()
by Earl Vickers
08 Jul 2008
(Updated 09 Jul 2008)
This scales back the sound playback level, in case your audio algorithm blows up.
|
Watch this File
|
| File Information |
| Description |
This is a simple function to prevent massive clipping and possible hearing damage in case the audio algorithm you were working on happens to be unstable or has too much gain.
This is not a limiter; it just scales back the entire signal if necessary to ensure that the maximum peak value is no more than +/-1.0. If the peak input level exceeded 1.0, safesnd() displays the amount of playback level reduction in dB. There's nothing magic here; it's just a handy utility function.
Also, note that it is generally not a good idea to debug your audio algorithms using headphones! |
| Required Products |
Signal Processing Toolbox
|
| MATLAB release |
MATLAB 7.5 (R2007b)
|
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
|
Contact us at files@mathworks.com