Musepack Forums  

Go Back   Musepack Forums > Main > Tech

Reply
 
Thread Tools Search this Thread Display Modes
Old 20 December 2005, 05:53 pm   #1
Bob
Member
 
Join Date: Dec 2005
Posts: 7
Default 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.
Bob is offline   Reply With Quote
Old 21 December 2005, 07:21 pm   #2
Lefungus
Procrastinator
 
Lefungus's Avatar
 
Join Date: Jul 2004
Posts: 131
Default

1-2) In fixed point mode, each sample is a 32 bits integer
In floating point mode, each sample is a float.
Check MPC_FIXED_POINT and MPC_SAMPLE_FORMAT in math.h

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.
Lefungus is offline   Reply With Quote
Old 22 December 2005, 11:23 pm   #3
Bob
Member
 
Join Date: Dec 2005
Posts: 7
Default

Got it working now, thanks for the help.
Bob is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 07:12 am.


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