Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC-Android
Manage
Activity
Members
Labels
Plan
Issues
528
Issue boards
Milestones
Wiki
Code
Merge requests
15
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC-Android
Commits
480f7244
Commit
480f7244
authored
4 years ago
by
Geoffrey Métais
Committed by
Nicolas Pomepuy
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Load HRTF file
parent
278a39e8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!544
Binaural sound support
Pipeline
#16203
passed with stage
in 4 minutes and 26 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
application/resources/src/main/java/org/videolan/resources/VLCOptions.kt
+19
-21
19 additions, 21 deletions
...ources/src/main/java/org/videolan/resources/VLCOptions.kt
with
19 additions
and
21 deletions
application/resources/src/main/java/org/videolan/resources/VLCOptions.kt
+
19
−
21
View file @
480f7244
...
...
@@ -59,14 +59,14 @@ object VLCOptions {
get
()
{
val
context
=
AppContextProvider
.
appContext
val
pref
=
Settings
.
getInstance
(
context
)
if
(
context
!=
null
&&
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
LOLLIPOP
&&
audiotrackSessionId
==
0
)
{
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
LOLLIPOP
&&
audiotrackSessionId
==
0
)
{
val
audioManager
=
context
.
getSystemService
(
Context
.
AUDIO_SERVICE
)
as
AudioManager
audiotrackSessionId
=
audioManager
.
generateAudioSessionId
()
}
val
options
=
ArrayList
<
String
>(
50
)
val
timeStrechingDefault
=
context
!=
null
&&
context
.
resources
.
getBoolean
(
R
.
bool
.
time_stretching_default
)
val
timeStrechingDefault
=
context
.
resources
.
getBoolean
(
R
.
bool
.
time_stretching_default
)
val
timeStreching
=
pref
.
getBoolean
(
"enable_time_stretching_audio"
,
timeStrechingDefault
)
val
subtitlesEncoding
=
pref
.
getString
(
"subtitle_text_encoding"
,
""
)
?:
""
val
frameSkip
=
pref
.
getBoolean
(
"enable_frame_skip"
,
false
)
...
...
@@ -109,22 +109,14 @@ object VLCOptions {
options
.
add
(
"--freetype-rel-fontsize="
+
freetypeRelFontsize
!!
)
if
(
freetypeBold
)
options
.
add
(
"--freetype-bold"
)
options
.
add
(
"--freetype-color="
+
freetypeColor
!!
)
if
(
freetypeBackground
)
options
.
add
(
"--freetype-background-opacity=128"
)
else
options
.
add
(
"--freetype-background-opacity=0"
)
if
(
opengl
==
1
)
options
.
add
(
"--vout=gles2,none"
)
options
.
add
(
if
(
freetypeBackground
)
"--freetype-background-opacity=128"
else
"--freetype-background-opacity=0"
)
if
(
opengl
==
1
)
options
.
add
(
"--vout=gles2,none"
)
else
if
(
opengl
==
0
)
options
.
add
(
"--vout=android_display,none"
)
options
.
add
(
"--keystore"
)
if
(
AndroidUtil
.
isMarshMallowOrLater
)
options
.
add
(
"file_crypt,none"
)
else
options
.
add
(
"file_plaintext,none"
)
if
(
context
!=
null
)
{
options
.
add
(
"--keystore-file"
)
options
.
add
(
File
(
context
.
getDir
(
"keystore"
,
Context
.
MODE_PRIVATE
),
"file"
).
absolutePath
)
}
options
.
add
(
if
(
AndroidUtil
.
isMarshMallowOrLater
)
"file_crypt,none"
else
"file_plaintext,none"
)
options
.
add
(
"--keystore-file"
)
options
.
add
(
File
(
context
.
getDir
(
"keystore"
,
Context
.
MODE_PRIVATE
),
"file"
).
absolutePath
)
options
.
add
(
if
(
verboseMode
)
"-vv"
else
"-v"
)
if
(
pref
.
getBoolean
(
"casting_passthrough"
,
false
))
options
.
add
(
"--sout-chromecast-audio-passthrough"
)
...
...
@@ -134,17 +126,23 @@ object VLCOptions {
options
.
add
(
"--sout-keep"
)
val
customOptions
=
pref
.
getString
(
"custom_libvlc_options"
,
null
)
if
(!
TextUtils
.
isEmpty
(
customOptions
))
{
val
optionsArray
=
customOptions
!!
.
split
(
"\\r?\\n"
.
toRegex
()).
toTypedArray
()
if
(!
customOptions
.
isNullOrEmpty
(
))
{
val
optionsArray
=
customOptions
.
split
(
"\\r?\\n"
.
toRegex
()).
toTypedArray
()
if
(!
optionsArray
.
isNullOrEmpty
())
Collections
.
addAll
(
options
,
*
optionsArray
)
}
options
.
add
(
"--smb-force-v1"
)
if
(!
Settings
.
showTvUi
)
{
//Ambisonic
val
hstfDir
=
context
.
getDir
(
"vlc"
,
Context
.
MODE_PRIVATE
)
val
hstfPath
=
"${hstfDir.absolutePath}/.share/hrtfs/dodeca_and_7channel_3DSL_HRTF.sofa"
options
.
add
(
"--spatialaudio-headphones"
)
options
.
add
(
"--hrtf-file"
)
options
.
add
(
hstfPath
)
}
return
options
}
fun
isAudioDigitalOutputEnabled
(
pref
:
SharedPreferences
):
Boolean
{
return
pref
.
getBoolean
(
"audio_digital_output"
,
false
)
}
fun
isAudioDigitalOutputEnabled
(
pref
:
SharedPreferences
)
=
pref
.
getBoolean
(
"audio_digital_output"
,
false
)
fun
setAudioDigitalOutputEnabled
(
pref
:
SharedPreferences
,
enabled
:
Boolean
)
{
pref
.
putSingle
(
"audio_digital_output"
,
enabled
)
...
...
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