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
9dafca8e
Commit
9dafca8e
authored
May 11, 2002
by
Eric Pouech
Committed by
Alexandre Julliard
May 11, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved session instance loading to winmm.
parent
0143542c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
62 deletions
+31
-62
driver.c
dlls/msacm/driver.c
+31
-62
No files found.
dlls/msacm/driver.c
View file @
9dafca8e
...
...
@@ -240,27 +240,46 @@ 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
)
/***********************************************************************
* acmDriverOpen (MSACM32.@)
*/
MMRESULT
WINAPI
acmDriverOpen
(
PHACMDRIVER
phad
,
HACMDRIVERID
hadid
,
DWORD
fdwOpen
)
{
MMRESULT
ret
=
MMSYSERR_ERROR
;
PWINE_ACMDRIVER
pad
;
PWINE_ACMDRIVERID
padid
;
PWINE_ACMDRIVER
pad
=
NULL
;
MMRESULT
ret
;
TRACE
(
"(%p, %x, %08lu)
\n
"
,
phad
,
hadid
,
fdwOpen
);
if
(
!
phad
)
return
MMSYSERR_INVALPARAM
;
*
ppad
=
NULL
;
if
(
fdwOpen
)
return
MMSYSERR_INVALFLAG
;
padid
=
MSACM_GetDriverID
(
hadid
);
if
(
!
padid
)
return
MMSYSERR_INVALHANDLE
;
pad
=
HeapAlloc
(
MSACM_hHeap
,
0
,
sizeof
(
WINE_ACMDRIVER
));
if
(
!
pad
)
return
MMSYSERR_NOMEM
;
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
)
{
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
;
...
...
@@ -279,61 +298,11 @@ static MMRESULT MSACM_DriverOpenHelper(PWINE_ACMDRIVER* ppad, PWINE_ACMDRIVERID
HeapFree
(
MSACM_hHeap
,
0
,
(
LPWSTR
)
adod
.
pszSectionName
);
HeapFree
(
MSACM_hHeap
,
0
,
(
LPWSTR
)
adod
.
pszAliasName
);
if
(
!
pad
->
hDrvr
)
{
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
;
MMRESULT
ret
;
TRACE
(
"(%p, %x, %08lu)
\n
"
,
phad
,
hadid
,
fdwOpen
);
if
(
!
phad
)
return
MMSYSERR_INVALPARAM
;
if
(
fdwOpen
)
return
MMSYSERR_INVALFLAG
;
padid
=
MSACM_GetDriverID
(
hadid
);
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
;
/* insert new pad at beg of list */
first_pad
->
pNextACMDriver
=
NULL
;
padid
->
pACMDriverList
=
first_pad
;
}
ret
=
MSACM_DriverOpenHelper
(
&
pad
,
padid
,
fdwOpen
,
TRUE
);
if
(
ret
)
{
if
(
first_pad
)
acmDriverClose
((
HACMDRIVER
)
first_pad
,
0L
);
goto
gotError
;
}
/* insert new pad at beg of list */
...
...
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