Displaying 2 results from an estimated 2 matches for "62c5e7a8".
2006 Sep 16
0
converting 16-bit samples in LPSTR to short
.../ right byte
short sample = (a << 8) | (b & 0xff);
}
I'm getting garbage as a result of this conversion. Any help would be
appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20060916/62c5e7a8/attachment.html
2006 Sep 16
3
converting 16-bit samples in LPSTR to short
Hi,
I am capturing 16 bit mono sound samples using some Win32 API function
calls. These function calls return the sound samples in an array of
characters. My assumption is that this array of characters represents pairs
of bytes that make up a short integer.
I'm using the following code to convert the samples:
LPTSTR *lpSaveBuffer;
......
for(j=0;j<nBytes;++J)
{
BYTE a =