Discussion:
[SoX-devel] Converting rf64 to Adobe Audition 3.0
Hans Kraus
2015-08-16 15:34:12 UTC
Permalink
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.

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

Kind regards, Hans

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

------------------------------------------------------------------------------
Måns Rullgård
2015-08-16 23:52:20 UTC
Permalink
Post by Hans Kraus
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
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?
Post by Hans Kraus
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.
Post by Hans Kraus
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
***@mansr.com

------------------------------------------------------------------------------
Hans Kraus
2015-08-17 17:01:35 UTC
Permalink
Hi Måns Rullgård,

thanks a lot for your help.
Post by Måns Rullgård
[...]
Post by Hans Kraus
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?
As far as I know yes. I did read that somewhere on the net but I can't
find that link anymore.

The header is a dump from a real file.
Post by Måns Rullgård
Post by Hans Kraus
[...]
Kind regards,
Hans

------------------------------------------------------------------------------
Loading...