bundles / scipy latest / scipy / io / wavfile / _read_data_chunk
function
scipy.io.wavfile:_read_data_chunk
source: /scipy/io/wavfile.py :447
Signature
def _read_data_chunk ( fid , format_tag , channels , bit_depth , is_big_endian , is_rf64 , block_align , mmap = False , rf64_chunk_size = None ) Notes
Assumes file pointer is immediately after the 'data' id
It's possible to not use all available bits in a container, or to store samples in a container bigger than necessary, so bytes_per_sample uses the actual reported container size (nBlockAlign / nChannels). Real-world examples:
Adobe Audition's "24-bit packed int (type 1, 20-bit)"
nChannels = 2, nBlockAlign = 6, wBitsPerSample = 20
http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/Samples/AFsp/M1F1-int12-AFsp.wav is:
nChannels = 2, nBlockAlign = 4, wBitsPerSample = 12
http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/Docs/multichaudP.pdf gives an example of:
nChannels = 2, nBlockAlign = 8, wBitsPerSample = 20
Aliases
-
scipy.io.wavfile._read_data_chunk