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
1a90d1cc
Commit
1a90d1cc
authored
Mar 16, 2005
by
Robert Reif
Committed by
Alexandre Julliard
Mar 16, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Provide default implementation of waveInPrepareHeader and
waveInUnprepareHeader if driver doesn't support them.
parent
c90c9c74
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
4 deletions
+24
-4
winmm.c
dlls/winmm/winmm.c
+24
-4
No files found.
dlls/winmm/winmm.c
View file @
1a90d1cc
...
@@ -2584,6 +2584,7 @@ UINT WINAPI waveInPrepareHeader(HWAVEIN hWaveIn, WAVEHDR* lpWaveInHdr,
...
@@ -2584,6 +2584,7 @@ UINT WINAPI waveInPrepareHeader(HWAVEIN hWaveIn, WAVEHDR* lpWaveInHdr,
UINT
uSize
)
UINT
uSize
)
{
{
LPWINE_MLD
wmld
;
LPWINE_MLD
wmld
;
UINT
result
;
TRACE
(
"(%p, %p, %u);
\n
"
,
hWaveIn
,
lpWaveInHdr
,
uSize
);
TRACE
(
"(%p, %p, %u);
\n
"
,
hWaveIn
,
lpWaveInHdr
,
uSize
);
...
@@ -2593,9 +2594,18 @@ UINT WINAPI waveInPrepareHeader(HWAVEIN hWaveIn, WAVEHDR* lpWaveInHdr,
...
@@ -2593,9 +2594,18 @@ UINT WINAPI waveInPrepareHeader(HWAVEIN hWaveIn, WAVEHDR* lpWaveInHdr,
if
((
wmld
=
MMDRV_Get
(
hWaveIn
,
MMDRV_WAVEIN
,
FALSE
))
==
NULL
)
if
((
wmld
=
MMDRV_Get
(
hWaveIn
,
MMDRV_WAVEIN
,
FALSE
))
==
NULL
)
return
MMSYSERR_INVALHANDLE
;
return
MMSYSERR_INVALHANDLE
;
if
((
result
=
MMDRV_Message
(
wmld
,
WIDM_PREPARE
,
(
DWORD_PTR
)
lpWaveInHdr
,
uSize
,
TRUE
))
!=
MMSYSERR_NOTSUPPORTED
)
return
result
;
if
(
lpWaveInHdr
->
dwFlags
&
WHDR_INQUEUE
)
return
WAVERR_STILLPLAYING
;
lpWaveInHdr
->
dwFlags
|=
WHDR_PREPARED
;
lpWaveInHdr
->
dwFlags
&=
~
WHDR_DONE
;
lpWaveInHdr
->
dwBytesRecorded
=
0
;
lpWaveInHdr
->
dwBytesRecorded
=
0
;
return
MM
DRV_Message
(
wmld
,
WIDM_PREPARE
,
(
DWORD_PTR
)
lpWaveInHdr
,
uSize
,
TRUE
)
;
return
MM
SYSERR_NOERROR
;
}
}
/**************************************************************************
/**************************************************************************
...
@@ -2605,20 +2615,30 @@ UINT WINAPI waveInUnprepareHeader(HWAVEIN hWaveIn, WAVEHDR* lpWaveInHdr,
...
@@ -2605,20 +2615,30 @@ UINT WINAPI waveInUnprepareHeader(HWAVEIN hWaveIn, WAVEHDR* lpWaveInHdr,
UINT
uSize
)
UINT
uSize
)
{
{
LPWINE_MLD
wmld
;
LPWINE_MLD
wmld
;
UINT
result
;
TRACE
(
"(%p, %p, %u);
\n
"
,
hWaveIn
,
lpWaveInHdr
,
uSize
);
TRACE
(
"(%p, %p, %u);
\n
"
,
hWaveIn
,
lpWaveInHdr
,
uSize
);
if
(
lpWaveInHdr
==
NULL
||
uSize
<
sizeof
(
WAVEHDR
))
if
(
lpWaveInHdr
==
NULL
||
uSize
<
sizeof
(
WAVEHDR
))
return
MMSYSERR_INVALPARAM
;
return
MMSYSERR_INVALPARAM
;
if
(
!
(
lpWaveInHdr
->
dwFlags
&
WHDR_PREPARED
))
{
if
(
!
(
lpWaveInHdr
->
dwFlags
&
WHDR_PREPARED
))
return
MMSYSERR_NOERROR
;
return
MMSYSERR_NOERROR
;
}
if
((
wmld
=
MMDRV_Get
(
hWaveIn
,
MMDRV_WAVEIN
,
FALSE
))
==
NULL
)
if
((
wmld
=
MMDRV_Get
(
hWaveIn
,
MMDRV_WAVEIN
,
FALSE
))
==
NULL
)
return
MMSYSERR_INVALHANDLE
;
return
MMSYSERR_INVALHANDLE
;
return
MMDRV_Message
(
wmld
,
WIDM_UNPREPARE
,
(
DWORD_PTR
)
lpWaveInHdr
,
uSize
,
TRUE
);
if
((
result
=
MMDRV_Message
(
wmld
,
WIDM_UNPREPARE
,
(
DWORD_PTR
)
lpWaveInHdr
,
uSize
,
TRUE
))
!=
MMSYSERR_NOTSUPPORTED
)
return
result
;
if
(
lpWaveInHdr
->
dwFlags
&
WHDR_INQUEUE
)
return
WAVERR_STILLPLAYING
;
lpWaveInHdr
->
dwFlags
&=
~
WHDR_PREPARED
;
lpWaveInHdr
->
dwFlags
|=
WHDR_DONE
;
return
MMSYSERR_NOERROR
;
}
}
/**************************************************************************
/**************************************************************************
...
...
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