[flac-dev] Commonly getting FLAC__STREAM_ENCODER_VERIFY_MISMATCH_IN_AUDIO_DATA on valid audio

Erik de Castro Lopo mle+la at mega-nerd.com
Sat Feb 9 12:50:49 PST 2013


Johnny Rosenberg wrote:

> For example, when loading an audiofile with libsndfile, all the
> samples are converted to floating point numbers,

With libsndfile, converting to float is optional. You can just as
easily read int or short.

> which is what I want
> anyway, but the conversion is done by dividing the integers from the
> file with pow(2,bps-1), but when converting back, they multiply with
> pow(2,bps-1)-1, so if you just read and then write, you end up with a
> slightly lower volume (not that you can hear any difference if you do
> it only a few times, but still, it isn't right, AND it is very easy to
> do it right, so why don't they?)…

Firstly, you do realise that I am the main author and maintainer of
libsndfile, don't you?

Secondly, the scaling can be switched off don't you? See:

    http://www.mega-nerd.com/libsndfile/command.html#SFC_SET_NORM_DOUBLE

Finally, there are about 700 different way so convert between int
and float. I chose the one that I thought had provided the best
trade off. I stand by that decision.

Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/


More information about the flac-dev mailing list