wineoss.drv: Add mmdevapi driver.

Gerald Pfeifer gerald at
Sat May 7 19:04:06 CDT 2011

On Fri, 6 May 2011, Andrew Eikum wrote:
> If Wine is trying to build wineoss.drv, then you must have oss_sysinfo. 
> If you have oss_sysinfo, then you have OSSv4. If you have OSSv4, then 
> you should have all of the above symbols, but apparently you don't. So I 
> suspect it's something amiss with your OSSv4 implementation, and that's 
> where I would begin investigating.
> Does that help you diagnose the problem?

Yes, thanks a lot!  Based on yours and Farncois' input, I did some
research and found the following, among others

and consulting Google Code Search I find that also other applications
do something like the following here (mplayer, for example).

Suggested patch below.


Use AFMT_S24_LE instead of AFMT_S24_PACKED.

diff --git a/dlls/wineoss.drv/mmdevdrv.c b/dlls/wineoss.drv/mmdevdrv.c
index ff21cd6..789cb1e 100644
--- a/dlls/wineoss.drv/mmdevdrv.c
+++ b/dlls/wineoss.drv/mmdevdrv.c
@@ -500,7 +500,7 @@ static int get_oss_format(const WAVEFORMATEX *fmt)
         case 16:
             return AFMT_S16_LE;
         case 24:
-            return AFMT_S24_PACKED;
+            return AFMT_S24_LE;
         case 32:
             return AFMT_S32_LE;
@@ -953,7 +953,7 @@ static HRESULT WINAPI AudioClient_GetMixFormat(IAudioClient *iface,
     }else if(formats & AFMT_S32_LE){
         fmt->Format.wBitsPerSample = 32;
         fmt->SubFormat = KSDATAFORMAT_SUBTYPE_PCM;
-    }else if(formats & AFMT_S24_PACKED){
+    }else if(formats & AFMT_S24_LE){
         fmt->Format.wBitsPerSample = 24;
         fmt->SubFormat = KSDATAFORMAT_SUBTYPE_PCM;

More information about the wine-patches mailing list