Author Jeff.Pursell
Recipients Jeff.Pursell
Date 2010-04-04.13:36:50
SpamBayes Score 8.12667e-11
Marked as misclassified No
Message-id <1270388213.12.0.14457017538.issue8311@psf.upfronthosting.co.za>
In-reply-to
Content
I tried to create a 4 second file and only heard the first 2 seconds.  The file size was correct for a 44.1 kHz, 16 bit mono file at 4 seconds, but both aplay and audactiy ignored the second half of the file.  I went to this page https://ccrma.stanford.edu/courses/422/projects/WaveFormat/ and opened the output with a hex editor in little endian mode.  I found that at offset 40, the data chunk size was wrong.  It looked like it was just set to the number of samples.  It should be the number of samples times bytes-per-sample (2) times number-of-channels (1 in my case).  I manually set the number from 176400 to 352800 and that solved the problem for that wav file.

I'm guessing this was just an oversight and the fix will be simple.

I'll attach the code I used to generate the test tone.  Just run python -i testTone.py and it will generate out.wav with the incorrect field.

I am using pything 2.6.4 in ubuntu.
History
Date User Action Args
2010-04-04 13:36:53Jeff.Pursellsetrecipients: + Jeff.Pursell
2010-04-04 13:36:53Jeff.Pursellsetmessageid: <1270388213.12.0.14457017538.issue8311@psf.upfronthosting.co.za>
2010-04-04 13:36:51Jeff.Purselllinkissue8311 messages
2010-04-04 13:36:50Jeff.Pursellcreate