Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
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
Иван Мажукин
mpd
Commits
637cf8a0
Commit
637cf8a0
authored
Mar 05, 2021
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32/WinEvent: add default value to Wait()
parent
2011a6e2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
WasapiOutputPlugin.cxx
src/output/plugins/WasapiOutputPlugin.cxx
+3
-3
WinEvent.hxx
src/win32/WinEvent.hxx
+1
-1
No files found.
src/output/plugins/WasapiOutputPlugin.cxx
View file @
637cf8a0
...
@@ -155,7 +155,7 @@ public:
...
@@ -155,7 +155,7 @@ public:
void
Finish
()
noexcept
{
return
SetStatus
(
Status
::
FINISH
);
}
void
Finish
()
noexcept
{
return
SetStatus
(
Status
::
FINISH
);
}
void
Play
()
noexcept
{
return
SetStatus
(
Status
::
PLAY
);
}
void
Play
()
noexcept
{
return
SetStatus
(
Status
::
PLAY
);
}
void
Pause
()
noexcept
{
return
SetStatus
(
Status
::
PAUSE
);
}
void
Pause
()
noexcept
{
return
SetStatus
(
Status
::
PAUSE
);
}
void
WaitDataPoped
()
noexcept
{
data_poped
.
Wait
(
INFINITE
);
}
void
WaitDataPoped
()
noexcept
{
data_poped
.
Wait
();
}
void
CheckException
()
{
void
CheckException
()
{
if
(
error
.
occur
.
load
())
{
if
(
error
.
occur
.
load
())
{
auto
err
=
std
::
exchange
(
error
.
ptr
,
nullptr
);
auto
err
=
std
::
exchange
(
error
.
ptr
,
nullptr
);
...
@@ -269,7 +269,7 @@ void WasapiOutputThread::Work() noexcept {
...
@@ -269,7 +269,7 @@ void WasapiOutputThread::Work() noexcept {
COM
com
{
true
};
COM
com
{
true
};
while
(
true
)
{
while
(
true
)
{
try
{
try
{
event
.
Wait
(
INFINITE
);
event
.
Wait
();
Status
current_state
=
status
.
load
();
Status
current_state
=
status
.
load
();
if
(
current_state
==
Status
::
FINISH
)
{
if
(
current_state
==
Status
::
FINISH
)
{
...
@@ -322,7 +322,7 @@ void WasapiOutputThread::Work() noexcept {
...
@@ -322,7 +322,7 @@ void WasapiOutputThread::Work() noexcept {
}
catch
(...)
{
}
catch
(...)
{
error
.
ptr
=
std
::
current_exception
();
error
.
ptr
=
std
::
current_exception
();
error
.
occur
.
store
(
true
);
error
.
occur
.
store
(
true
);
error
.
thrown
.
Wait
(
INFINITE
);
error
.
thrown
.
Wait
();
}
}
}
}
}
}
...
...
src/win32/WinEvent.hxx
View file @
637cf8a0
...
@@ -40,7 +40,7 @@ public:
...
@@ -40,7 +40,7 @@ public:
HANDLE
handle
()
noexcept
{
return
event
;
}
HANDLE
handle
()
noexcept
{
return
event
;
}
DWORD
Wait
(
DWORD
milliseconds
)
noexcept
{
DWORD
Wait
(
DWORD
milliseconds
=
INFINITE
)
noexcept
{
return
WaitForSingleObject
(
event
,
milliseconds
);
return
WaitForSingleObject
(
event
,
milliseconds
);
}
}
...
...
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