On 07/01/13 22:02, Thomas Orgis wrote:
> Am Mon, 07 Jan 2013 20:33:19 +0200
> schrieb Nikos Chantziaras <realnc@...>:
>> I want to get float samples from libmpg123 in order to do easier post
>> processing on them (mixing, etc.) I noticed that there are three float
>> formats: MPG123_ENC_FLOAT, MPG123_ENC_FLOAT_32 and MPG123_ENC_FLOAT_64.
> The _64 is rather theoretical for now. _FLOAT is a common mask that
> matches both float formats. Just use MPG123_ENC_FLOAT_32 when you want
> to specify a format.
OK, I'll be sticking to _32. It might be worth documenting that
MPG123_ENC_FLOAT is not meant to be passed as a mpg123_setformat()
option but is only there for matching what's returned from
I thought it's useful for mpg123_setformat() in order to stay platform
independent due to sizeof(float) not always being 4 (though that should
>> And a somewhat related question: can I assume that float samples
>> returned by mpg123_read() are supposed to have a range of [-1, 1)
> Nominal range is [-1;1] (full scale), but it could go over that range depending on
> data. You are responsible for handling clipping/limiting.
Got it. Thanks for clearing things up :-)