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
7561375e
Commit
7561375e
authored
Mar 05, 2015
by
Akihiro Sagawa
Committed by
Alexandre Julliard
Mar 06, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mciqtz: Implement MCI_DGV_SETAUDIO_VOLUME.
parent
6a41aeef
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
6 deletions
+47
-6
mciqtz.c
dlls/mciqtz32/mciqtz.c
+43
-3
mciqtz_private.h
dlls/mciqtz32/mciqtz_private.h
+1
-0
mci.c
dlls/winmm/tests/mci.c
+3
-3
No files found.
dlls/mciqtz32/mciqtz.c
View file @
7561375e
...
...
@@ -198,6 +198,12 @@ static DWORD MCIQTZ_mciOpen(UINT wDevID, DWORD dwFlags,
goto
err
;
}
hr
=
IGraphBuilder_QueryInterface
(
wma
->
pgraph
,
&
IID_IBasicAudio
,
(
void
**
)
&
wma
->
audio
);
if
(
FAILED
(
hr
))
{
TRACE
(
"Cannot get IBasicAudio interface (hr = %x)
\n
"
,
hr
);
goto
err
;
}
if
(
!
(
dwFlags
&
MCI_OPEN_ELEMENT
)
||
(
dwFlags
&
MCI_OPEN_ELEMENT_ID
))
{
TRACE
(
"Wrong dwFlags %x
\n
"
,
dwFlags
);
goto
err
;
...
...
@@ -240,6 +246,9 @@ static DWORD MCIQTZ_mciOpen(UINT wDevID, DWORD dwFlags,
return
0
;
err:
if
(
wma
->
audio
)
IBasicAudio_Release
(
wma
->
audio
);
wma
->
audio
=
NULL
;
if
(
wma
->
vidbasic
)
IBasicVideo_Release
(
wma
->
vidbasic
);
wma
->
vidbasic
=
NULL
;
...
...
@@ -284,6 +293,7 @@ static DWORD MCIQTZ_mciClose(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpP
if
(
wma
->
opened
)
{
IVideoWindow_Release
(
wma
->
vidwin
);
IBasicVideo_Release
(
wma
->
vidbasic
);
IBasicAudio_Release
(
wma
->
audio
);
IMediaSeeking_Release
(
wma
->
seek
);
IMediaEvent_Release
(
wma
->
mevent
);
IGraphBuilder_Release
(
wma
->
pgraph
);
...
...
@@ -892,8 +902,9 @@ out:
static
DWORD
MCIQTZ_mciSetAudio
(
UINT
wDevID
,
DWORD
dwFlags
,
LPMCI_DGV_SETAUDIO_PARMSW
lpParms
)
{
WINE_MCIQTZ
*
wma
;
DWORD
ret
=
0
;
FIXME
(
"(%04x, %08x, %p) : stub
\n
"
,
wDevID
,
dwFlags
,
lpParms
);
TRACE
(
"(%04x, %08x, %p)
\n
"
,
wDevID
,
dwFlags
,
lpParms
);
if
(
!
lpParms
)
return
MCIERR_NULL_PARAMETER_BLOCK
;
...
...
@@ -902,9 +913,38 @@ static DWORD MCIQTZ_mciSetAudio(UINT wDevID, DWORD dwFlags, LPMCI_DGV_SETAUDIO_P
if
(
!
wma
)
return
MCIERR_INVALID_DEVICE_ID
;
MCIQTZ_mciStop
(
wDevID
,
MCI_WAIT
,
NULL
);
if
(
!
(
dwFlags
&
MCI_DGV_SETAUDIO_ITEM
))
{
FIXME
(
"Unknown flags (%08x)
\n
"
,
dwFlags
);
return
0
;
}
return
0
;
if
(
dwFlags
&
MCI_DGV_SETAUDIO_ITEM
)
{
switch
(
lpParms
->
dwItem
)
{
case
MCI_DGV_SETAUDIO_VOLUME
:
if
(
dwFlags
&
MCI_DGV_SETAUDIO_VALUE
)
{
long
vol
=
-
10000
;
HRESULT
hr
;
if
(
lpParms
->
dwValue
>
1000
)
{
ret
=
MCIERR_OUTOFRANGE
;
break
;
}
if
(
dwFlags
&
MCI_TEST
)
break
;
vol
+=
(
long
)
lpParms
->
dwValue
*
10
;
hr
=
IBasicAudio_put_Volume
(
wma
->
audio
,
vol
);
if
(
FAILED
(
hr
))
{
WARN
(
"Cannot set volume (hr = %x)
\n
"
,
hr
);
ret
=
MCIERR_INTERNAL
;
}
}
break
;
default:
FIXME
(
"Unknown item %08x
\n
"
,
lpParms
->
dwItem
);
break
;
}
}
return
ret
;
}
/*======================================================================*
...
...
dlls/mciqtz32/mciqtz_private.h
View file @
7561375e
...
...
@@ -35,6 +35,7 @@ typedef struct {
IMediaEvent
*
mevent
;
IVideoWindow
*
vidwin
;
IBasicVideo
*
vidbasic
;
IBasicAudio
*
audio
;
DWORD
time_format
;
UINT
command_table
;
HWND
parent
;
...
...
dlls/winmm/tests/mci.c
View file @
7561375e
...
...
@@ -1334,14 +1334,14 @@ static void test_playWaveTypeMpegvideo(void)
err
=
mciSendStringA
(
"status mysound mode"
,
buf
,
sizeof
(
buf
),
NULL
);
ok
(
!
err
,
"mci status mode returned %s
\n
"
,
dbg_mcierr
(
err
));
todo_wine
ok
(
!
strcmp
(
buf
,
"playing"
),
"mci status mode: %s
\n
"
,
buf
);
ok
(
!
strcmp
(
buf
,
"playing"
),
"mci status mode: %s
\n
"
,
buf
);
err
=
mciSendStringA
(
"setaudio mysound volume to 1001"
,
NULL
,
0
,
NULL
);
todo_wine
ok
(
err
==
MCIERR_OUTOFRANGE
,
"mci setaudio volume to 1001 returned %s
\n
"
,
dbg_mcierr
(
err
));
ok
(
err
==
MCIERR_OUTOFRANGE
,
"mci setaudio volume to 1001 returned %s
\n
"
,
dbg_mcierr
(
err
));
err
=
mciSendStringA
(
"status mysound mode"
,
buf
,
sizeof
(
buf
),
NULL
);
ok
(
!
err
,
"mci status mode returned %s
\n
"
,
dbg_mcierr
(
err
));
todo_wine
ok
(
!
strcmp
(
buf
,
"playing"
),
"mci status mode: %s
\n
"
,
buf
);
ok
(
!
strcmp
(
buf
,
"playing"
),
"mci status mode: %s
\n
"
,
buf
);
err
=
mciSendStringA
(
"close mysound"
,
NULL
,
0
,
NULL
);
ok
(
!
err
,
"mci close returned %s
\n
"
,
dbg_mcierr
(
err
));
...
...
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