Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Convert PCM Sample (Read 5525 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Convert PCM Sample

Hi all,

My MP3 decoder generates 16-bit PCM sample signed, I want to convert them into 16-bit PCM sample unsigned.

Thanks in advance.

Convert PCM Sample

Reply #1
Hi doomtn,

Add 32768 to each sample value.

You are welcome.
Full-quoting makes you scroll past the same junk over and over.



Convert PCM Sample

Reply #4
Hi all,

My MP3 decoder generates 16-bit PCM sample signed, I want to convert them into 16-bit PCM sample unsigned.

Thanks in advance.

You'll need to move the original value to an unsigned short and then add the 32768. However, why do you want to do it? So far as I'm aware, nothing will play it or know what to do with it.