Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libjitsi
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
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
ZRTP
libjitsi
Commits
140730d9
Commit
140730d9
authored
12 years ago
by
Vincent Lucas
Browse files
Options
Downloads
Patches
Plain Diff
Corrects PortAudio not running on Linux: checks if CoreAudio is supported for the current system.
parent
83c2a25a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/org/jitsi/impl/neomedia/CoreAudioDevice.java
+12
-0
12 additions, 0 deletions
src/org/jitsi/impl/neomedia/CoreAudioDevice.java
src/org/jitsi/impl/neomedia/device/PortAudioSystem.java
+8
-4
8 additions, 4 deletions
src/org/jitsi/impl/neomedia/device/PortAudioSystem.java
with
20 additions
and
4 deletions
src/org/jitsi/impl/neomedia/CoreAudioDevice.java
+
12
−
0
View file @
140730d9
...
...
@@ -15,20 +15,32 @@
*/
public
class
CoreAudioDevice
{
/**
* Loads CoreAudioDevice if we are using MacOsX or Windows Vista/7/8.
*/
static
{
isLoaded
=
false
;
if
(
OSUtils
.
IS_MAC
)
{
System
.
loadLibrary
(
"jnmaccoreaudio"
);
isLoaded
=
true
;
}
else
if
(
OSUtils
.
IS_WINDOWS_VISTA
||
OSUtils
.
IS_WINDOWS_7
||
OSUtils
.
IS_WINDOWS_8
)
{
System
.
loadLibrary
(
"jnwincoreaudio"
);
isLoaded
=
true
;
}
}
/**
* Tells if the CoreAudio library used by this CoreAudioDevice is correctly
* loaded: if we are under a supported operating system.
*/
public
static
boolean
isLoaded
;
public
static
native
int
initDevices
();
public
static
native
void
freeDevices
();
...
...
This diff is collapsed.
Click to expand it.
src/org/jitsi/impl/neomedia/device/PortAudioSystem.java
+
8
−
4
View file @
140730d9
...
...
@@ -264,7 +264,8 @@ protected void doInitialize()
=
new
LinkedList
<
ExtendedCaptureDeviceInfo
>();
final
boolean
loggerIsDebugEnabled
=
logger
.
isDebugEnabled
();
CoreAudioDevice
.
initDevices
();
if
(
CoreAudioDevice
.
isLoaded
)
CoreAudioDevice
.
initDevices
();
for
(
int
deviceIndex
=
0
;
deviceIndex
<
deviceCount
;
deviceIndex
++)
{
long
deviceInfo
=
Pa
.
GetDeviceInfo
(
deviceIndex
);
...
...
@@ -281,8 +282,10 @@ protected void doInitialize()
=
Pa
.
DeviceInfo_getTransportType
(
deviceInfo
);
String
deviceUID
=
Pa
.
DeviceInfo_getDeviceUID
(
deviceInfo
);
String
modelIdentifier
=
CoreAudioDevice
.
getDeviceModelIdentifier
(
deviceUID
);
String
modelIdentifier
=
null
;
if
(
CoreAudioDevice
.
isLoaded
)
modelIdentifier
=
CoreAudioDevice
.
getDeviceModelIdentifier
(
deviceUID
);
/*
* TODO The intention of reinitialize() was to perform the
...
...
@@ -398,7 +401,8 @@ else if (maxOutputChannels > 0)
}
}
}
CoreAudioDevice
.
freeDevices
();
if
(
CoreAudioDevice
.
isLoaded
)
CoreAudioDevice
.
freeDevices
();
/*
* Make sure that devices which support both capture and playback are
...
...
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