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
0825179f
Commit
0825179f
authored
Oct 21, 2021
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output/pipewire: add local reference variables
parent
97211d0a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
PipeWireOutputPlugin.cxx
src/output/plugins/PipeWireOutputPlugin.cxx
+9
-6
No files found.
src/output/plugins/PipeWireOutputPlugin.cxx
View file @
0825179f
...
...
@@ -580,12 +580,14 @@ PipeWireOutput::Process() noexcept
return
;
}
auto
*
buf
=
b
->
buffer
;
std
::
byte
*
dest
=
(
std
::
byte
*
)
buf
->
datas
[
0
].
data
;
auto
&
buffer
=
*
b
->
buffer
;
auto
&
d
=
buffer
.
datas
[
0
];
std
::
byte
*
dest
=
(
std
::
byte
*
)
d
.
data
;
if
(
dest
==
nullptr
)
return
;
const
std
::
size_t
max_frames
=
buf
->
datas
[
0
]
.
maxsize
/
frame_size
;
const
std
::
size_t
max_frames
=
d
.
maxsize
/
frame_size
;
const
std
::
size_t
max_size
=
max_frames
*
frame_size
;
size_t
nbytes
=
ring_buffer
->
pop
(
dest
,
max_size
);
...
...
@@ -602,9 +604,10 @@ PipeWireOutput::Process() noexcept
LogWarning
(
pipewire_output_domain
,
"Decoder is too slow; playing silence to avoid xrun"
);
}
buf
->
datas
[
0
].
chunk
->
offset
=
0
;
buf
->
datas
[
0
].
chunk
->
stride
=
frame_size
;
buf
->
datas
[
0
].
chunk
->
size
=
nbytes
;
auto
&
chunk
=
*
d
.
chunk
;
chunk
.
offset
=
0
;
chunk
.
stride
=
frame_size
;
chunk
.
size
=
nbytes
;
pw_stream_queue_buffer
(
stream
,
b
);
...
...
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