3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Lesser General Public
5 * License as published by the Free Software Foundation; either
6 * version 2.1 of the License, or (at your option) any later version.
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Public License for more details.
13 * You should have received a copy of the GNU Lesser General Public
14 * License along with this library; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 * ReactOS emulation layer betwin wine and windows api for directx
18 * This transform wine specfiy api to native reactos/windows api
19 * wine have done some hack to geting dsound working. But does
20 * hack does not work on windows or reactos. It need to warp thuse
21 * api hack to true native api.
23 * This layer have some weekness
24 * it does not support hardware accleration of the sound card.
25 * it need complete implant of it here, and we need also wdm
26 * in reactos to complete dsound. for monet it is not posibile
27 * to get all value and fill them. eg the soundcard drv name.
29 * Wine does get almost everthing from there sound drv, then
30 * pass it thurg winmm, then to dsound. but windows drv does
31 * not pass this info to the winmm. it send it on wdm instead.
33 * Do rember this dsound is hardcode to software mode only.
34 * the program will not notice it. it will think it is hardware.
35 * for the flag never report back it is in software mode.
38 * Copyright 2004 Magnus Olsen
42 #include "wine/port.h"
47 #include <sys/types.h>
48 #include <sys/fcntl.h>
56 #define NONAMELESSSTRUCT
57 #define NONAMELESSUNION
68 #include "wine/windef16.h"
69 #include "wine/winbase16.h"
70 #include "wine/debug.h"
73 #include "dxros_layer.h"
76 WINE_DEFAULT_DEBUG_CHANNEL(dsound
);
79 DWORD
RosWineWaveOutMessage(HWAVEOUT hwo
, UINT uMsg
, DWORD_PTR dwParam1
, DWORD_PTR dwParam2
)
83 case DRV_QUERYDSOUNDDESC
:
84 msg
= dxrosdrv_drv_querydsounddescss(0, (HWAVEOUT
)((ULONG
)hwo
),(HWAVEIN
) 0, (PDSDRIVERDESC
) dwParam1
);
87 case DRV_QUERYDSOUNDIFACE
:
88 msg
= dxrosdrv_drv_querydsoundiface((HWAVEIN
)hwo
, (PIDSDRIVER
)dwParam1
);
92 msg
= waveOutMessage(hwo
, uMsg
, dwParam1
, dwParam2
);
98 DWORD
RosWineWaveInMessage(HWAVEIN hwo
, UINT uMsg
, DWORD_PTR dwParam1
, DWORD_PTR dwParam2
)
102 case DRV_QUERYDSOUNDDESC
:
103 msg
= dxrosdrv_drv_querydsounddescss(1, (HWAVEOUT
)((ULONG
)0),(HWAVEIN
)((ULONG
)hwo
), (PDSDRIVERDESC
) dwParam1
);
106 case DRV_QUERYDSOUNDIFACE
:
107 msg
= dxrosdrv_drv_querydsoundiface(hwo
, (PIDSDRIVER
)dwParam1
);
111 msg
= waveInMessage(hwo
, uMsg
, dwParam1
, dwParam2
);