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
762565e9
Commit
762565e9
authored
Mar 10, 2010
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output/jack: drain the ring buffers during pause
If we're not doing this, and a new song is played after pause ends, then you will hear the rest of the previous song.
parent
41a4662c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
jack_output_plugin.c
src/output/jack_output_plugin.c
+7
-0
No files found.
src/output/jack_output_plugin.c
View file @
762565e9
...
...
@@ -118,6 +118,13 @@ mpd_jack_process(jack_nframes_t nframes, void *arg)
return
0
;
if
(
jd
->
pause
)
{
/* empty the ring buffers */
const
jack_nframes_t
available
=
mpd_jack_available
(
jd
);
for
(
unsigned
i
=
0
;
i
<
jd
->
audio_format
.
channels
;
++
i
)
jack_ringbuffer_read_advance
(
jd
->
ringbuffer
[
i
],
available
*
sample_size
);
/* generate silence while MPD is paused */
for
(
unsigned
i
=
0
;
i
<
jd
->
audio_format
.
channels
;
++
i
)
{
...
...
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