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
b12fc3c6
Commit
b12fc3c6
authored
Jul 04, 2019
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output/alsa: throw unexpected snd_pcm_writei() errors
If snd_pcm_writei() fails, throw an error and stop playback instead of going into an endless busy loop.
parent
6d013b09
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
AlsaOutputPlugin.cxx
src/output/plugins/AlsaOutputPlugin.cxx
+6
-3
No files found.
src/output/plugins/AlsaOutputPlugin.cxx
View file @
b12fc3c6
...
...
@@ -767,13 +767,16 @@ AlsaOutput::Recover(int err) noexcept
written
=
false
;
err
=
snd_pcm_prepare
(
pcm
);
break
;
case
SND_PCM_STATE_DISCONNECTED
:
case
SND_PCM_STATE_DRAINING
:
/* can't play in this state; throw the error */
break
;
/* this is no error, so just keep running */
case
SND_PCM_STATE_PREPARED
:
case
SND_PCM_STATE_RUNNING
:
case
SND_PCM_STATE_DRAINING
:
err
=
0
;
/* the state is ok, but the error was unexpected;
throw it */
break
;
default
:
...
...
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