Musepack Forums

Musepack Forums (
-   Tech (
-   -   Bits per sample? (

Bob 20 December 2005 05:53 pm

Bits per sample?
I'm trying to work the decoder into some windows code. I have it working and it looks like I'm getting 32 bits per sample.

I have a couple of questions:

1) If I'm using libmpdec1.2.2 will this always be true?
2) If not is there some way to find out the bits/sample?
3) Is there a way to tell the decoder to return 16 instead of 32?

I'm kind of a novice at this. If my terminology is incorrect I apologize.

Lefungus 21 December 2005 07:21 pm

1-2) In fixed point mode, each sample is a 32 bits integer
In floating point mode, each sample is a float.

3) You need to convert it before using it. It allows more flexibility because you can, for example, convert it easily to 16 or 24 bits. Check the function WriteSamples() in sample.cpp for a working example.

Bob 22 December 2005 11:23 pm

Got it working now, thanks for the help.

All times are GMT. The time now is 02:36 am.

Powered by vBulletin® Version 3.8.11 Beta 2
Copyright ©2000 - 2021, vBulletin Solutions Inc.