Hans Kraus <h...@hanswkraus.com> writes:

> Hi,
>
> I'm currently recording with Audacity 2.1.0 in rf64 format for more
> than 4 GB samples and using Audition 3.0 for declicking and denoising
> it.
>
> Audition 3.0 (as you may already know) has its own way to deal with
> more than 4 GB samples, the header looks like:
>
> RIFF
> 0xFF 0xFF 0xFF 0xFF
> ---------------------
> fmt
> 0x10 0x00 0x00 0x00
> 0x0001
> 0x0002
> 0x00017700 = 96000
> 0x0008CA00 = 576000
> 0x0006
> 0x0018 = 24
> ---------------------
> data
> 0xFFFED210 = 42994890000
> .....................
>
> As far as I understand the 0xFFFFFFFF as file length is the marker for
> the extended format which consists of consecutive data chunks with a
> length of 0xFFFED210 each, the last one possibly shorter.

Is the only difference from regular RIFF/WAVE format the presence of
multiple 'data' chunks with the total size give as 0xffffffff?

> I'd like to implement that in SoX. Are there any hints/tips for me?

That shouldn't be too hard.  Look at the write_samples() function in
wav.c.  When writing PCM, you end up in the 'default' case of the switch
statement:

            len = lsx_rawwrite(ft, buf, len);
            wav->numSamples += (len/ft->signal.channels);

Here you can add a check to insert a new data chunk header whenever
necessary.  You also need to modify wavwritehdr() to be aware of this.

> PS: I asked a similar question on the SoX users list, but didn't get
> an answer.

Neither of the lists seem very active of late.

-- 
Måns Rullgård
m...@mansr.com

------------------------------------------------------------------------------
_______________________________________________
SoX-devel mailing list
SoX-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-devel

Reply via email to