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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
41ac872d
Commit
41ac872d
authored
13 years ago
by
Rafaël Carré
Browse files
Options
Downloads
Patches
Plain Diff
* #6629 : keep the correct audio module when frequency changes
parent
1756c278
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/managerimpl.cpp
+5
-25
5 additions, 25 deletions
daemon/src/managerimpl.cpp
with
5 additions
and
25 deletions
daemon/src/managerimpl.cpp
+
5
−
25
View file @
41ac872d
...
@@ -123,35 +123,19 @@ void ManagerImpl::init (std::string config_file)
...
@@ -123,35 +123,19 @@ void ManagerImpl::init (std::string config_file)
audioLayerMutexLock
();
audioLayerMutexLock
();
if
(
_audiodriver
)
{
if
(
_audiodriver
)
{
unsigned
int
sampleRate
=
_audiodriver
->
getSampleRate
();
_telephoneTone
=
new
TelephoneTone
(
preferences
.
getZoneToneChoice
(),
_audiodriver
->
getSampleRate
());
_dtmfKey
=
new
DTMF
(
8000
);
_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
);
}
}
audioLayerMutexUnlock
();
audioLayerMutexUnlock
();
// Load the history
_history
->
load_history
(
preferences
.
getHistoryLimit
());
_history
->
load_history
(
preferences
.
getHistoryLimit
());
// Init the instant messaging module
_imModule
->
init
();
_imModule
->
init
();
// Register accounts
registerAccounts
();
registerAccounts
();
}
}
void
ManagerImpl
::
terminate
()
void
ManagerImpl
::
terminate
()
{
{
_debug
(
"Manager: Terminate "
);
std
::
vector
<
std
::
string
>
callList
(
getCallList
());
std
::
vector
<
std
::
string
>
callList
(
getCallList
());
_debug
(
"Manager: Hangup %zu remaining call"
,
callList
.
size
());
_debug
(
"Manager: Hangup %zu remaining call"
,
callList
.
size
());
...
@@ -2334,8 +2318,6 @@ void ManagerImpl::setMailNotify (void)
...
@@ -2334,8 +2318,6 @@ void ManagerImpl::setMailNotify (void)
void
ManagerImpl
::
setAudioManager
(
int32_t
api
)
void
ManagerImpl
::
setAudioManager
(
int32_t
api
)
{
{
_debug
(
"Manager: Setting audio manager "
);
audioLayerMutexLock
();
audioLayerMutexLock
();
if
(
!
_audiodriver
)
{
if
(
!
_audiodriver
)
{
...
@@ -2481,13 +2463,11 @@ void ManagerImpl::initAudioDriver (void)
...
@@ -2481,13 +2463,11 @@ void ManagerImpl::initAudioDriver (void)
void
ManagerImpl
::
switchAudioManager
(
void
)
void
ManagerImpl
::
switchAudioManager
(
void
)
{
{
_debug
(
"Manager: Switching audio manager "
);
audioLayerMutexLock
();
audioLayerMutexLock
();
bool
wasStarted
=
_audiodriver
->
isStarted
();
bool
wasStarted
=
_audiodriver
->
isStarted
();
int
newType
=
(
_audiodriver
->
getLayerType
()
)
==
PULSEAUDIO
?
ALSA
:
PULSEAUDIO
;
int
newType
=
(
_audiodriver
->
getLayerType
()
==
PULSEAUDIO
)
?
ALSA
:
PULSEAUDIO
;
delete
_audiodriver
;
delete
_audiodriver
;
if
(
newType
==
ALSA
)
if
(
newType
==
ALSA
)
...
@@ -2533,9 +2513,9 @@ void ManagerImpl::audioSamplingRateChanged (int samplerate)
...
@@ -2533,9 +2513,9 @@ void ManagerImpl::audioSamplingRateChanged (int samplerate)
delete
_audiodriver
;
delete
_audiodriver
;
if
(
type
==
PULSEAUDIO
)
if
(
type
==
PULSEAUDIO
)
_audiodriver
=
new
AlsaLayer
;
else
_audiodriver
=
new
PulseLayer
;
_audiodriver
=
new
PulseLayer
;
else
_audiodriver
=
new
AlsaLayer
;
unsigned
int
sampleRate
=
_audiodriver
->
getSampleRate
();
unsigned
int
sampleRate
=
_audiodriver
->
getSampleRate
();
...
...
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