Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
791f6ec2
Project 'savoirfairelinux/ring-daemon' was moved to 'savoirfairelinux/jami-daemon'. Please update any links and bookmarks that may still have the old path.
Commit
791f6ec2
authored
11 years ago
by
Tristan Matthews
Browse files
Options
Downloads
Patches
Plain Diff
* #30143: alsa: cleanup
parent
a3e5f4f7
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
daemon/src/audio/alsa/alsalayer.cpp
+10
-8
10 additions, 8 deletions
daemon/src/audio/alsa/alsalayer.cpp
with
10 additions
and
8 deletions
daemon/src/audio/alsa/alsalayer.cpp
+
10
−
8
View file @
791f6ec2
...
@@ -474,8 +474,8 @@ AlsaLayer::write(void* buffer, int length, snd_pcm_t * handle)
...
@@ -474,8 +474,8 @@ AlsaLayer::write(void* buffer, int length, snd_pcm_t * handle)
// Detect when something is going wrong. This can be caused by alsa bugs or
// Detect when something is going wrong. This can be caused by alsa bugs or
// faulty encoder on the other side
// faulty encoder on the other side
// TODO do something useful instead of just warning and flushing buffers
// TODO do something useful instead of just warning and flushing buffers
if
(
watchdogTotalErr_
>
0
&&
watchdogTotalCount_
/
watchdogTotalErr_
>=
4
&&
watchdogTotalCount_
>
50
)
{
if
(
watchdogTotalErr_
>
0
&&
watchdogTotalCount_
/
watchdogTotalErr_
>=
4
and
watchdogTotalCount_
>
50
)
{
ERROR
(
"
Alsa: too many errors (
%d error o
n
%d frame
)
"
,
watchdogTotalErr_
,
watchdogTotalCount_
);
ERROR
(
"%d error
s out
o
f
%d frame
s
"
,
watchdogTotalErr_
,
watchdogTotalCount_
);
flushUrgent
();
flushUrgent
();
flushMain
();
flushMain
();
}
}
...
@@ -606,6 +606,7 @@ AlsaLayer::getAudioDeviceIndexMap(bool getCapture) const
...
@@ -606,6 +606,7 @@ AlsaLayer::getAudioDeviceIndexMap(bool getCapture) const
snd_pcm_info_set_stream
(
pcminfo
,
getCapture
?
SND_PCM_STREAM_CAPTURE
:
SND_PCM_STREAM_PLAYBACK
);
snd_pcm_info_set_stream
(
pcminfo
,
getCapture
?
SND_PCM_STREAM_CAPTURE
:
SND_PCM_STREAM_PLAYBACK
);
int
err
;
int
err
;
if
((
err
=
snd_ctl_pcm_info
(
handle
,
pcminfo
))
<
0
)
{
if
((
err
=
snd_ctl_pcm_info
(
handle
,
pcminfo
))
<
0
)
{
WARN
(
"Cannot get info: %s"
,
snd_strerror
(
err
));
WARN
(
"Cannot get info: %s"
,
snd_strerror
(
err
));
}
else
{
}
else
{
...
@@ -824,6 +825,7 @@ void AlsaLayer::audioCallback()
...
@@ -824,6 +825,7 @@ void AlsaLayer::audioCallback()
if
(
not
safeUpdate
(
ringtoneHandle_
,
ringtoneAvailSmpl
))
if
(
not
safeUpdate
(
ringtoneHandle_
,
ringtoneAvailSmpl
))
return
;
return
;
int
ringtoneAvailBytes
=
ringtoneAvailSmpl
*
sizeof
(
SFLAudioSample
);
int
ringtoneAvailBytes
=
ringtoneAvailSmpl
*
sizeof
(
SFLAudioSample
);
AudioBuffer
out
(
ringtoneAvailSmpl
);
AudioBuffer
out
(
ringtoneAvailSmpl
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment