sox-users@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
From: "Måns Rullgård" <mans@mansr.com>
To: Jeff Learman <jjlearman@gmail.com>
Cc: sox-users@lists.sourceforge.net
Subject: Re: SoX bug: smpl chunks deleted
Date: Fri, 08 May 2020 15:59:44 +0100	[thread overview]
Message-ID: <yw1xwo5m321r.fsf@mansr.com> (raw)
In-Reply-To: <CAGyjer44bJV1yNxvV_MWpkHa1vpAHRLte_=kp0fNaJRwjZKrEw@mail.gmail.com> (Jeff Learman's message of "Thu, 7 May 2020 15:16:22 -0400")

Jeff Learman <jjlearman@gmail.com> 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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

      reply	other threads:[~2020-05-08 15:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-07 19:16 SoX bug: smpl chunks deleted Jeff Learman
2020-05-08 14:59 ` Måns Rullgård [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.sourceforge.net/lists/listinfo/sox-users

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yw1xwo5m321r.fsf@mansr.com \
    --to=sox-users@lists.sourceforge.net \
    --cc=jjlearman@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).