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
8024f7e8
Commit
8024f7e8
authored
Mar 10, 2021
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output/wasapi: move the thread->Play() call right before the consumed_size check
Fixes a bogus assertion failure (which can now be removed).
parent
14f01340
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
WasapiOutputPlugin.cxx
src/output/plugins/wasapi/WasapiOutputPlugin.cxx
+6
-6
No files found.
src/output/plugins/wasapi/WasapiOutputPlugin.cxx
View file @
8024f7e8
...
@@ -633,8 +633,13 @@ WasapiOutput::Play(const void *chunk, size_t size)
...
@@ -633,8 +633,13 @@ WasapiOutput::Play(const void *chunk, size_t size)
do
{
do
{
const
size_t
consumed_size
=
thread
->
spsc_buffer
.
push
(
const
size_t
consumed_size
=
thread
->
spsc_buffer
.
push
(
static_cast
<
const
BYTE
*>
(
input
.
data
),
input
.
size
);
static_cast
<
const
BYTE
*>
(
input
.
data
),
input
.
size
);
if
(
!
is_started
)
{
is_started
=
true
;
thread
->
Play
();
}
if
(
consumed_size
==
0
)
{
if
(
consumed_size
==
0
)
{
assert
(
is_started
);
thread
->
Wait
();
thread
->
Wait
();
thread
->
CheckException
();
thread
->
CheckException
();
if
(
!
not_interrupted
.
test_and_set
())
{
if
(
!
not_interrupted
.
test_and_set
())
{
...
@@ -643,11 +648,6 @@ WasapiOutput::Play(const void *chunk, size_t size)
...
@@ -643,11 +648,6 @@ WasapiOutput::Play(const void *chunk, size_t size)
continue
;
continue
;
}
}
if
(
!
is_started
)
{
is_started
=
true
;
thread
->
Play
();
}
thread
->
CheckException
();
thread
->
CheckException
();
if
(
pcm_export
)
{
if
(
pcm_export
)
{
...
...
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