Why do I receive a warning with the WAVWRITE function in MATLAB 5.3 (R11)?

The following warning is generated even though the data I am trying to write is within the [-1 +1 ] range. This did not occur in MATLAB 5.2 (R10).
Warning: Data clipped during write to file:test.wav
> In wavwrite.m (PCM_Quantize) at line 242
In wavwrite.m (write_wavedat) at line 260
In wavwrite.m at line 104

 Accepted Answer

This problem occurs because '+1' cannot be written exactly to the WAV file; it will be 1-bit short of '+1', i.e., 1 - 1/32768 = 0.99996948242188 in 16-bit mode. This is what is producing the warning. It is ok to disregard the warning.

More Answers (0)

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!