Maarten Lankhorst : winealsa: Use S24_3LE instead of S24_LE.

Alexandre Julliard julliard at winehq.org
Mon Oct 15 11:28:08 CDT 2007


Module: wine
Branch: master
Commit: 61862f9f2d2dd9bc0cca4d9983d9e42680ac2697
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=61862f9f2d2dd9bc0cca4d9983d9e42680ac2697

Author: Maarten Lankhorst <maarten at codeweavers.com>
Date:   Fri Oct 12 19:35:05 2007 +0200

winealsa: Use S24_3LE instead of S24_LE.

S24_LE is aligned with 4 bytes instead of the expected 3.

---

 dlls/winealsa.drv/dscapture.c |    2 +-
 dlls/winealsa.drv/dsoutput.c  |    2 +-
 dlls/winealsa.drv/wavein.c    |    2 +-
 dlls/winealsa.drv/waveout.c   |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/winealsa.drv/dscapture.c b/dlls/winealsa.drv/dscapture.c
index 8c2d9f5..3e6984a 100644
--- a/dlls/winealsa.drv/dscapture.c
+++ b/dlls/winealsa.drv/dscapture.c
@@ -597,7 +597,7 @@ static HRESULT WINAPI IDsCaptureDriverBufferImpl_SetFormat(PIDSCDRIVERBUFFER ifa
     {
         case  8: format = SND_PCM_FORMAT_U8; break;
         case 16: format = SND_PCM_FORMAT_S16_LE; break;
-        case 24: format = SND_PCM_FORMAT_S24_LE; break;
+        case 24: format = SND_PCM_FORMAT_S24_3LE; break;
         case 32: format = SND_PCM_FORMAT_S32_LE; break;
         default: FIXME("Unsupported bpp: %d\n", pwfx->wBitsPerSample); return DSERR_GENERIC;
     }
diff --git a/dlls/winealsa.drv/dsoutput.c b/dlls/winealsa.drv/dsoutput.c
index d51e39a..9b76c7d 100644
--- a/dlls/winealsa.drv/dsoutput.c
+++ b/dlls/winealsa.drv/dsoutput.c
@@ -385,7 +385,7 @@ static HRESULT SetFormat(IDsDriverBufferImpl *This, LPWAVEFORMATEX pwfx)
     {
         case  8: format = SND_PCM_FORMAT_U8; break;
         case 16: format = SND_PCM_FORMAT_S16_LE; break;
-        case 24: format = SND_PCM_FORMAT_S24_LE; break;
+        case 24: format = SND_PCM_FORMAT_S24_3LE; break;
         case 32: format = SND_PCM_FORMAT_S32_LE; break;
         default: FIXME("Unsupported bpp: %d\n", pwfx->wBitsPerSample); return DSERR_GENERIC;
     }
diff --git a/dlls/winealsa.drv/wavein.c b/dlls/winealsa.drv/wavein.c
index 2070bdf..d2a5bc8 100644
--- a/dlls/winealsa.drv/wavein.c
+++ b/dlls/winealsa.drv/wavein.c
@@ -504,7 +504,7 @@ static DWORD widOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
         IsEqualGUID(&wwi->format.SubFormat, &KSDATAFORMAT_SUBTYPE_PCM))) {
         format = (wwi->format.Format.wBitsPerSample == 8) ? SND_PCM_FORMAT_U8 :
                  (wwi->format.Format.wBitsPerSample == 16) ? SND_PCM_FORMAT_S16_LE :
-                 (wwi->format.Format.wBitsPerSample == 24) ? SND_PCM_FORMAT_S24_LE :
+                 (wwi->format.Format.wBitsPerSample == 24) ? SND_PCM_FORMAT_S24_3LE :
                  (wwi->format.Format.wBitsPerSample == 32) ? SND_PCM_FORMAT_S32_LE : -1;
     } else if ((wwi->format.Format.wFormatTag == WAVE_FORMAT_EXTENSIBLE) &&
         IsEqualGUID(&wwi->format.SubFormat, &KSDATAFORMAT_SUBTYPE_IEEE_FLOAT)){
diff --git a/dlls/winealsa.drv/waveout.c b/dlls/winealsa.drv/waveout.c
index 6a01df3..2cbcd10 100644
--- a/dlls/winealsa.drv/waveout.c
+++ b/dlls/winealsa.drv/waveout.c
@@ -698,7 +698,7 @@ static DWORD wodOpen(WORD wDevID, LPWAVEOPENDESC lpDesc, DWORD dwFlags)
         IsEqualGUID(&wwo->format.SubFormat, &KSDATAFORMAT_SUBTYPE_PCM))) {
         format = (wwo->format.Format.wBitsPerSample == 8) ? SND_PCM_FORMAT_U8 :
                  (wwo->format.Format.wBitsPerSample == 16) ? SND_PCM_FORMAT_S16_LE :
-                 (wwo->format.Format.wBitsPerSample == 24) ? SND_PCM_FORMAT_S24_LE :
+                 (wwo->format.Format.wBitsPerSample == 24) ? SND_PCM_FORMAT_S24_3LE :
                  (wwo->format.Format.wBitsPerSample == 32) ? SND_PCM_FORMAT_S32_LE : -1;
     } else if ((wwo->format.Format.wFormatTag == WAVE_FORMAT_EXTENSIBLE) &&
         IsEqualGUID(&wwo->format.SubFormat, &KSDATAFORMAT_SUBTYPE_IEEE_FLOAT)){




More information about the wine-cvs mailing list