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
a2ce2447
Commit
a2ce2447
authored
Oct 01, 2013
by
Max Kellermann
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v0.17.x'
parents
5e20b797
9a107625
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
2 deletions
+23
-2
NEWS
NEWS
+4
-0
AlsaMixerPlugin.cxx
src/mixer/AlsaMixerPlugin.cxx
+19
-2
No files found.
NEWS
View file @
a2ce2447
...
...
@@ -28,6 +28,10 @@ ver 0.18 (2012/??/??)
* improved decoder/output error reporting
* eliminate timer wakeup on idle MPD
ver 0.17.6 (not yet released)
* mixer:
- alsa: fix busy loop when USB sound device gets unplugged
ver 0.17.5 (2013/08/04)
* protocol:
- fix "playlistadd" with URI
...
...
src/mixer/AlsaMixerPlugin.cxx
View file @
a2ce2447
...
...
@@ -38,7 +38,7 @@
static
constexpr
unsigned
VOLUME_MIXER_ALSA_INDEX_DEFAULT
=
0
;
class
AlsaMixerMonitor
final
:
private
MultiSocketMonitor
{
snd_mixer_t
*
const
mixer
;
snd_mixer_t
*
mixer
;
ReusableArray
<
pollfd
>
pfd_buffer
;
...
...
@@ -83,6 +83,9 @@ static constexpr Domain alsa_mixer_domain("alsa_mixer");
int
AlsaMixerMonitor
::
PrepareSockets
()
{
if
(
mixer
==
nullptr
)
return
-
1
;
int
count
=
snd_mixer_poll_descriptors_count
(
mixer
);
if
(
count
<
0
)
count
=
0
;
...
...
@@ -117,7 +120,21 @@ AlsaMixerMonitor::PrepareSockets()
void
AlsaMixerMonitor
::
DispatchSockets
()
{
snd_mixer_handle_events
(
mixer
);
assert
(
mixer
!=
nullptr
);
int
err
=
snd_mixer_handle_events
(
mixer
);
if
(
err
<
0
)
{
g_warning
(
"snd_mixer_handle_events() failed: %s"
,
snd_strerror
(
err
));
if
(
err
==
-
ENODEV
)
{
/* the sound device was unplugged; disable
this GSource */
mixer
=
nullptr
;
InvalidateSockets
();
return
;
}
}
}
/*
...
...
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