Page 1 of 1

Does the R24 produce invalid WAV files?

Posted: Tue Mar 13, 2018 1:49 pm
by sciurius
My R24 (firmware rev. 1.12) seems to produce WAV files that are rejected by several audio processing tools as being invalid or corrupt.

On linux, the sndfile library (used by many tools, e.g. Ardour) rejects the WAV files, e.g. a sndfile-info report:

Code: Select all

Error : Not able to open input file AUDIO/STE-000.WAV.
File : AUDIO/STE-000.WAV
Length : 31239264
RIFF : 31239256
WAVE
fmt  : 16
  Format        : 0x1 => WAVE_FORMAT_PCM
  Channels      : 2
  Sample Rate   : 44100
  Block Align   : 4
  Bit Width     : 16
  Bytes/sec     : 176400
LIST : 393164
    *** Found weird-ass zero marker. Jumping to end of chunk.
Request for header allocation of 786328 denined.
    *** Offset is now : 0x5FFFC
*** Unknown chunk marker (1D6AC60) at position 393212. Exiting parser.

Error in WAV file. No 'data' chunk marker.
Tools like mediainfo do not report errors, but the returned information is incomplete. E.g.

Code: Select all

General
Complete name                            : AUDIO/STE-000.WAV
Format                                   : Wave
File size                                : 29.8 MiB
Overall bit rate mode                    : Constant

Audio
Format                                   : PCM
Format settings                          : Little / Signed
Codec ID                                 : 1
Bit rate mode                            : Constant
Bit rate                                 : 1 411.2 kb/s
Channel(s)                               : 2 channels
Sampling rate                            : 44.1 kHz
Bit depth                                : 16 bits
In particular, the "Duration" info is missing, indicating that there is something wrong with the file.

If you have the possibility to verify one of your WAV files, please report here. R24 and other devices. Maybe we have to file an issue at Zoom.

Re: Does the R24 produce invalid WAV files?

Posted: Tue Mar 13, 2018 2:56 pm
by Wulfraed
Given how many years the R-series have been on the market, if the files were that out-of-spec there'd have been a lot of complaints by now, and likely a firmware update -- though in truth, I suspect the code for writing WAV data hasn't changed since the HDx devices (I seem to recall the MRS series used a different internal data structure).

I could see some problems if the device is being shutdown in a way that does not permit proper saving of data (the size information is stored in the header, and changing header data on flash media means copying the existing allocation block to a newly erased block while writing the changed values and changing the block mapping).




