winecoreaudio: 8-bit Linear PCM data is unsigned.

This commit is contained in:
Ken Thomases 2006-05-24 05:41:28 -05:00 committed by Alexandre Julliard
parent 178f9fecd9
commit a1e6989a9b
1 changed files with 4 additions and 4 deletions

View File

@ -674,13 +674,13 @@ static DWORD wodOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
dwFlags &= ~WAVE_DIRECTSOUND;
streamFormat.mFormatID = kAudioFormatLinearPCM;
streamFormat.mFormatFlags = kLinearPCMFormatFlagIsPacked;
/* FIXME check for 32bits float -> kLinearPCMFormatFlagIsFloat */
streamFormat.mFormatFlags = kLinearPCMFormatFlagIsSignedInteger
if (lpDesc->lpFormat->wBitsPerSample != 8)
streamFormat.mFormatFlags |= kLinearPCMFormatFlagIsSignedInteger;
# ifdef WORDS_BIGENDIAN
| kLinearPCMFormatFlagIsBigEndian /* FIXME Wave format is little endian */
streamFormat.mFormatFlags |= kLinearPCMFormatFlagIsBigEndian; /* FIXME Wave format is little endian */
# endif
| kLinearPCMFormatFlagIsPacked;
streamFormat.mSampleRate = lpDesc->lpFormat->nSamplesPerSec;
streamFormat.mChannelsPerFrame = lpDesc->lpFormat->nChannels;