Audioread function and 32bit audio
조회 수: 7 (최근 30일)
이전 댓글 표시
The help information for audioread ( https://uk.mathworks.com/help/matlab/ref/audioread.html ) says that 32 bit audio is read from a .WAV file into a range of -1:+1 (if it's read as a 'native' datatype), at single precision.
My question:
- Is the full-scale of IEEE single precision data being 'scaled' internally to a range of -1:+1 in some way, or is the fuction reading in all the raw IEEE single precision numbers and somehow 'zooming in' as default to show only -1:+1, since that's the range within which we would expect audio to have been scaled (however it was generated or measured)? This latter option would presumably mean that Matlab could read in samples that are greater than -1:+1, and store them without scaling, if that's what was in the WAV file.
댓글 수: 0
답변 (1개)
Walter Roberson
2023년 5월 2일
If you encounter a .wav file with 32 bit single precision data, and the data is outside of the range -1:+1 then the data is out-of-specification, an invalid .wav file .
If the .wav uses a codec (not just uncompressed data) then the codec will have assumed that the data is in the correct range, and should be unable to decompress out of the range (except perhaps due to round-off error.)
I'm not saying such files will never happen... but they "shouldn't".
댓글 수: 3
Walter Roberson
2023년 5월 2일
The file format described at https://www.sounddevices.com/32-bit-float-files-explained/ is the IEEE 754 single precision floating point representation.
참고 항목
카테고리
Help Center 및 File Exchange에서 Audio I/O and Waveform Generation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!