PS: If those were actual cut&paste entries, I'm not sure I'd want to trust software with spelling errors ("denined" => "denied" -- unless the software is removing anything identified as produced by the band NiN) and crude terminology (which I won't bother quoting).

Re: Does the R24 produce invalid WAV files?

Posted: Tue Mar 13, 2018 3:58 pm
by sciurius
I would like to agree.

But the WAV files produced by my R24 are all rejected by Ardour, which is not an insignificant tool.
Can you send me a small WAV produced by the R16? Preferrably 44.1 kHz /16 bit?

Re: Does the R24 produce invalid WAV files?

Posted: Wed Mar 14, 2018 2:05 am
by sciurius
The creator/maintainer of libsndfile responds (emphasis mine):
As for the error you're seeing, this is due to your device producing invalid files, or at the very least, files that interpret the very loose (and poor quality) WAV file specs differently to libsndfile and most other software.
The extremely large LIST chunk may be causing the parser to hit a corner case that then cause the parse to fail.
He is willing to accept a clean patch to deal with this anomality.

EDIT: Issue https://github.com/erikd/libsndfile/issues/370

Re: Does the R24 produce invalid WAV files?

Posted: Thu Mar 15, 2018 5:01 am
by sciurius
It turned out there was a small coding mistake in the libsndfile library, and I provided a fix which is now applied.
So it is not the R24 producing incorrect WAV files.

Still I would like to see some short samples of R8 and R16 WAV files for comparison.

Re: Does the R24 produce invalid WAV files?

Posted: Thu Mar 15, 2018 12:09 pm
by Jim_Fogle
My brother has, or at least had a R16 the last time I visited.

I've e-mailed him and requested four sample wav files that are 05 to 10 seconds in length. I've asked for both mono and stereo files in both 16 and 24 bit depth.

I'll post again once I receive a response.

Re: Does the R24 produce invalid WAV files?

Posted: Fri Mar 16, 2018 3:40 am
by sciurius
For the record: The WAVs produced by the L12 and H2n are totally different from the R24 WAVs. The R8, R16 and R24 seem to produce similar files.

R24 has fmt, LIST and data subchunks. The LIST is big (393164 bytes).
R16 has fmt, LIST and data subchunks. The LIST is big (196556 bytes).
R8 has fmt, LIST and data subchunks. The LIST is big (393164 bytes) .

All R24 and R16 files I've seen so far did have the LIST filles with binary zeroes.
The only R8 file I've seen had non-zero contents in the LIST but the contents was not understood by several tools.

L12 has fmt, PAD and data subchunks.
H2n has bext, fmt, PAD and data subchunks.

EDIT: Added R16 and R8 data,

Re: Does the R24 produce invalid WAV files?

Posted: Fri Mar 16, 2018 8:53 am
by Jim_Fogle
Sciurius,
Unfortunately my brother no longer has his R16. I'm not too surprised as he loves to trade, sells and buy music equipment and vehicles.
I'm sorry I am not able to provide you with the sample audio files.

Do you have a R24, L12 and H2n? That's quite the collection!

Re: Does the R24 produce invalid WAV files?

Posted: Fri Mar 16, 2018 9:03 am
by Wulfraed
I'll try to create something on an R16 over the weekend... Won't be very musical (I'm thinking of using my kazoo with the pressure fit dynamic microphone -- yes, a kazoo that came with a pickup!). I'm thinking a straight mono track, a bounce of it through some effect, and then a stereo master blend of the two.

Re: Does the R24 produce invalid WAV files?

Posted: Sat Mar 17, 2018 8:21 pm
by Wulfraed
sciurius wrote:
Thu Mar 15, 2018 5:01 am
Still I would like to see some short samples of R8 and R16 WAV files for comparison.
Two files created -- hopefully they won't be deleted too fast... My ISP web space allotment is only 10MB (per email address) and the stereo MASTER file alone came to 13MB! These are from the R16.

http://bieberd.home.netcom.com/MONO-000.WAV
http://bieberd.home.netcom.com/MASTR000.WAV

The second is a bounce/master pass, through an insert effect, of the first.

PLEASE LET ME KNOW WHEN YOU'VE DOWNLOADED THEM -- so I can delete them from my web space.

Re: Does the R24 produce invalid WAV files?

Posted: Sun Mar 18, 2018 4:09 am
by sciurius
Jim_Fogle wrote:
Fri Mar 16, 2018 8:53 am
Do you have a R24, L12 and H2n? That's quite the collection
I have a R24 and a H2n. The other data is derived from files that were contributed by people with access the the devices.

Re: Does the R24 produce invalid WAV files?

Posted: Sun Mar 18, 2018 4:10 am
by sciurius
Wulfraed wrote:
Sat Mar 17, 2018 8:21 pm
Two files created -- hopefully they won't be deleted too fast...
Got them -- thanks a lot.
I've updated viewtopic.php?f=17&t=24861&p=212613#p212613 to add the R16 data.

Re: Does the R24 produce invalid WAV files?

Posted: Sun Mar 18, 2018 9:08 am
by Wulfraed
Okay -- deleting the files from the web space...

Hope my horrendous kazoo renditions of the openings for Beethoven's 5th, The Hanging Tree, (very off tempo) One Tin Soldier, and Holderkin Sheep Song didn't drive anyone insane. (Especially after bouncing through a tremolo/delay effect on the master)