Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
4807e99b
Commit
4807e99b
authored
May 24, 2014
by
David Fuhrmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: simplify setAudioFilter
parent
b34dd4b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
22 deletions
+5
-22
modules/gui/macosx/AudioEffects.m
modules/gui/macosx/AudioEffects.m
+5
-22
No files found.
modules/gui/macosx/AudioEffects.m
View file @
4807e99b
...
...
@@ -161,31 +161,14 @@ static VLCAudioEffects *_o_sharedInstance = nil;
-
(
void
)
setAudioFilter
:
(
char
*
)
psz_name
on
:(
BOOL
)
b_on
{
char
*
psz_tmp
;
audio_output_t
*
p_aout
=
getAout
();
if
(
p_aout
)
psz_tmp
=
var_GetNonEmptyString
(
p_aout
,
"audio-filter"
);
else
psz_tmp
=
config_GetPsz
(
p_intf
,
"audio-filter"
);
if
(
b_on
)
{
if
(
!
psz_tmp
)
config_PutPsz
(
p_intf
,
"audio-filter"
,
psz_name
);
else
if
(
strstr
(
psz_tmp
,
psz_name
)
==
NULL
)
{
psz_tmp
=
(
char
*
)[[
NSString
stringWithFormat
:
@"%s:%s"
,
psz_tmp
,
psz_name
]
UTF8String
];
config_PutPsz
(
p_intf
,
"audio-filter"
,
psz_tmp
);
}
}
else
{
if
(
psz_tmp
)
{
psz_tmp
=
(
char
*
)[[[
NSString
stringWithUTF8String
:
psz_tmp
]
stringByTrimmingCharactersInSet
:
[
NSCharacterSet
characterSetWithCharactersInString
:[
NSString
stringWithFormat
:
@":%s"
,
psz_name
]]]
UTF8String
];
psz_tmp
=
(
char
*
)[[[
NSString
stringWithUTF8String
:
psz_tmp
]
stringByTrimmingCharactersInSet
:
[
NSCharacterSet
characterSetWithCharactersInString
:[
NSString
stringWithFormat
:
@"%s:"
,
psz_name
]]]
UTF8String
];
psz_tmp
=
(
char
*
)[[[
NSString
stringWithUTF8String
:
psz_tmp
]
stringByTrimmingCharactersInSet
:
[
NSCharacterSet
characterSetWithCharactersInString
:[
NSString
stringWithUTF8String
:
psz_name
]]]
UTF8String
];
config_PutPsz
(
p_intf
,
"audio-filter"
,
psz_tmp
);
}
}
playlist_EnableAudioFilter
(
pl_Get
(
p_intf
),
psz_name
,
b_on
);
if
(
p_aout
)
{
playlist_EnableAudioFilter
(
pl_Get
(
p_intf
),
psz_name
,
b_on
);
char
*
psz_new
=
var_GetNonEmptyString
(
p_aout
,
"audio-filter"
);
config_PutPsz
(
p_intf
,
"audio-filter"
,
psz_new
);
free
(
psz_new
);
vlc_object_release
(
p_aout
);
}
}
...
...
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