Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
J
jami-daemon
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
131
Issues
131
List
Boards
Labels
Service Desk
Milestones
Iterations
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Analytics
Analytics
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
savoirfairelinux
jami-daemon
Commits
a5bcbabe
Commit
a5bcbabe
authored
Jun 18, 2019
by
Andreas Traczyk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
portaudiolayer: use device type to get device index
Change-Id: I44544221d4262699c75a644aa4fd67390a1c9a87
parent
227c8d1c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
src/media/audio/portaudio/portaudiolayer.cpp
src/media/audio/portaudio/portaudiolayer.cpp
+8
-8
No files found.
src/media/audio/portaudio/portaudiolayer.cpp
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
...
...
Write
Preview
Markdown
is supported
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