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
2a158260
Commit
2a158260
authored
Feb 26, 2009
by
Chris Robinson
Committed by
Alexandre Julliard
Feb 27, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mcicda: Partially handle Play notifications.
parent
8afa626f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
mcicda.c
dlls/mcicda/mcicda.c
+31
-0
No files found.
dlls/mcicda/mcicda.c
View file @
2a158260
...
@@ -141,6 +141,16 @@ static DWORD CALLBACK MCICDA_playLoop(void *ptr)
...
@@ -141,6 +141,16 @@ static DWORD CALLBACK MCICDA_playLoop(void *ptr)
IDirectSoundBuffer_Stop
(
wmcda
->
dsBuf
);
IDirectSoundBuffer_Stop
(
wmcda
->
dsBuf
);
SetEvent
(
wmcda
->
stopEvent
);
SetEvent
(
wmcda
->
stopEvent
);
EnterCriticalSection
(
&
wmcda
->
cs
);
if
(
wmcda
->
hCallback
)
{
mciDriverNotify
(
wmcda
->
hCallback
,
wmcda
->
wNotifyDeviceID
,
FAILED
(
hr
)
?
MCI_NOTIFY_FAILURE
:
((
endPos
!=
lastPos
)
?
MCI_NOTIFY_ABORTED
:
MCI_NOTIFY_SUCCESSFUL
));
wmcda
->
hCallback
=
NULL
;
}
LeaveCriticalSection
(
&
wmcda
->
cs
);
ExitThread
(
0
);
ExitThread
(
0
);
return
0
;
return
0
;
}
}
...
@@ -892,6 +902,14 @@ static DWORD MCICDA_Play(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
...
@@ -892,6 +902,14 @@ static DWORD MCICDA_Play(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
IDirectSound_Release
(
wmcda
->
dsObj
);
IDirectSound_Release
(
wmcda
->
dsObj
);
wmcda
->
dsObj
=
NULL
;
wmcda
->
dsObj
=
NULL
;
}
}
else
if
(
wmcda
->
hCallback
)
{
mciDriverNotify
(
wmcda
->
hCallback
,
wmcda
->
wNotifyDeviceID
,
MCI_NOTIFY_ABORTED
);
wmcda
->
hCallback
=
NULL
;
}
if
((
dwFlags
&
MCI_NOTIFY
))
wmcda
->
hCallback
=
HWND_32
(
LOWORD
(
lpParms
->
dwCallback
));
if
(
pDirectSoundCreate
)
{
if
(
pDirectSoundCreate
)
{
WAVEFORMATEX
format
;
WAVEFORMATEX
format
;
...
@@ -983,6 +1001,7 @@ static DWORD MCICDA_Play(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
...
@@ -983,6 +1001,7 @@ static DWORD MCICDA_Play(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
play
.
EndingF
=
end
%
CDFRAMES_PERSEC
;
play
.
EndingF
=
end
%
CDFRAMES_PERSEC
;
if
(
!
DeviceIoControl
(
wmcda
->
handle
,
IOCTL_CDROM_PLAY_AUDIO_MSF
,
&
play
,
sizeof
(
play
),
if
(
!
DeviceIoControl
(
wmcda
->
handle
,
IOCTL_CDROM_PLAY_AUDIO_MSF
,
&
play
,
sizeof
(
play
),
NULL
,
0
,
&
br
,
NULL
))
{
NULL
,
0
,
&
br
,
NULL
))
{
wmcda
->
hCallback
=
NULL
;
ret
=
MCIERR_HARDWARE
;
ret
=
MCIERR_HARDWARE
;
}
else
if
(
dwFlags
&
MCI_NOTIFY
)
{
}
else
if
(
dwFlags
&
MCI_NOTIFY
)
{
TRACE
(
"MCI_NOTIFY_SUCCESSFUL %08lX !
\n
"
,
lpParms
->
dwCallback
);
TRACE
(
"MCI_NOTIFY_SUCCESSFUL %08lX !
\n
"
,
lpParms
->
dwCallback
);
...
@@ -1023,6 +1042,11 @@ static DWORD MCICDA_Stop(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms
...
@@ -1023,6 +1042,11 @@ static DWORD MCICDA_Stop(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParms
else
if
(
!
DeviceIoControl
(
wmcda
->
handle
,
IOCTL_CDROM_STOP_AUDIO
,
NULL
,
0
,
NULL
,
0
,
&
br
,
NULL
))
else
if
(
!
DeviceIoControl
(
wmcda
->
handle
,
IOCTL_CDROM_STOP_AUDIO
,
NULL
,
0
,
NULL
,
0
,
&
br
,
NULL
))
return
MCIERR_HARDWARE
;
return
MCIERR_HARDWARE
;
if
(
wmcda
->
hCallback
)
{
mciDriverNotify
(
wmcda
->
hCallback
,
wmcda
->
wNotifyDeviceID
,
MCI_NOTIFY_ABORTED
);
wmcda
->
hCallback
=
NULL
;
}
if
(
lpParms
&&
(
dwFlags
&
MCI_NOTIFY
))
{
if
(
lpParms
&&
(
dwFlags
&
MCI_NOTIFY
))
{
TRACE
(
"MCI_NOTIFY_SUCCESSFUL %08lX !
\n
"
,
lpParms
->
dwCallback
);
TRACE
(
"MCI_NOTIFY_SUCCESSFUL %08lX !
\n
"
,
lpParms
->
dwCallback
);
mciDriverNotify
(
HWND_32
(
LOWORD
(
lpParms
->
dwCallback
)),
mciDriverNotify
(
HWND_32
(
LOWORD
(
lpParms
->
dwCallback
)),
...
@@ -1052,6 +1076,13 @@ static DWORD MCICDA_Pause(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParm
...
@@ -1052,6 +1076,13 @@ static DWORD MCICDA_Pause(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpParm
else
if
(
!
DeviceIoControl
(
wmcda
->
handle
,
IOCTL_CDROM_PAUSE_AUDIO
,
NULL
,
0
,
NULL
,
0
,
&
br
,
NULL
))
else
if
(
!
DeviceIoControl
(
wmcda
->
handle
,
IOCTL_CDROM_PAUSE_AUDIO
,
NULL
,
0
,
NULL
,
0
,
&
br
,
NULL
))
return
MCIERR_HARDWARE
;
return
MCIERR_HARDWARE
;
EnterCriticalSection
(
&
wmcda
->
cs
);
if
(
wmcda
->
hCallback
)
{
mciDriverNotify
(
wmcda
->
hCallback
,
wmcda
->
wNotifyDeviceID
,
MCI_NOTIFY_SUPERSEDED
);
wmcda
->
hCallback
=
NULL
;
}
LeaveCriticalSection
(
&
wmcda
->
cs
);
if
(
lpParms
&&
(
dwFlags
&
MCI_NOTIFY
))
{
if
(
lpParms
&&
(
dwFlags
&
MCI_NOTIFY
))
{
TRACE
(
"MCI_NOTIFY_SUCCESSFUL %08lX !
\n
"
,
lpParms
->
dwCallback
);
TRACE
(
"MCI_NOTIFY_SUCCESSFUL %08lX !
\n
"
,
lpParms
->
dwCallback
);
mciDriverNotify
(
HWND_32
(
LOWORD
(
lpParms
->
dwCallback
)),
mciDriverNotify
(
HWND_32
(
LOWORD
(
lpParms
->
dwCallback
)),
...
...
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