Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
2a1e9a20
Commit
2a1e9a20
authored
Jan 06, 2012
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: fixed volume range (fix #5790)
parent
a80cde4d
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
54 additions
and
144 deletions
+54
-144
extras/package/macosx/Resources/English.lproj/MainMenu.xib
extras/package/macosx/Resources/English.lproj/MainMenu.xib
+13
-9
extras/package/macosx/Resources/English.lproj/Preferences.xib
...as/package/macosx/Resources/English.lproj/Preferences.xib
+17
-93
modules/gui/macosx/CoreInteraction.m
modules/gui/macosx/CoreInteraction.m
+3
-5
modules/gui/macosx/MainWindow.m
modules/gui/macosx/MainWindow.m
+4
-6
modules/gui/macosx/applescript.h
modules/gui/macosx/applescript.h
+2
-2
modules/gui/macosx/applescript.m
modules/gui/macosx/applescript.m
+4
-19
modules/gui/macosx/fspanel.h
modules/gui/macosx/fspanel.h
+2
-2
modules/gui/macosx/fspanel.m
modules/gui/macosx/fspanel.m
+7
-6
modules/gui/macosx/simple_prefs.m
modules/gui/macosx/simple_prefs.m
+2
-2
No files found.
extras/package/macosx/Resources/English.lproj/MainMenu.xib
View file @
2a1e9a20
...
...
@@ -21,14 +21,15 @@
</object>
<object
class=
"NSMutableArray"
key=
"IBDocument.EditedObjectIDs"
>
<bool
key=
"EncodedWithXMLCoder"
>
YES
</bool>
<integer
value=
"4722"
/>
<integer
value=
"29"
/>
<integer
value=
"1617"
/>
<integer
value=
"4596"
/>
<integer
value=
"2730"
/>
<integer
value=
"4895"
/>
<integer
value=
"21"
/>
<integer
value=
"4756"
/>
<integer
value=
"915"
/>
<integer
value=
"4895"
/>
<integer
value=
"29"
/>
<integer
value=
"2770"
/>
<integer
value=
"2730"
/>
<integer
value=
"4596"
/>
<integer
value=
"4722"
/>
<integer
value=
"283"
/>
</object>
<object
class=
"NSArray"
key=
"IBDocument.PluginDependencies"
>
...
...
@@ -914,9 +915,9 @@
</object>
<reference
key=
"NSSupport"
ref=
"340291444"
/>
<reference
key=
"NSControlView"
ref=
"788281303"
/>
<double
key=
"NSMaxValue"
>
3
2
</double>
<double
key=
"NSMaxValue"
>
51
2
</double>
<double
key=
"NSMinValue"
>
0.0
</double>
<double
key=
"NSValue"
>
8
</double>
<double
key=
"NSValue"
>
256
</double>
<double
key=
"NSAltIncValue"
>
0.0
</double>
<int
key=
"NSNumberOfTickMarks"
>
0
</int>
<int
key=
"NSTickMarkPosition"
>
1
</int>
...
...
@@ -3431,7 +3432,7 @@
<nil
key=
"NSUserInterfaceItemIdentifier"
/>
<string
key=
"NSWindowContentMaxSize"
>
{1.7976931348623157e+308, 1.7976931348623157e+308}
</string>
<object
class=
"NSView"
key=
"NSWindowView"
id=
"985395477"
>
<
nil
key=
"NSNextResponder"
/>
<
reference
key=
"NSNextResponder"
/>
<int
key=
"NSvFlags"
>
256
</int>
<object
class=
"NSMutableArray"
key=
"NSSubviews"
>
<bool
key=
"EncodedWithXMLCoder"
>
YES
</bool>
...
...
@@ -3821,6 +3822,7 @@
</object>
</object>
<string
key=
"NSFrameSize"
>
{549, 87}
</string>
<reference
key=
"NSSuperview"
/>
</object>
<string
key=
"NSScreenRect"
>
{{0, 0}, {1280, 778}}
</string>
<string
key=
"NSMaxSize"
>
{1.7976931348623157e+308, 1.7976931348623157e+308}
</string>
...
...
@@ -10555,6 +10557,7 @@ LCAuLi4</string>
<string>
2807.IBPluginDependency
</string>
<string>
2807.ImportedFromIB2
</string>
<string>
2808.IBPluginDependency
</string>
<string>
2808.IBViewBoundsToFrameTransform
</string>
<string>
2808.ImportedFromIB2
</string>
<string>
282.IBEditorWindowLastContentRect
</string>
<string>
282.IBPluginDependency
</string>
...
...
@@ -11328,6 +11331,7 @@ LCAuLi4</string>
<string>
com.apple.InterfaceBuilder.CocoaPlugin
</string>
<boolean
value=
"YES"
/>
<string>
com.apple.InterfaceBuilder.CocoaPlugin
</string>
<object
class=
"NSAffineTransform"
/>
<boolean
value=
"YES"
/>
<string>
{{329, 372}, {599, 368}}
</string>
<string>
com.apple.InterfaceBuilder.CocoaPlugin
</string>
...
...
extras/package/macosx/Resources/English.lproj/Preferences.xib
View file @
2a1e9a20
This diff is collapsed.
Click to expand it.
modules/gui/macosx/CoreInteraction.m
View file @
2a1e9a20
...
...
@@ -147,7 +147,7 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
else
{
playlist_t
*
p_playlist
=
pl_Get
(
VLCIntf
);
NSLog
(
@"playlist rate = %f"
,
f_rate
);
f_rate
=
var_GetFloat
(
p_playlist
,
"rate"
);
}
double
value
=
17
*
log
(
f_rate
)
/
log
(
2
.
);
...
...
@@ -442,10 +442,8 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
{
intf_thread_t
*
p_intf
=
VLCIntf
;
playlist_t
*
p_playlist
=
pl_Get
(
VLCIntf
);
audio_volume_t
i_volume
=
(
audio_volume_t
)
i_value
;
int
i_volume_step
;
i_volume_step
=
config_GetInt
(
VLCIntf
->
p_libvlc
,
"volume-step"
);
aout_VolumeSet
(
p_playlist
,
i_volume
*
i_volume_step
);
aout_VolumeSet
(
p_playlist
,
i_value
);
}
#pragma mark -
...
...
modules/gui/macosx/MainWindow.m
View file @
2a1e9a20
...
...
@@ -39,6 +39,7 @@
#import <vlc_url.h>
#import <vlc_strings.h>
#import <vlc_services_discovery.h>
#import <vlc_aout_intf.h>
@implementation
VLCMainWindow
static
VLCMainWindow
*
_o_sharedInstance
=
nil
;
...
...
@@ -665,7 +666,7 @@ static VLCMainWindow *_o_sharedInstance = nil;
else
if
(
sender
==
o_volume_down_btn
)
[[
VLCCoreInteraction
sharedInstance
]
mute
];
else
[[
VLCCoreInteraction
sharedInstance
]
setVolume
:
400
];
[[
VLCCoreInteraction
sharedInstance
]
setVolume
:
AOUT_VOLUME_MAX
];
}
-
(
IBAction
)
effects
:(
id
)
sender
...
...
@@ -896,11 +897,8 @@ static VLCMainWindow *_o_sharedInstance = nil;
if
(
i_volume
!=
i_lastShownVolume
)
{
i_lastShownVolume
=
i_volume
;
int
i_volume_step
=
0
;
i_volume_step
=
config_GetInt
(
VLCIntf
->
p_libvlc
,
"volume-step"
);
[
o_volume_sld
setFloatValue
:
(
float
)
i_lastShownVolume
/
i_volume_step
];
[
o_fspanel
setVolumeLevel
:
(
float
)
i_lastShownVolume
/
i_volume_step
];
[
o_volume_sld
setIntValue
:
i_volume
];
[
o_fspanel
setVolumeLevel
:
i_volume
];
}
}
...
...
modules/gui/macosx/applescript.h
View file @
2a1e9a20
...
...
@@ -43,8 +43,8 @@
-
(
BOOL
)
scriptFullscreenMode
;
-
(
void
)
setScriptFullscreenMode
:
(
BOOL
)
mode
;
-
(
double
)
audioVolume
;
-
(
void
)
setAudioVolume
:
(
double
)
mode
;
-
(
int
)
audioVolume
;
-
(
void
)
setAudioVolume
:
(
int
)
mode
;
-
(
int
)
currentTime
;
-
(
void
)
setCurrentTime
:
(
int
)
mode
;
...
...
modules/gui/macosx/applescript.m
View file @
2a1e9a20
...
...
@@ -226,27 +226,12 @@
return
[[
VLCCoreInteraction
sharedInstance
]
isPlaying
];
}
-
(
double
)
audioVolume
{
return
(
(
double
)[[
VLCCoreInteraction
sharedInstance
]
volume
]
/
(
double
)
AOUT_VOLUME_DEFAULT
);
-
(
int
)
audioVolume
{
return
(
[[
VLCCoreInteraction
sharedInstance
]
volume
]
);
}
-
(
void
)
setAudioVolume
:
(
double
)
d_audioVolume
{
//1 = 100%, 4 = 400%; 0 <= d_audioVolume <= 4
//0-1024 (but AOUT_VOLUME_MAX == 512)???
//AOUT_VOLUME_DEFAULT = 256 = 100%
//somehow [[VLCCoreInteraction sharedInstance] setVolume:i_parameter] has 0-32 steps with 32 as stepWidth (0 - 1024)
if
(
d_audioVolume
<
0
)
d_audioVolume
=
0
;
if
(
d_audioVolume
>
4
)
d_audioVolume
=
4
;
intf_thread_t
*
p_intf
=
VLCIntf
;
playlist_t
*
p_playlist
=
pl_Get
(
VLCIntf
);
int
i_volume_step
=
config_GetInt
(
VLCIntf
->
p_libvlc
,
"volume-step"
);
int
i_parameter
=
(
int
)
(
d_audioVolume
*
i_volume_step
/
4
);
[[
VLCCoreInteraction
sharedInstance
]
setVolume
:
i_parameter
];
-
(
void
)
setAudioVolume
:
(
int
)
i_audioVolume
{
[[
VLCCoreInteraction
sharedInstance
]
setVolume
:(
int
)
i_audioVolume
];
}
-
(
int
)
currentTime
{
...
...
modules/gui/macosx/fspanel.h
View file @
2a1e9a20
...
...
@@ -51,7 +51,7 @@
-
(
void
)
setStreamTitle
:
(
NSString
*
)
o_title
;
-
(
void
)
setStreamPos
:
(
float
)
f_pos
andTime
:
(
NSString
*
)
o_time
;
-
(
void
)
setSeekable
:
(
BOOL
)
b_seekable
;
-
(
void
)
setVolumeLevel
:
(
float
)
f
_volumeLevel
;
-
(
void
)
setVolumeLevel
:
(
int
)
i
_volumeLevel
;
-
(
void
)
setNonActive
:
(
id
)
noData
;
-
(
void
)
setActive
:
(
id
)
noData
;
...
...
@@ -93,7 +93,7 @@
-
(
void
)
setStreamTitle
:
(
NSString
*
)
o_title
;
-
(
void
)
setStreamPos
:
(
float
)
f_pos
andTime
:
(
NSString
*
)
o_time
;
-
(
void
)
setSeekable
:
(
BOOL
)
b_seekable
;
-
(
void
)
setVolumeLevel
:
(
float
)
f
_volumeLevel
;
-
(
void
)
setVolumeLevel
:
(
int
)
i
_volumeLevel
;
-
(
IBAction
)
play
:(
id
)
sender
;
-
(
IBAction
)
prev
:(
id
)
sender
;
-
(
IBAction
)
next
:(
id
)
sender
;
...
...
modules/gui/macosx/fspanel.m
View file @
2a1e9a20
...
...
@@ -31,6 +31,7 @@
#import "misc.h"
#import "fspanel.h"
#import "CompatibilityFixes.h"
#import <vlc_aout_intf.h>
@interface
VLCFSPanel
()
-
(
void
)
hideMouse
;
...
...
@@ -168,9 +169,9 @@
[[
self
contentView
]
setSeekable
:
b_seekable
];
}
-
(
void
)
setVolumeLevel
:
(
float
)
f
_volumeLevel
-
(
void
)
setVolumeLevel
:
(
int
)
i
_volumeLevel
{
[[
self
contentView
]
setVolumeLevel
:
f
_volumeLevel
];
[[
self
contentView
]
setVolumeLevel
:
i
_volumeLevel
];
}
-
(
void
)
setNonActive
:(
id
)
noData
...
...
@@ -490,8 +491,8 @@
s_rc
.
size
.
height
=
10
;
o_fs_volumeSlider
=
[[
VLCFSVolumeSlider
alloc
]
initWithFrame
:
s_rc
];
[
o_fs_volumeSlider
setMinValue
:
0
];
[
o_fs_volumeSlider
setMaxValue
:
32
];
[
o_fs_volumeSlider
set
FloatValue
:
0
];
[
o_fs_volumeSlider
setMaxValue
:
AOUT_VOLUME_MAX
];
[
o_fs_volumeSlider
set
IntValue
:
AOUT_VOLUME_DEFAULT
];
[
o_fs_volumeSlider
setContinuous
:
YES
];
[
o_fs_volumeSlider
setTarget
:
self
];
[
o_fs_volumeSlider
setAction
:
@selector
(
fsVolumeSliderUpdate
:)];
...
...
@@ -573,9 +574,9 @@
[
o_fs_timeSlider
setEnabled
:
b_seekable
];
}
-
(
void
)
setVolumeLevel
:
(
float
)
f
_volumeLevel
-
(
void
)
setVolumeLevel
:
(
int
)
i
_volumeLevel
{
[
o_fs_volumeSlider
set
FloatValue
:
f
_volumeLevel
];
[
o_fs_volumeSlider
set
IntValue
:
i
_volumeLevel
];
}
-
(
IBAction
)
play
:(
id
)
sender
...
...
modules/gui/macosx/simple_prefs.m
View file @
2a1e9a20
...
...
@@ -483,7 +483,7 @@ static inline char * __config_GetLabel( vlc_object_t *p_this, const char *psz_na
* audio settings *
******************/
[
self
setupButton
:
o_audio_enable_ckb
forBoolValue
:
"audio"
];
i
=
(
config_GetInt
(
p_intf
,
"volume"
)
*
0
.
390625
);
i
=
config_GetInt
(
p_intf
,
"volume"
);
[
o_audio_vol_fld
setToolTip
:
[
NSString
stringWithUTF8String
:
config_GetLabel
(
p_intf
,
"volume"
)]];
[
o_audio_vol_fld
setIntValue
:
i
];
[
o_audio_vol_sld
setToolTip
:
[
o_audio_vol_fld
toolTip
]];
...
...
@@ -829,7 +829,7 @@ static inline void save_module_list( intf_thread_t * p_intf, id object, const ch
if
(
b_audioSettingChanged
)
{
config_PutInt
(
p_intf
,
"audio"
,
[
o_audio_enable_ckb
state
]
);
config_PutInt
(
p_intf
,
"volume"
,
([
o_audio_vol_sld
intValue
]
*
2
.
56
)
);
config_PutInt
(
p_intf
,
"volume"
,
[
o_audio_vol_sld
intValue
]
);
config_PutInt
(
p_intf
,
"spdif"
,
[
o_audio_spdif_ckb
state
]
);
SaveIntList
(
o_audio_dolby_pop
,
"force-dolby-surround"
);
...
...
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