©2003 Kåre Sjölander and Jonas Beskow
Introduction Download Documentation Links Forum
WaveSurfer user forum

FAQ  FAQ
Search  Search
Memberlist  Memberlist
Register  Register
Profile  Profile
Login  Login

Problem reading WAV files containing non-data chunks

 
Post new topic   Reply to topic    www.speech.kth.se/wavesurfer Forum Index -> WaveSurfer
View previous topic :: View next topic  
Author Message
billposer



Joined: 16 Oct 2003
Posts: 1
Location: Philadelphia

PostPosted: Thu Oct 16, 2003 5:07 am    Post subject: Problem reading WAV files containing non-data chunks Reply with quote

I recently began using a Sonifex Courier digital recorder
and encountered problems using the resulting files with
Wavesurfer, including version 1.5.4.

Wavesurfer announces that it has read the file but produces
an empty display, The problem results from the format of the
wav files generated by the Sonifex. As seen in the report
generated by my wavinfo program on the structure of a typical file,
the files produced by the Sonifex include not only a header and
a data chunk but a cue chunk, a playlist chunk and a padding
chunk that causes the audio data to start at offset 32K.

0: RIFF identifier.
4: chunk size = 4,108,536 bytes.
8: WAV identifier.
12: format chunk identifier
16: format chunk size = 16 bytes.
22: one channel (mono).
24: Sampling Rate = 22,050 samples per second.
28: Average Data Rate = 44,100 bytes per second.
32: Bytes_Per_Sample value of 2 indicates 16 bit mono
34: Bits_Per_Sample = 16.
36: chunk id
40: chunk length
44: chunk of type cue (standard) length 28 bytes
72: chunk id
76: chunk length
80: chunk of type plst (standard) length 16 bytes
96: chunk id
100: chunk length
104: chunk of type pad (non-standard) length 32,656 bytes
32760: chunk id
32764: chunk length
32768: chunk of type data (standard) length 4,075,776 bytes
amounting to 1 minute and 32.4 seconds

Removing the non-data chunks eliminates the problem.

I suspect that Wavesurfer is reading the first chunk without
checking that it is a data chunk. Since the first chunk
contains the equivalent of only 14 samples, nothing appears
on the display.

For my own purposes I have solved the problem by writing a
program that strips the three extra chunks. Since the
Sonifex is not widely used for research purposes (they are
aimed at journalists, and though quite nice, are very
expensive - by chance I had the opportunity to get one at a
large discount), this may not be a widespread
problem. However, according to my reading of the RIFF
standard, the files produced by the Sonifex are
standard-conforming. So this arguably should be considered a bug.
Back to top
View users profile Send private message Send email Visit posters website
kare



Joined: 16 Aug 2002
Posts: 371
Location: KTH, Centre for Speech Technology

PostPosted: Wed Oct 29, 2003 2:08 pm    Post subject: Reply with quote

The WAV header decoder knows how to skip unknown chunks, but obviously there's a bug somewhere. Could you send a short file by e-mail to kare@speech.kth.se?
Thanks!

Kåre
Back to top
View users profile Send private message Visit posters website
Display posts from previous:   
Post new topic   Reply to topic    www.speech.kth.se/wavesurfer Forum Index -> WaveSurfer All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2.0.1 © 2001, 2002 phpBB Group