Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
b4ba9fa7
Commit
b4ba9fa7
authored
Oct 07, 2002
by
Eric Pouech
Committed by
Alexandre Julliard
Oct 07, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Let wave(Out|In)Open call the wave mapper when the low level device
doesn't handle the wave descriptor.
parent
5cfcabc3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
13 deletions
+25
-13
mmsystem.c
dlls/winmm/mmsystem.c
+25
-13
No files found.
dlls/winmm/mmsystem.c
View file @
b4ba9fa7
...
...
@@ -3794,19 +3794,31 @@ static UINT WINAPI MMSYSTEM_waveOpen(HANDLE* lphndl, UINT uDeviceID, UINT uType,
wod
.
dwInstance
=
dwInstance
;
wod
.
dnDevNode
=
0L
;
if
(
dwFlags
&
WAVE_MAPPED
)
{
wod
.
uMappedDeviceID
=
uDeviceID
;
uDeviceID
=
WAVE_MAPPER
;
}
else
{
wod
.
uMappedDeviceID
=
-
1
;
for
(;;)
{
if
(
dwFlags
&
WAVE_MAPPED
)
{
wod
.
uMappedDeviceID
=
uDeviceID
;
uDeviceID
=
WAVE_MAPPER
;
}
else
{
wod
.
uMappedDeviceID
=
-
1
;
}
wmld
->
uDeviceID
=
uDeviceID
;
dwRet
=
MMDRV_Open
(
wmld
,
(
uType
==
MMDRV_WAVEOUT
)
?
WODM_OPEN
:
WIDM_OPEN
,
(
DWORD
)
&
wod
,
dwFlags
);
if
(
dwRet
!=
WAVERR_BADFORMAT
||
(
dwFlags
&
(
WAVE_MAPPED
|
WAVE_FORMAT_DIRECT
))
!=
0
)
break
;
/* if we ask for a format which isn't supported by the physical driver,
* let's try to map it through the wave mapper (except, if we already tried
* or user didn't allow us to use acm codecs)
*/
dwFlags
|=
WAVE_MAPPED
;
/* we shall loop only one */
}
wmld
->
uDeviceID
=
uDeviceID
;
dwRet
=
MMDRV_Open
(
wmld
,
(
uType
==
MMDRV_WAVEOUT
)
?
WODM_OPEN
:
WIDM_OPEN
,
(
DWORD
)
&
wod
,
dwFlags
);
if
((
dwFlags
&
WAVE_FORMAT_QUERY
)
||
dwRet
!=
MMSYSERR_NOERROR
)
{
MMDRV_Free
(
handle
,
wmld
);
handle
=
0
;
MMDRV_Free
(
handle
,
wmld
);
handle
=
0
;
}
if
(
lphndl
!=
NULL
)
*
lphndl
=
handle
;
...
...
@@ -3965,7 +3977,7 @@ UINT WINAPI waveOutOpen(HWAVEOUT* lphWaveOut, UINT uDeviceID,
DWORD
dwInstance
,
DWORD
dwFlags
)
{
return
MMSYSTEM_waveOpen
(
lphWaveOut
,
uDeviceID
,
MMDRV_WAVEOUT
,
lpFormat
,
dwCallback
,
dwInstance
,
dwFlags
,
TRUE
);
dwCallback
,
dwInstance
,
dwFlags
,
TRUE
);
}
/**************************************************************************
...
...
@@ -3984,7 +3996,7 @@ UINT16 WINAPI waveOutOpen16(HWAVEOUT16* lphWaveOut, UINT16 uDeviceID,
* (0xFFFFFFFF and not 0x0000FFFF)
*/
ret
=
MMSYSTEM_waveOpen
(
&
hWaveOut
,
(
uDeviceID
==
(
UINT16
)
-
1
)
?
(
UINT
)
-
1
:
uDeviceID
,
MMDRV_WAVEOUT
,
lpFormat
,
dwCallback
,
dwInstance
,
dwFlags
,
FALSE
);
MMDRV_WAVEOUT
,
lpFormat
,
dwCallback
,
dwInstance
,
dwFlags
,
FALSE
);
if
(
lphWaveOut
!=
NULL
)
*
lphWaveOut
=
HWAVEOUT_16
(
hWaveOut
);
return
ret
;
...
...
@@ -4608,7 +4620,7 @@ UINT WINAPI waveInOpen(HWAVEIN* lphWaveIn, UINT uDeviceID,
DWORD
dwInstance
,
DWORD
dwFlags
)
{
return
MMSYSTEM_waveOpen
(
lphWaveIn
,
uDeviceID
,
MMDRV_WAVEIN
,
lpFormat
,
dwCallback
,
dwInstance
,
dwFlags
,
TRUE
);
dwCallback
,
dwInstance
,
dwFlags
,
TRUE
);
}
/**************************************************************************
...
...
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