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
a5bcbabe
Commit
a5bcbabe
authored
5 years ago
by
Andreas Traczyk
Browse files
Options
Downloads
Patches
Plain Diff
portaudiolayer: use device type to get device index
Change-Id: I44544221d4262699c75a644aa4fd67390a1c9a87
parent
227c8d1c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/media/audio/portaudio/portaudiolayer.cpp
+8
-8
8 additions, 8 deletions
src/media/audio/portaudio/portaudiolayer.cpp
with
8 additions
and
8 deletions
src/media/audio/portaudio/portaudiolayer.cpp
+
8
−
8
View file @
a5bcbabe
...
...
@@ -104,21 +104,21 @@ int
PortAudioLayer
::
getAudioDeviceIndex
(
const
std
::
string
&
name
,
DeviceType
type
)
const
{
int
numDevices
=
0
;
(
void
)
type
;
auto
deviceList
=
pimpl_
->
getDeviceByType
(
type
);
numDevices
=
Pa_GetDeviceCount
();
int
numDevices
=
0
;
numDevices
=
deviceList
.
size
();
if
(
numDevices
<
0
)
{
JAMI_ERR
(
"PortAudioLayer error : %s"
,
Pa_GetErrorText
(
numDevices
));
}
else
{
const
PaDeviceInfo
*
deviceInfo
;
for
(
int
i
=
0
;
i
<
numDevices
;
i
++
)
{
deviceInfo
=
Pa_GetDeviceInfo
(
i
);
if
(
deviceInfo
->
name
==
name
)
int
i
=
0
;
for
(
auto
d
=
deviceList
.
cbegin
();
d
!=
deviceList
.
cend
();
++
d
,
++
i
)
{
if
(
*
d
==
name
)
{
return
i
;
}
}
}
return
-
1
;
return
paNoDevice
;
}
std
::
string
...
...
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