Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
34dcdff3
Commit
34dcdff3
authored
Oct 16, 2011
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx/AudioEffects: revert stuff which wasn't supposed to be committed
parent
74481b7f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
167 deletions
+27
-167
modules/gui/macosx/AudioEffects.h
modules/gui/macosx/AudioEffects.h
+0
-22
modules/gui/macosx/AudioEffects.m
modules/gui/macosx/AudioEffects.m
+27
-145
No files found.
modules/gui/macosx/AudioEffects.h
View file @
34dcdff3
...
...
@@ -7,7 +7,6 @@
* Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
* Jérôme Decoodt <djc@videolan.org>
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
...
...
@@ -48,22 +47,6 @@
IBOutlet
id
o_eq_band10_sld
;
IBOutlet
id
o_eq_preamp_sld
;
/* equalizer presets */
IBOutlet
id
o_eqp_panel
;
IBOutlet
id
o_eqp_ok_btn
;
IBOutlet
id
o_eqp_cancel_btn
;
IBOutlet
id
o_eqp_new_lbl
;
IBOutlet
id
o_eqp_new_fld
;
IBOutlet
id
o_eq_manage_panel
;
IBOutlet
id
o_eq_manage_ok_btn
;
IBOutlet
id
o_eq_manage_cancel_btn
;
IBOutlet
id
o_eq_manage_rename_btn
;
IBOutlet
id
o_eq_manage_delete_btn
;
IBOutlet
id
o_eq_manage_table
;
NSMutableArray
*
o_eq_custom_presets
;
NSMutableArray
*
o_eq_custom_presetnames
;
NSInteger
i_to_be_renamed_preset
;
/* Compressor */
IBOutlet
id
o_comp_enable_ckb
;
IBOutlet
id
o_comp_reset_btn
;
...
...
@@ -122,7 +105,6 @@
/* Equalizer */
-
(
void
)
setupEqualizer
;
-
(
void
)
rebuildEqMenu
;
-
(
void
)
equalizerUpdated
;
-
(
void
)
setBandSlidersValues
:(
float
*
)
values
;
-
(
void
)
initBandSliders
;
...
...
@@ -132,10 +114,6 @@
-
(
IBAction
)
eq_enable
:(
id
)
sender
;
-
(
IBAction
)
eq_preampSliderUpdated
:(
id
)
sender
;
-
(
IBAction
)
eq_twopass
:(
id
)
sender
;
-
(
IBAction
)
eq_nameButtonAction
:(
id
)
sender
;
-
(
IBAction
)
eq_manageAction
:(
id
)
sender
;
-
(
NSInteger
)
numberOfRowsInTableView
:(
NSTableView
*
)
aTableView
;
-
(
id
)
tableView
:(
NSTableView
*
)
aTableView
objectValueForTableColumn
:(
NSTableColumn
*
)
aTableColumn
row
:(
NSInteger
)
rowIndex
;
/* Compressor */
-
(
void
)
resetCompressor
;
...
...
modules/gui/macosx/AudioEffects.m
View file @
34dcdff3
...
...
@@ -7,7 +7,6 @@
* Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
* Jérôme Decoodt <djc@videolan.org>
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
...
...
@@ -54,22 +53,12 @@ static VLCAudioEffects *_o_sharedInstance = nil;
[
self
dealloc
];
}
else
{
p_intf
=
VLCIntf
;
o_eq_custom_presets
=
[[
NSMutableArray
alloc
]
init
];
o_eq_custom_presetnames
=
[[
NSMutableArray
alloc
]
init
];
_o_sharedInstance
=
[
super
init
];
}
return
_o_sharedInstance
;
}
-
(
void
)
dealloc
{
[
o_eq_custom_presets
release
];
[
o_eq_custom_presetnames
release
];
[
super
dealloc
];
}
-
(
void
)
awakeFromNib
{
/* setup the user's language */
...
...
@@ -77,16 +66,12 @@ static VLCAudioEffects *_o_sharedInstance = nil;
[
o_eq_enable_ckb
setTitle
:
_NS
(
"Enable"
)];
[
o_eq_twopass_ckb
setTitle
:
_NS
(
"2 Pass"
)];
[
o_eq_preamp_lbl
setStringValue
:
_NS
(
"Preamp"
)];
[
self
rebuildEqMenu
];
[
o_eqp_panel
setTitle
:
_NS
(
"New Preset Name"
)];
[
o_eqp_ok_btn
setTitle
:
_NS
(
"OK"
)];
[
o_eqp_cancel_btn
setTitle
:
_NS
(
"Cancel"
)];
[
o_eqp_new_lbl
setStringValue
:
_NS
(
"New Preset Name"
)];
[
o_eq_manage_panel
setTitle
:
_NS
(
"Manage Presets"
)];
[
o_eq_manage_ok_btn
setTitle
:
_NS
(
"OK"
)];
[
o_eq_manage_cancel_btn
setTitle
:
_NS
(
"Cancel"
)];
[
o_eq_manage_rename_btn
setTitle
:
_NS
(
"Rename"
)];
[
o_eq_manage_delete_btn
setTitle
:
_NS
(
"Delete"
)];
[
o_eq_presets_popup
removeAllItems
];
for
(
int
i
=
0
;
i
<
NB_PRESETS
;
i
++
)
{
[
o_eq_presets_popup
addItemWithTitle
:
_NS
(
preset_list_text
[
i
])];
[[
o_eq_presets_popup
lastItem
]
setTag
:
i
];
}
/* Compressor */
[
o_comp_enable_ckb
setTitle
:
_NS
(
"Enable dynamic range compressor"
)];
...
...
@@ -204,7 +189,7 @@ static bool GetEqualizerStatus( intf_thread_t *p_custom_intf,
{
vlc_object_t
*
p_object
=
VLC_OBJECT
(
getAout
());
if
(
p_object
==
NULL
)
p_object
=
vlc_object_hold
(
pl_Get
(
VLCIntf
)
);
p_object
=
pl_Get
(
VLCIntf
);
if
(
p_object
)
{
...
...
@@ -248,37 +233,11 @@ static bool GetEqualizerStatus( intf_thread_t *p_custom_intf,
}
}
free
(
psz_preset
);
vlc_object_release
(
p_object
);
}
[
self
equalizerUpdated
];
}
-
(
void
)
rebuildEqMenu
{
[
o_eq_presets_popup
removeAllItems
];
[
o_eq_presets_popup
addItemWithTitle
:
_NS
(
"Add Preset"
)];
[[
o_eq_presets_popup
lastItem
]
setTag
:
300
];
[
o_eq_presets_popup
addItemWithTitle
:
_NS
(
"Manage Presets"
)];
[[
o_eq_presets_popup
lastItem
]
setTag
:
301
];
[[
o_eq_presets_popup
menu
]
addItem
:
[
NSMenuItem
separatorItem
]];
for
(
int
i
=
0
;
i
<
NB_PRESETS
;
i
++
)
{
[
o_eq_presets_popup
addItemWithTitle
:
_NS
(
preset_list_text
[
i
])];
[[
o_eq_presets_popup
lastItem
]
setTag
:
i
];
}
if
([
o_eq_custom_presetnames
count
]
>
0
)
{
[[
o_eq_presets_popup
menu
]
addItem
:
[
NSMenuItem
separatorItem
]];
NSUInteger
count
=
[
o_eq_custom_presetnames
count
];
for
(
unsigned
int
i
=
0
;
i
<
count
;
i
++
)
{
[
o_eq_presets_popup
addItemWithTitle
:
[
o_eq_custom_presetnames
objectAtIndex
:
i
]];
[[
o_eq_presets_popup
lastItem
]
setTag
:
i
+
200
];
}
}
}
-
(
void
)
equalizerUpdated
{
float
f_preamp
,
f_band
[
10
];
...
...
@@ -400,28 +359,10 @@ static bool GetEqualizerStatus( intf_thread_t *p_custom_intf,
}
-
(
IBAction
)
eq_changePreset
:(
id
)
sender
{
NSInteger
numberOfChosenPreset
=
[[
sender
selectedItem
]
tag
];
if
(
numberOfChosenPreset
==
300
)
{
// add new preset
i_to_be_renamed_preset
=
-
1
;
[
NSApp
runModalForWindow
:
o_eqp_panel
];
}
else
if
(
numberOfChosenPreset
==
301
)
{
// manage presets
[
o_eq_manage_table
reloadData
];
[
NSApp
runModalForWindow
:
o_eq_manage_panel
];
}
else
if
(
numberOfChosenPreset
>=
200
)
{
// custom preset, TODO
}
else
{
vlc_object_t
*
p_object
=
VLC_OBJECT
(
getAout
());
if
(
p_object
==
NULL
)
p_object
=
vlc_object_hold
(
pl_Get
(
p_intf
));
NSInteger
numberOfChosenPreset
=
[[
sender
selectedItem
]
tag
];
var_SetString
(
p_object
,
"equalizer-preset"
,
preset_list
[
numberOfChosenPreset
]
);
...
...
@@ -433,7 +374,7 @@ static bool GetEqualizerStatus( intf_thread_t *p_custom_intf,
}
psz_values
=
[
preset
UTF8String
];
var_SetString
(
p_object
,
"equalizer-bands"
,
psz_values
);
var_SetFloat
(
p_object
,
"equalizer-preamp"
,
eqz_preset_10b
[
numberOfChosenPreset
].
f_preamp
);
var_SetFloat
(
p_object
,
"equalizer-preamp"
,
eqz_preset_10b
[[[
sender
selectedItem
]
tag
]
].
f_preamp
);
[
o_eq_preamp_sld
setFloatValue
:
eqz_preset_10b
[
numberOfChosenPreset
].
f_preamp
];
...
...
@@ -445,7 +386,6 @@ static bool GetEqualizerStatus( intf_thread_t *p_custom_intf,
config_PutPsz
(
p_intf
,
"equalizer-preset"
,
preset_list
[
numberOfChosenPreset
]
);
vlc_object_release
(
p_object
);
}
}
-
(
IBAction
)
eq_preampSliderUpdated
:(
id
)
sender
{
...
...
@@ -478,64 +418,6 @@ static bool GetEqualizerStatus( intf_thread_t *p_custom_intf,
vlc_object_release
(
p_object
);
}
-
(
IBAction
)
eq_nameButtonAction
:(
id
)
sender
{
[
NSApp
stopModal
];
[[
sender
window
]
orderOut
:
sender
];
if
(
sender
==
o_eqp_ok_btn
)
{
if
(
i_to_be_renamed_preset
!=
-
1
)
{
// rename existing preset
[
o_eq_custom_presetnames
replaceObjectAtIndex
:
i_to_be_renamed_preset
withObject
:[
o_eqp_new_fld
stringValue
]];
[
o_eq_manage_table
reloadData
];
[
self
rebuildEqMenu
];
}
else
{
// add new preset
[
o_eq_custom_presetnames
addObject
:
[
o_eqp_new_fld
stringValue
]];
[
self
rebuildEqMenu
];
// TODO
}
}
}
-
(
IBAction
)
eq_manageAction
:(
id
)
sender
{
if
(
sender
==
o_eq_manage_cancel_btn
||
sender
==
o_eq_manage_ok_btn
)
{
[
NSApp
stopModal
];
[[
sender
window
]
orderOut
:
sender
];
}
else
if
(
sender
==
o_eq_manage_delete_btn
)
{
[
o_eq_custom_presets
removeObjectAtIndex
:
[
o_eq_manage_table
selectedRow
]];
[
o_eq_custom_presetnames
removeObjectAtIndex
:
[
o_eq_manage_table
selectedRow
]];
[
o_eq_manage_table
reloadData
];
[
self
rebuildEqMenu
];
}
else
{
i_to_be_renamed_preset
=
[
o_eq_manage_table
selectedRow
];
[
o_eqp_new_fld
setStringValue
:
[
o_eq_custom_presetnames
objectAtIndex
:
i_to_be_renamed_preset
]];
[
NSApp
stopModal
];
[[
sender
window
]
orderOut
:
sender
];
[
NSApp
runModalForWindow
:
o_eqp_panel
];
}
}
-
(
NSInteger
)
numberOfRowsInTableView
:(
NSTableView
*
)
aTableView
{
return
[
o_eq_custom_presets
count
];
}
-
(
id
)
tableView
:(
NSTableView
*
)
aTableView
objectValueForTableColumn
:(
NSTableColumn
*
)
aTableColumn
row
:(
NSInteger
)
rowIndex
{
return
[
o_eq_custom_presetnames
objectAtIndex
:
rowIndex
];
}
#pragma mark -
#pragma mark Compressor
-
(
void
)
resetCompressor
...
...
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