* Soxi warn about missing extended part of the fmt chunk--but it seems to be there
@ 2019-11-22 15:10 Sylvain Leroux
2019-11-22 18:16 ` Måns Rullgård
0 siblings, 1 reply; 3+ messages in thread
From: Sylvain Leroux @ 2019-11-22 15:10 UTC (permalink / raw)
To: sox-users
[-- Attachment #1.1.1: Type: text/plain, Size: 2440 bytes --]
Hi everyone.
First thank you for the great work and support. I'm in the process of
writing a sound library for an internal project, and I realize more each
day the amount of work the developers may have put in writing SoX.
I am working now on a Wave file exporter, and while using `soxi` to
verify the my wave files are well formed, I noticed the warning "wave
header missing extended part of fmt chunk":
> sh$ soxi -V4 test/tmp/float_32_1.wav
> soxi INFO formats: detected file format type `wav'
> soxi DBUG wav: WAV Chunk fmt
> soxi INFO wav: EXTENSIBLE
> soxi WARN wav: wave header missing extended part of fmt chunk
> soxi DBUG wav: WAV Chunk fact
> soxi DBUG wav: WAV Chunk data
> soxi DBUG wav: Reading Wave file: IEEE Float format, 1 channel, 48000
> samp/sec
> soxi DBUG wav: 192000 byte/sec, 4 block align, 32 bits/samp,
> 643200 data bytes
> soxi DBUG wav: 160800 Samps/chans
>
> Input File : 'test/tmp/float_32_1.wav'
> Channels : 1
> Sample Rate : 48000
> Precision : 24-bit
> Duration : 00:00:03.35 = 160800 samples ~ 251.25 CDDA sectors
> File Size : 643k
> Bit Rate : 1.54M
> Sample Encoding: 32-bit Floating Point PCM
However, it seems to me I write the extended 40 bytes fmt chunk in the file:
> 00000000 52 49 46 46 cc d0 09 00 57 41 56 45 66 6d 74 20 |RIFF....WAVEfmt |
> 00000010 28 00 00 00 fe ff 01 00 80 bb 00 00 00 ee 02 00 |(...............|
> 00000020 04 00 20 00[16 00]20 00 00 00 00 00 03 00 00 00 |.. ... .........|
> 00000030 00 00 10 00 80 00 00 aa 00 38 9b 71 66 61 63 74 |.........8.qfact|
> 00000040 04 00 00 00 80 d0 09 00 64 61 74 61 80 d0 09 00 |........data....|
> 00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
> *
> 0009d0d0
At byte 0x24 we can see 0x0016 which is the size (22 bytes) of the
extended fmt header, followed by the extended header content. And after
that, the `fact` chunk starts.
Why is `soxi` considering the extended header is missing?
FWIW, Microsoft docs seem to be relatively ambiguous, so
I based my wave exporter implementation on
http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/WAVE.html
I don't know if I can attach files to this mailing list, but let me know
if you want I send you the corresponding Wave file.
Best regards,
- Sylvain Leroux
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
[-- Attachment #3: Type: text/plain, Size: 158 bytes --]
_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Soxi warn about missing extended part of the fmt chunk--but it seems to be there
2019-11-22 15:10 Soxi warn about missing extended part of the fmt chunk--but it seems to be there Sylvain Leroux
@ 2019-11-22 18:16 ` Måns Rullgård
2019-11-22 20:49 ` Sylvain Leroux
0 siblings, 1 reply; 3+ messages in thread
From: Måns Rullgård @ 2019-11-22 18:16 UTC (permalink / raw)
To: Sylvain Leroux; +Cc: sox-users
Sylvain Leroux <sylvain@chicoree.fr> writes:
> Hi everyone.
>
> First thank you for the great work and support. I'm in the process of
> writing a sound library for an internal project, and I realize more each
> day the amount of work the developers may have put in writing SoX.
>
> I am working now on a Wave file exporter, and while using `soxi` to
> verify the my wave files are well formed, I noticed the warning "wave
> header missing extended part of fmt chunk":
>
>> sh$ soxi -V4 test/tmp/float_32_1.wav
>> soxi INFO formats: detected file format type `wav'
>> soxi DBUG wav: WAV Chunk fmt
>> soxi INFO wav: EXTENSIBLE
>> soxi WARN wav: wave header missing extended part of fmt chunk
>> soxi DBUG wav: WAV Chunk fact
>> soxi DBUG wav: WAV Chunk data
>> soxi DBUG wav: Reading Wave file: IEEE Float format, 1 channel, 48000
>> samp/sec
>> soxi DBUG wav: 192000 byte/sec, 4 block align, 32 bits/samp,
>> 643200 data bytes
>> soxi DBUG wav: 160800 Samps/chans
>>
>> Input File : 'test/tmp/float_32_1.wav'
>> Channels : 1
>> Sample Rate : 48000
>> Precision : 24-bit
>> Duration : 00:00:03.35 = 160800 samples ~ 251.25 CDDA sectors
>> File Size : 643k
>> Bit Rate : 1.54M
>> Sample Encoding: 32-bit Floating Point PCM
>
> However, it seems to me I write the extended 40 bytes fmt chunk in the file:
>
>> 00000000 52 49 46 46 cc d0 09 00 57 41 56 45 66 6d 74 20 |RIFF....WAVEfmt |
>> 00000010 28 00 00 00 fe ff 01 00 80 bb 00 00 00 ee 02 00 |(...............|
>> 00000020 04 00 20 00[16 00]20 00 00 00 00 00 03 00 00 00 |.. ... .........|
>> 00000030 00 00 10 00 80 00 00 aa 00 38 9b 71 66 61 63 74 |.........8.qfact|
>> 00000040 04 00 00 00 80 d0 09 00 64 61 74 61 80 d0 09 00 |........data....|
>> 00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
>> *
>> 0009d0d0
>
> At byte 0x24 we can see 0x0016 which is the size (22 bytes) of the
> extended fmt header, followed by the extended header content. And after
> that, the `fact` chunk starts.
>
> Why is `soxi` considering the extended header is missing?
There is a small bug that triggers that warning in error for some
combinations of parameters. Your file header looks correct to me.
--
Måns Rullgård
_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Soxi warn about missing extended part of the fmt chunk--but it seems to be there
2019-11-22 18:16 ` Måns Rullgård
@ 2019-11-22 20:49 ` Sylvain Leroux
0 siblings, 0 replies; 3+ messages in thread
From: Sylvain Leroux @ 2019-11-22 20:49 UTC (permalink / raw)
To: Måns Rullgård; +Cc: sox-users
On 22/11/2019 19:16, Måns Rullgård wrote:
> Sylvain Leroux <sylvain@chicoree.fr> writes:
>
>>
>> I am working now on a Wave file exporter, and while using `soxi` to
>> verify the my wave files are well formed, I noticed the warning "wave
>> header missing extended part of fmt chunk":
>>
>>> 00000000 52 49 46 46 cc d0 09 00 57 41 56 45 66 6d 74 20 |RIFF....WAVEfmt |
>>> 00000010 28 00 00 00 fe ff 01 00 80 bb 00 00 00 ee 02 00 |(...............|
>>> 00000020 04 00 20 00[16 00]20 00 00 00 00 00 03 00 00 00 |.. ... .........|
>>> 00000030 00 00 10 00 80 00 00 aa 00 38 9b 71 66 61 63 74 |.........8.qfact|
>>> 00000040 04 00 00 00 80 d0 09 00 64 61 74 61 80 d0 09 00 |........data....|
>>> 00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
>>> *
>>> 0009d0d0
>>
>> At byte 0x24 we can see 0x0016 which is the size (22 bytes) of the
>> extended fmt header, followed by the extended header content. And after
>> that, the `fact` chunk starts.
>>
>> Why is `soxi` considering the extended header is missing?
>
> There is a small bug that triggers that warning in error for some
> combinations of parameters. Your file header looks correct to me.
>
Thank you for your reply Måns.
OK, I will keep going like that.
- Sylvain
_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-11-22 23:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-22 15:10 Soxi warn about missing extended part of the fmt chunk--but it seems to be there Sylvain Leroux
2019-11-22 18:16 ` Måns Rullgård
2019-11-22 20:49 ` Sylvain Leroux
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/sox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).