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
41ac872d
Commit
41ac872d
authored
Aug 31, 2011
by
Rafaël Carré
Browse files
* #6629 : keep the correct audio module when frequency changes
parent
1756c278
Changes
1
Hide whitespace changes
Inline
Side-by-side
daemon/src/managerimpl.cpp
View file @
41ac872d
...
...
@@ -123,35 +123,19 @@ void ManagerImpl::init (std::string config_file)
audioLayerMutexLock
();
if
(
_audiodriver
)
{
unsigned
int
sampleRate
=
_audiodriver
->
getSampleRate
();
_debug
(
"Manager: Load telephone tone"
);
std
::
string
country
(
preferences
.
getZoneToneChoice
());
_telephoneTone
=
new
TelephoneTone
(
country
,
sampleRate
);
_debug
(
"Manager: Loading DTMF key (%d)"
,
sampleRate
);
sampleRate
=
8000
;
_dtmfKey
=
new
DTMF
(
sampleRate
);
_telephoneTone
=
new
TelephoneTone
(
preferences
.
getZoneToneChoice
(),
_audiodriver
->
getSampleRate
());
_dtmfKey
=
new
DTMF
(
8000
);
}
audioLayerMutexUnlock
();
// Load the history
_history
->
load_history
(
preferences
.
getHistoryLimit
());
// Init the instant messaging module
_imModule
->
init
();
// Register accounts
registerAccounts
();
}
void
ManagerImpl
::
terminate
()
{
_debug
(
"Manager: Terminate "
);
std
::
vector
<
std
::
string
>
callList
(
getCallList
());
_debug
(
"Manager: Hangup %zu remaining call"
,
callList
.
size
());
...
...
@@ -2334,8 +2318,6 @@ void ManagerImpl::setMailNotify (void)
void
ManagerImpl
::
setAudioManager
(
int32_t
api
)
{
_debug
(
"Manager: Setting audio manager "
);
audioLayerMutexLock
();
if
(
!
_audiodriver
)
{
...
...
@@ -2481,13 +2463,11 @@ void ManagerImpl::initAudioDriver (void)
void
ManagerImpl
::
switchAudioManager
(
void
)
{
_debug
(
"Manager: Switching audio manager "
);
audioLayerMutexLock
();
bool
wasStarted
=
_audiodriver
->
isStarted
();
int
newType
=
(
_audiodriver
->
getLayerType
()
)
==
PULSEAUDIO
?
ALSA
:
PULSEAUDIO
;
int
newType
=
(
_audiodriver
->
getLayerType
()
==
PULSEAUDIO
)
?
ALSA
:
PULSEAUDIO
;
delete
_audiodriver
;
if
(
newType
==
ALSA
)
...
...
@@ -2533,9 +2513,9 @@ void ManagerImpl::audioSamplingRateChanged (int samplerate)
delete
_audiodriver
;
if
(
type
==
PULSEAUDIO
)
_audiodriver
=
new
AlsaLayer
;
else
_audiodriver
=
new
PulseLayer
;
else
_audiodriver
=
new
AlsaLayer
;
unsigned
int
sampleRate
=
_audiodriver
->
getSampleRate
();
...
...
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