Re: SoX bug: smpl chunks deleted

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff Learman <jjlearman@xxxxxxxxx> writes:

> I noticed that when converting stereo sample files to mono, the 'smpl'
> chunks (which encode loop information used by sample players), SoX omits
> the 'smpl' chunk in the output file.
>
> For example,
>
> sox input.wav -c 1 output.wav
>
> sums a stereo input.wav to a mono output.wav.  However, the 'smpl' chunk in
> input.wav is discarded.
>
> I have a workaround; I wrote code to extract the smpl chunk and append it
> to the output.  But it would be nice if 'smpl' chunks were supported by
> default, at least for the easy cases.  (I realize it could be difficult or
> impossible for many cases.)
>
> What's the best way to file a bug report?

The smpl chunk isn't part of the official WAV format, so SoX ignores it.
It's the only reasonable thing to do with unknown chunks.  Copying them
across to the output is risky since we can't know that the processing
didn't invalidate them.  For example, a chunk referencing specific
samples is (likely) still relevant after downmixing stereo to mono,
whereas resampling to a higher or lower rate will obviously make it
useless.

The best we can reasonably do is add a flag to specify extra chunks to
preserve if found in the input.  Would that be helpful in your case?

-- 
Måns Rullgård


_______________________________________________
Sox-users mailing list
Sox-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/sox-users




[Index of Archives]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux