Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
c7b8228b
Commit
c7b8228b
authored
May 17, 2010
by
Alexandre Savard
Browse files
[#1962] Add default ALSA ringtone device in config
parent
bc09f360
Changes
1
Hide whitespace changes
Inline
Side-by-side
sflphone-common/src/managerimpl.cpp
View file @
c7b8228b
...
...
@@ -2101,6 +2101,8 @@ void ManagerImpl::initConfigFile (bool load_user_value, std::string alternate) {
ALSA_CARD_ID_IN
,
ALSA_DFT_CARD
),
AUDIO
);
_config
.
addDefaultValue
(
std
::
pair
<
std
::
string
,
std
::
string
>
(
ALSA_CARD_ID_OUT
,
ALSA_DFT_CARD
),
AUDIO
);
_config
.
addDefaultValue
(
std
::
pair
<
std
::
string
,
std
::
string
>
(
ALSA_CARD_ID_RING
,
ALSA_DFT_CARD
),
AUDIO
);
_config
.
addDefaultValue
(
std
::
pair
<
std
::
string
,
std
::
string
>
(
AUDIO_SAMPLE_RATE
,
DFT_SAMPLE_RATE
),
AUDIO
);
_config
.
addDefaultValue
(
std
::
pair
<
std
::
string
,
std
::
string
>
(
...
...
@@ -2786,6 +2788,8 @@ void ManagerImpl::selectAudioDriver (void) {
if
(
!
alsalayer
->
soundCardIndexExist
(
numCardRing
,
SFL_PCM_RINGTONE
))
{
_debug
(
" Card with index %i doesn't exist or cannot ringtone. Switch to 0."
,
numCardRing
);
numCardRing
=
ALSA_DFT_CARD_ID
;
setConfig
(
AUDIO
,
ALSA_CARD_ID_RING
,
ALSA_DFT_CARD_ID
);
}
}
...
...
@@ -2858,14 +2862,13 @@ void ManagerImpl::switchAudioManager (void) {
SFL_PCM_BOTH
,
alsaPlugin
);
if
(
_audiodriver
->
getErrorMessage
()
!=
-
1
)
notifyErrClient
(
_audiodriver
->
getErrorMessage
());
notifyErrClient
(
_audiodriver
->
getErrorMessage
());
_debug
(
"Manager: Current device: %i "
,
type
);
_debug
(
"Manager: Has current call: %i "
,
hasCurrentCall
());
if
(
hasCurrentCall
())
_audiodriver
->
startStream
();
_audiodriver
->
startStream
();
// ost::MutexLock unlock (*getAudioLayerMutex());
getAudioLayerMutex
()
->
leave
();
...
...
Write
Preview
Supports
Markdown
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