By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,468 Members | 1,865 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,468 IT Pros & Developers. It's quick & easy.

PCM change data.

P: n/a
I have af buffer filled with data PCM 16 bit stereo data.
How do i convert a sample to a integer?
Should'nt this work (only the first channel!) ?

for (int i=0; i<4000; i+=4)
{
int b1 = buffer[i];
int b2 = buffer[i+1];
int s = (b1<<8) | b2;
}

s printed does not give me a classic sound graph
Jul 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.