[LAD] using libsndfile to write signed short

Harry van Haaren harryhaaren at gmail.com
Thu Sep 25 20:02:31 UTC 2014

On Thu, Sep 25, 2014 at 8:50 PM, Joël Krähemann <weedlight at gmail.com> wrote:
> Does someone know about writing WAV using libsndfile?
> My file becomes 174M big as using sf_writef_short() within 8s

Are you sure you're only writing each sample once? Sounds like there's
an error in writing "nframe" samples for each sample or something.

Its pretty easy: and there's a brilliant to-the-point blog post on
using C++ interface (sndfile.hh) here:

If there's still issues, please pastebin some code, or ask a more
specific question :)

HTH, -Harry

More information about the Linux-audio-dev mailing list