Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
9dafca8e
Commit
9dafca8e
authored
22 years ago
by
Eric Pouech
Committed by
Alexandre Julliard
22 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Moved session instance loading to winmm.
parent
0143542c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/msacm/driver.c
+41
-72
41 additions, 72 deletions
dlls/msacm/driver.c
with
41 additions
and
72 deletions
dlls/msacm/driver.c
+
41
−
72
View file @
9dafca8e
...
...
@@ -240,70 +240,13 @@ LRESULT WINAPI acmDriverMessage(HACMDRIVER had, UINT uMsg, LPARAM lParam1, LPARA
return
MMSYSERR_INVALPARAM
;
}
static
MMRESULT
MSACM_DriverOpenHelper
(
PWINE_ACMDRIVER
*
ppad
,
PWINE_ACMDRIVERID
padid
,
DWORD
fdwOpen
,
BOOL
useDesc
)
{
MMRESULT
ret
=
MMSYSERR_ERROR
;
PWINE_ACMDRIVER
pad
;
*
ppad
=
NULL
;
pad
=
HeapAlloc
(
MSACM_hHeap
,
0
,
sizeof
(
WINE_ACMDRIVER
));
if
(
!
pad
)
return
MMSYSERR_NOMEM
;
pad
->
obj
.
dwType
=
WINE_ACMOBJ_DRIVER
;
pad
->
obj
.
pACMDriverID
=
padid
;
if
(
!
(
pad
->
hDrvr
=
padid
->
hInstModule
))
{
/* this is not an externally added driver... need to load it */
if
(
!
padid
->
pszDriverAlias
)
goto
gotError
;
if
(
useDesc
)
{
ACMDRVOPENDESCW
adod
;
int
len
;
adod
.
cbStruct
=
sizeof
(
adod
);
adod
.
fccType
=
ACMDRIVERDETAILS_FCCTYPE_AUDIOCODEC
;
adod
.
fccComp
=
ACMDRIVERDETAILS_FCCCOMP_UNDEFINED
;
adod
.
dwVersion
=
acmGetVersion
();
adod
.
dwFlags
=
fdwOpen
;
adod
.
dwError
=
0
;
len
=
strlen
(
"Drivers32"
)
+
1
;
adod
.
pszSectionName
=
HeapAlloc
(
MSACM_hHeap
,
0
,
len
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
"Drivers32"
,
-
1
,
(
LPWSTR
)
adod
.
pszSectionName
,
len
);
len
=
strlen
(
padid
->
pszDriverAlias
)
+
1
;
adod
.
pszAliasName
=
HeapAlloc
(
MSACM_hHeap
,
0
,
len
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
padid
->
pszDriverAlias
,
-
1
,
(
LPWSTR
)
adod
.
pszAliasName
,
len
);
adod
.
dnDevNode
=
0
;
pad
->
hDrvr
=
OpenDriverA
(
padid
->
pszDriverAlias
,
NULL
,
(
DWORD
)
&
adod
);
HeapFree
(
MSACM_hHeap
,
0
,
(
LPWSTR
)
adod
.
pszSectionName
);
HeapFree
(
MSACM_hHeap
,
0
,
(
LPWSTR
)
adod
.
pszAliasName
);
if
(
!
pad
->
hDrvr
)
{
ret
=
adod
.
dwError
;
goto
gotError
;
}
}
else
{
if
(
!
(
pad
->
hDrvr
=
OpenDriverA
(
padid
->
pszDriverAlias
,
0L
,
0L
)))
{
ret
=
MMSYSERR_ERROR
;
goto
gotError
;
}
}
}
*
ppad
=
pad
;
return
MMSYSERR_NOERROR
;
gotError:
HeapFree
(
MSACM_hHeap
,
0
,
pad
);
return
ret
;
}
/***********************************************************************
* acmDriverOpen (MSACM32.@)
*/
MMRESULT
WINAPI
acmDriverOpen
(
PHACMDRIVER
phad
,
HACMDRIVERID
hadid
,
DWORD
fdwOpen
)
{
PWINE_ACMDRIVERID
padid
;
PWINE_ACMDRIVER
pad
=
NULL
,
first_pad
=
NULL
;
PWINE_ACMDRIVER
pad
=
NULL
;
MMRESULT
ret
;
TRACE
(
"(%p, %x, %08lu)
\n
"
,
phad
,
hadid
,
fdwOpen
);
...
...
@@ -318,22 +261,48 @@ MMRESULT WINAPI acmDriverOpen(PHACMDRIVER phad, HACMDRIVERID hadid, DWORD fdwOpe
if
(
!
padid
)
return
MMSYSERR_INVALHANDLE
;
/* first driver to be loaded ? */
if
(
!
padid
->
pACMDriverList
&&
!
padid
->
hInstModule
)
{
ret
=
MSACM_DriverOpenHelper
(
&
first_pad
,
padid
,
fdwOpen
,
FALSE
);
if
(
ret
)
goto
gotError
;
pad
=
HeapAlloc
(
MSACM_hHeap
,
0
,
sizeof
(
WINE_ACMDRIVER
));
if
(
!
pad
)
return
MMSYSERR_NOMEM
;
/* insert new pad at beg of list */
first_pad
->
pNextACMDriver
=
NULL
;
padid
->
pACMDriverList
=
first_pad
;
}
pad
->
obj
.
dwType
=
WINE_ACMOBJ_DRIVER
;
pad
->
obj
.
pACMDriverID
=
padid
;
ret
=
MSACM_DriverOpenHelper
(
&
pad
,
padid
,
fdwOpen
,
TRUE
);
if
(
ret
)
{
if
(
first_pad
)
acmDriverClose
((
HACMDRIVER
)
first_pad
,
0L
);
goto
gotError
;
if
(
!
(
pad
->
hDrvr
=
padid
->
hInstModule
))
{
ACMDRVOPENDESCW
adod
;
int
len
;
/* this is not an externally added driver... need to actually load it */
if
(
!
padid
->
pszDriverAlias
)
{
ret
=
MMSYSERR_ERROR
;
goto
gotError
;
}
adod
.
cbStruct
=
sizeof
(
adod
);
adod
.
fccType
=
ACMDRIVERDETAILS_FCCTYPE_AUDIOCODEC
;
adod
.
fccComp
=
ACMDRIVERDETAILS_FCCCOMP_UNDEFINED
;
adod
.
dwVersion
=
acmGetVersion
();
adod
.
dwFlags
=
fdwOpen
;
adod
.
dwError
=
0
;
len
=
strlen
(
"Drivers32"
)
+
1
;
adod
.
pszSectionName
=
HeapAlloc
(
MSACM_hHeap
,
0
,
len
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
"Drivers32"
,
-
1
,
(
LPWSTR
)
adod
.
pszSectionName
,
len
);
len
=
strlen
(
padid
->
pszDriverAlias
)
+
1
;
adod
.
pszAliasName
=
HeapAlloc
(
MSACM_hHeap
,
0
,
len
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
padid
->
pszDriverAlias
,
-
1
,
(
LPWSTR
)
adod
.
pszAliasName
,
len
);
adod
.
dnDevNode
=
0
;
pad
->
hDrvr
=
OpenDriverA
(
padid
->
pszDriverAlias
,
NULL
,
(
DWORD
)
&
adod
);
HeapFree
(
MSACM_hHeap
,
0
,
(
LPWSTR
)
adod
.
pszSectionName
);
HeapFree
(
MSACM_hHeap
,
0
,
(
LPWSTR
)
adod
.
pszAliasName
);
if
(
!
pad
->
hDrvr
)
{
ret
=
adod
.
dwError
;
goto
gotError
;
}
}
/* insert new pad at beg of list */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment