Advertisement

4bit pcm to 16bit pcm at runtime

Started by May 03, 2006 03:10 AM
2 comments, last by ten foot ninja 18 years, 6 months ago
Hello, I am trying to convert 4bit (or 8bit) pcm samples to 16bit samples in my mobile game and am getting a lot of 'noise'. I can convert and it plays, but it seems the lesser the sample size i convert from, the more noise there is (4bit to 16bit has an insane amount of 'noise' so that the music is barely heard). I'm assuming there is some sort of formula that i need to use or something. Does anyone know how to loose the noise? thanks in advance!
The lower the sample rate, the more noise you will have, period. A lower sample rate means that you actually have less data there, so that when you try to create more data (i.e. upsample it) the only thing the computer can do is create noise--it can't reproduce the original sound because that data is actually gone when it is recorded at a low sample rate. Your best bet, I think, is for your source files to be as high quality as possible--otherwise, you just won't be able to get quality sounds. If you don't know how sampling works, here and here are wikipedia pages to get you started.
Advertisement
Can you use ADPCM samples? Those are 4-bit; it's what the PS2 and XBOX use...
yes, the 4bit file is ADPCM (not PCM as i had originally posted... opps!). i am now assuming that the way data is encoded in ADPCM is different enough from PCM.

I don't know how to convert from ADPCM to PCM... but i fear that it will be too much processor over head to do such a conversion at runtime (i am streaming the audio data 1kb at a time from file for each channel, things already get choppy with 10 channels going at once)

Is it even possible to encode PCM into 4bit sample sizes? would it sound that crappy? is there software that does it (freely)available?
Thanks again!

This topic is closed to new replies.

Advertisement