Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
77872fa8
Commit
77872fa8
authored
Jun 12, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msacm32: Build with msvcrt.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9479a001
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
40 deletions
+36
-40
Makefile.in
dlls/msacm32/Makefile.in
+2
-0
driver.c
dlls/msacm32/driver.c
+4
-7
format.c
dlls/msacm32/format.c
+5
-6
internal.c
dlls/msacm32/internal.c
+25
-26
pcmconverter.c
dlls/msacm32/pcmconverter.c
+0
-1
No files found.
dlls/msacm32/Makefile.in
View file @
77872fa8
...
...
@@ -2,6 +2,8 @@ MODULE = msacm32.dll
IMPORTLIB
=
msacm32
IMPORTS
=
winmm user32 advapi32
EXTRADLLFLAGS
=
-mno-cygwin
C_SRCS
=
\
driver.c
\
filter.c
\
...
...
dlls/msacm32/driver.c
View file @
77872fa8
...
...
@@ -21,8 +21,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include <stdio.h>
...
...
@@ -38,7 +36,6 @@
#include "msacmdrv.h"
#include "wineacm.h"
#include "wine/debug.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
msacm
);
...
...
@@ -441,11 +438,11 @@ LRESULT WINAPI acmDriverMessage(HACMDRIVER had, UINT uMsg, LPARAM lParam1, LPARA
pConfigInfo
->
dwDCISize
=
iStructSize
;
section_name
=
HeapAlloc
(
MSACM_hHeap
,
0
,
(
strlenW
(
drivers32
)
+
1
)
*
sizeof
(
WCHAR
));
if
(
section_name
)
strcpyW
(
section_name
,
drivers32
);
section_name
=
HeapAlloc
(
MSACM_hHeap
,
0
,
(
l
strlenW
(
drivers32
)
+
1
)
*
sizeof
(
WCHAR
));
if
(
section_name
)
l
strcpyW
(
section_name
,
drivers32
);
pConfigInfo
->
lpszDCISectionName
=
section_name
;
alias_name
=
HeapAlloc
(
MSACM_hHeap
,
0
,
(
strlenW
(
pAlias
)
+
1
)
*
sizeof
(
WCHAR
));
if
(
alias_name
)
strcpyW
(
alias_name
,
pAlias
);
alias_name
=
HeapAlloc
(
MSACM_hHeap
,
0
,
(
l
strlenW
(
pAlias
)
+
1
)
*
sizeof
(
WCHAR
));
if
(
alias_name
)
l
strcpyW
(
alias_name
,
pAlias
);
pConfigInfo
->
lpszDCIAliasName
=
alias_name
;
if
(
pConfigInfo
->
lpszDCISectionName
==
NULL
||
pConfigInfo
->
lpszDCIAliasName
==
NULL
)
{
...
...
dlls/msacm32/format.c
View file @
77872fa8
...
...
@@ -27,7 +27,6 @@
#include "winerror.h"
#include "wingdi.h"
#include "winuser.h"
#include "wine/unicode.h"
#include "wine/debug.h"
#include "mmsystem.h"
#include "mmreg.h"
...
...
@@ -75,7 +74,7 @@ static BOOL CALLBACK MSACM_FillFormatTagsCB(HACMDRIVERID hadid,
}
break
;
case
WINE_ACMFF_FORMAT
:
if
(
strcmpW
(
affd
->
szFormatTag
,
paftd
->
szFormatTag
)
==
0
)
{
if
(
l
strcmpW
(
affd
->
szFormatTag
,
paftd
->
szFormatTag
)
==
0
)
{
HACMDRIVER
had
;
if
(
acmDriverOpen
(
&
had
,
hadid
,
0
)
==
MMSYSERR_NOERROR
)
{
...
...
@@ -102,7 +101,7 @@ static BOOL CALLBACK MSACM_FillFormatTagsCB(HACMDRIVERID hadid,
mmr
=
acmFormatDetailsW
(
had
,
&
afd
,
ACM_FORMATDETAILSF_INDEX
);
if
(
mmr
==
MMSYSERR_NOERROR
)
{
lstrcpynW
(
buffer
,
afd
.
szFormat
,
ACMFORMATTAGDETAILS_FORMATTAG_CHARS
+
1
);
len
=
strlenW
(
buffer
);
len
=
l
strlenW
(
buffer
);
for
(
j
=
len
;
j
<
ACMFORMATTAGDETAILS_FORMATTAG_CHARS
;
j
++
)
buffer
[
j
]
=
' '
;
wsprintfW
(
buffer
+
ACMFORMATTAGDETAILS_FORMATTAG_CHARS
,
...
...
@@ -123,7 +122,7 @@ static BOOL CALLBACK MSACM_FillFormatTagsCB(HACMDRIVERID hadid,
}
break
;
case
WINE_ACMFF_WFX
:
if
(
strcmpW
(
affd
->
szFormatTag
,
paftd
->
szFormatTag
)
==
0
)
{
if
(
l
strcmpW
(
affd
->
szFormatTag
,
paftd
->
szFormatTag
)
==
0
)
{
HACMDRIVER
had
;
if
(
acmDriverOpen
(
&
had
,
hadid
,
0
)
==
MMSYSERR_NOERROR
)
{
...
...
@@ -504,8 +503,8 @@ MMRESULT WINAPI acmFormatDetailsW(HACMDRIVER had, PACMFORMATDETAILSW pafd, DWORD
pafd
->
pwfx
->
wBitsPerSample
);
}
MultiByteToWideChar
(
CP_ACP
,
0
,
(
pafd
->
pwfx
->
nChannels
==
1
)
?
"; Mono"
:
"; Stereo"
,
-
1
,
pafd
->
szFormat
+
strlenW
(
pafd
->
szFormat
),
ARRAY_SIZE
(
pafd
->
szFormat
)
-
strlenW
(
pafd
->
szFormat
));
pafd
->
szFormat
+
l
strlenW
(
pafd
->
szFormat
),
ARRAY_SIZE
(
pafd
->
szFormat
)
-
l
strlenW
(
pafd
->
szFormat
));
}
TRACE
(
"=> %d
\n
"
,
mmr
);
...
...
dlls/msacm32/internal.c
View file @
77872fa8
...
...
@@ -36,7 +36,6 @@
#include "msacmdrv.h"
#include "wineacm.h"
#include "wine/debug.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
msacm
);
...
...
@@ -72,7 +71,7 @@ PWINE_ACMDRIVERID MSACM_RegisterDriverFromRegistry(LPCWSTR pszRegEntry)
/* The requested registry entry must have the format msacm.XXXXX in order to
be recognized in any future sessions of msacm
*/
if
(
0
==
strncmpiW
(
pszRegEntry
,
msacmW
,
ARRAY_SIZE
(
msacmW
)))
{
if
(
0
==
wcsnicmp
(
pszRegEntry
,
msacmW
,
ARRAY_SIZE
(
msacmW
)))
{
lRet
=
RegOpenKeyExW
(
HKEY_LOCAL_MACHINE
,
drvkey
,
0
,
KEY_QUERY_VALUE
,
&
hKey
);
if
(
lRet
!=
ERROR_SUCCESS
)
{
WARN
(
"unable to open registry key - 0x%08x
\n
"
,
lRet
);
...
...
@@ -192,12 +191,12 @@ static LPWSTR MSACM_GetRegistryKey(const WINE_ACMDRIVERID* padid)
ERR
(
"No alias needed for registry entry
\n
"
);
return
NULL
;
}
len
=
strlenW
(
baseKey
);
ret
=
HeapAlloc
(
MSACM_hHeap
,
0
,
(
len
+
strlenW
(
padid
->
pszDriverAlias
)
+
1
)
*
sizeof
(
WCHAR
));
len
=
l
strlenW
(
baseKey
);
ret
=
HeapAlloc
(
MSACM_hHeap
,
0
,
(
len
+
l
strlenW
(
padid
->
pszDriverAlias
)
+
1
)
*
sizeof
(
WCHAR
));
if
(
!
ret
)
return
NULL
;
strcpyW
(
ret
,
baseKey
);
strcpyW
(
ret
+
len
,
padid
->
pszDriverAlias
);
l
strcpyW
(
ret
,
baseKey
);
l
strcpyW
(
ret
+
len
,
padid
->
pszDriverAlias
);
CharLowerW
(
ret
+
len
);
return
ret
;
}
...
...
@@ -296,23 +295,23 @@ PWINE_ACMDRIVERID MSACM_RegisterDriver(LPCWSTR pszDriverAlias, LPCWSTR pszFileNa
padid
->
pszDriverAlias
=
NULL
;
if
(
pszDriverAlias
)
{
padid
->
pszDriverAlias
=
HeapAlloc
(
MSACM_hHeap
,
0
,
(
strlenW
(
pszDriverAlias
)
+
1
)
*
sizeof
(
WCHAR
)
);
padid
->
pszDriverAlias
=
HeapAlloc
(
MSACM_hHeap
,
0
,
(
l
strlenW
(
pszDriverAlias
)
+
1
)
*
sizeof
(
WCHAR
)
);
if
(
!
padid
->
pszDriverAlias
)
{
HeapFree
(
MSACM_hHeap
,
0
,
padid
);
return
NULL
;
}
strcpyW
(
padid
->
pszDriverAlias
,
pszDriverAlias
);
l
strcpyW
(
padid
->
pszDriverAlias
,
pszDriverAlias
);
}
padid
->
pszFileName
=
NULL
;
if
(
pszFileName
)
{
padid
->
pszFileName
=
HeapAlloc
(
MSACM_hHeap
,
0
,
(
strlenW
(
pszFileName
)
+
1
)
*
sizeof
(
WCHAR
)
);
padid
->
pszFileName
=
HeapAlloc
(
MSACM_hHeap
,
0
,
(
l
strlenW
(
pszFileName
)
+
1
)
*
sizeof
(
WCHAR
)
);
if
(
!
padid
->
pszFileName
)
{
HeapFree
(
MSACM_hHeap
,
0
,
padid
->
pszDriverAlias
);
HeapFree
(
MSACM_hHeap
,
0
,
padid
);
return
NULL
;
}
strcpyW
(
padid
->
pszFileName
,
pszFileName
);
l
strcpyW
(
padid
->
pszFileName
,
pszFileName
);
}
padid
->
pLocalDriver
=
pLocalDriver
;
...
...
@@ -376,8 +375,8 @@ void MSACM_RegisterAllDrivers(void)
bufLen
=
ARRAY_SIZE
(
buf
);
lRet
=
RegEnumKeyExW
(
hKey
,
i
,
buf
,
&
bufLen
,
0
,
0
,
0
,
&
lastWrite
);
if
(
lRet
!=
ERROR_SUCCESS
)
continue
;
if
(
strncmpiW
(
buf
,
msacmW
,
ARRAY_SIZE
(
msacmW
)))
continue
;
if
(
!
(
name
=
strchrW
(
buf
,
'='
)))
continue
;
if
(
wcsnicmp
(
buf
,
msacmW
,
ARRAY_SIZE
(
msacmW
)))
continue
;
if
(
!
(
name
=
wcschr
(
buf
,
'='
)))
continue
;
*
name
=
0
;
MSACM_RegisterDriver
(
buf
,
name
+
1
,
0
);
}
...
...
@@ -386,7 +385,7 @@ void MSACM_RegisterAllDrivers(void)
bufLen
=
sizeof
(
buf
);
while
(
RegEnumValueW
(
hKey
,
i
,
valname
,
&
cnt
,
0
,
&
type
,
(
BYTE
*
)
buf
,
&
bufLen
)
==
ERROR_SUCCESS
){
if
(
!
strncmpiW
(
valname
,
msacmW
,
ARRAY_SIZE
(
msacmW
)))
if
(
!
wcsnicmp
(
valname
,
msacmW
,
ARRAY_SIZE
(
msacmW
)))
MSACM_RegisterDriver
(
valname
,
buf
,
0
);
++
i
;
}
...
...
@@ -395,10 +394,10 @@ void MSACM_RegisterAllDrivers(void)
if
(
GetPrivateProfileSectionW
(
drv32
,
buf
,
ARRAY_SIZE
(
buf
),
sys
))
{
for
(
s
=
buf
;
*
s
;
s
+=
strlenW
(
s
)
+
1
)
for
(
s
=
buf
;
*
s
;
s
+=
l
strlenW
(
s
)
+
1
)
{
if
(
strncmpiW
(
s
,
msacmW
,
ARRAY_SIZE
(
msacmW
)))
continue
;
if
(
!
(
name
=
strchrW
(
s
,
'='
)))
continue
;
if
(
wcsnicmp
(
s
,
msacmW
,
ARRAY_SIZE
(
msacmW
)))
continue
;
if
(
!
(
name
=
wcschr
(
s
,
'='
)))
continue
;
*
name
=
0
;
MSACM_RegisterDriver
(
s
,
name
+
1
,
0
);
*
name
=
'='
;
...
...
@@ -614,7 +613,7 @@ static void MSACM_ReorderDriversByPriority(void)
static
const
WCHAR
sPrefix
[]
=
{
'm'
,
's'
,
'a'
,
'c'
,
'm'
,
'.'
,
'\0'
};
/* Build expected entry name */
s
nprintfW
(
szSubKey
,
17
,
priorityTmpl
,
i
+
1
);
s
wprintf
(
szSubKey
,
17
,
priorityTmpl
,
i
+
1
);
lBufferLength
=
sizeof
(
szBuffer
);
lError
=
RegQueryValueExW
(
hPriorityKey
,
szSubKey
,
NULL
,
NULL
,
(
LPBYTE
)
szBuffer
,
(
LPDWORD
)
&
lBufferLength
);
if
(
lError
!=
ERROR_SUCCESS
)
continue
;
...
...
@@ -623,11 +622,11 @@ static void MSACM_ReorderDriversByPriority(void)
iTargetPosition
=
i
;
/* Locate driver alias in driver list */
pAlias
=
strstrW
(
szBuffer
,
sPrefix
);
pAlias
=
wcsstr
(
szBuffer
,
sPrefix
);
if
(
pAlias
==
NULL
)
continue
;
for
(
iCurrentPosition
=
0
;
iCurrentPosition
<
iNumDrivers
;
iCurrentPosition
++
)
{
if
(
strcmpiW
(
driverList
[
iCurrentPosition
]
->
pszDriverAlias
,
pAlias
)
==
0
)
if
(
wcsicmp
(
driverList
[
iCurrentPosition
]
->
pszDriverAlias
,
pAlias
)
==
0
)
break
;
}
if
(
iCurrentPosition
<
iNumDrivers
&&
iTargetPosition
!=
iCurrentPosition
)
{
...
...
@@ -703,13 +702,13 @@ void MSACM_WriteCurrentPriorities(void)
/* Build required value name */
dwPriorityCounter
++
;
s
nprintfW
(
szSubKey
,
17
,
priorityTmpl
,
dwPriorityCounter
);
s
wprintf
(
szSubKey
,
17
,
priorityTmpl
,
dwPriorityCounter
);
/* Value has a 1 in front for enabled drivers and 0 for disabled drivers */
s
nprintfW
(
szBuffer
,
256
,
valueTmpl
,
(
padid
->
fdwSupport
&
ACMDRIVERDETAILS_SUPPORTF_DISABLED
)
?
'0'
:
'1'
,
padid
->
pszDriverAlias
);
strlwrW
(
szBuffer
);
s
wprintf
(
szBuffer
,
256
,
valueTmpl
,
(
padid
->
fdwSupport
&
ACMDRIVERDETAILS_SUPPORTF_DISABLED
)
?
'0'
:
'1'
,
padid
->
pszDriverAlias
);
wcslwr
(
szBuffer
);
lError
=
RegSetValueExW
(
hPriorityKey
,
szSubKey
,
0
,
REG_SZ
,
(
BYTE
*
)
szBuffer
,
(
strlenW
(
szBuffer
)
+
1
)
*
sizeof
(
WCHAR
));
lError
=
RegSetValueExW
(
hPriorityKey
,
szSubKey
,
0
,
REG_SZ
,
(
BYTE
*
)
szBuffer
,
(
l
strlenW
(
szBuffer
)
+
1
)
*
sizeof
(
WCHAR
));
if
(
lError
!=
ERROR_SUCCESS
)
{
ERR
(
"unable to write value for %s under key %s (0x%08x)
\n
"
,
debugstr_w
(
padid
->
pszDriverAlias
),
debugstr_w
(
basePriorityKey
),
lError
);
...
...
@@ -718,12 +717,12 @@ void MSACM_WriteCurrentPriorities(void)
/* Build required value name */
dwPriorityCounter
++
;
s
nprintfW
(
szSubKey
,
17
,
priorityTmpl
,
dwPriorityCounter
);
s
wprintf
(
szSubKey
,
17
,
priorityTmpl
,
dwPriorityCounter
);
/* Value has a 1 in front for enabled drivers and 0 for disabled drivers */
s
nprintfW
(
szBuffer
,
256
,
valueTmpl
,
'1'
,
converterAlias
);
s
wprintf
(
szBuffer
,
256
,
valueTmpl
,
'1'
,
converterAlias
);
lError
=
RegSetValueExW
(
hPriorityKey
,
szSubKey
,
0
,
REG_SZ
,
(
BYTE
*
)
szBuffer
,
(
strlenW
(
szBuffer
)
+
1
)
*
sizeof
(
WCHAR
));
lError
=
RegSetValueExW
(
hPriorityKey
,
szSubKey
,
0
,
REG_SZ
,
(
BYTE
*
)
szBuffer
,
(
l
strlenW
(
szBuffer
)
+
1
)
*
sizeof
(
WCHAR
));
if
(
lError
!=
ERROR_SUCCESS
)
{
ERR
(
"unable to write value for %s under key %s (0x%08x)
\n
"
,
debugstr_w
(
converterAlias
),
debugstr_w
(
basePriorityKey
),
lError
);
...
...
dlls/msacm32/pcmconverter.c
View file @
77872fa8
...
...
@@ -26,7 +26,6 @@
* embedded driver handling scheme in msacm32.dll which isn't done yet
*/
#include "config.h"
#include <assert.h>
#include <stdarg.h>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment