Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

16 bit to 8 bit Conversion not yielding any results #5

Closed
Echooff3 opened this issue Feb 19, 2013 · 1 comment
Closed

16 bit to 8 bit Conversion not yielding any results #5

Echooff3 opened this issue Feb 19, 2013 · 1 comment

Comments

@Echooff3
Copy link

I converted the output.raw file from the tests folder to an mp3. In my code I'm playing back the mp3 and getting back linear PCM 16 bit samples. I'm using the following conversion to take the Sint16 to ltcsnd_sample_t.

       SInt16 *samples ...
       ltcsnd_sample_t convertedSamples[BUFFER_SIZE] ...
       /* Omitted Code for brevity */ 
       for (int i=0; i < n; i++) {
            SInt8 tempSigned8Bit = samples[i+total] / 256;
            convertedSamples[i] = tempSigned8Bit + 128;
        }

Is this conversion the right way to go?

@x42
Copy link
Owner

x42 commented Feb 19, 2013

duplicate of #4

@x42 x42 closed this as completed Feb 19, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants