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
9778203f
Commit
9778203f
authored
Jul 21, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playlist: convert "volume" to float
...and simplify accordingly.
parent
96dfe793
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
20 deletions
+13
-20
lib/media_player.c
lib/media_player.c
+1
-1
modules/control/rc.c
modules/control/rc.c
+2
-1
modules/gui/qt4/input_manager.cpp
modules/gui/qt4/input_manager.cpp
+3
-3
modules/gui/qt4/input_manager.hpp
modules/gui/qt4/input_manager.hpp
+2
-2
src/audio_output/common.c
src/audio_output/common.c
+3
-12
src/playlist/engine.c
src/playlist/engine.c
+2
-1
No files found.
lib/media_player.c
View file @
9778203f
...
@@ -465,7 +465,7 @@ libvlc_media_player_new( libvlc_instance_t *instance )
...
@@ -465,7 +465,7 @@ libvlc_media_player_new( libvlc_instance_t *instance )
/* Audio */
/* Audio */
var_Create
(
mp
,
"aout"
,
VLC_VAR_STRING
|
VLC_VAR_DOINHERIT
);
var_Create
(
mp
,
"aout"
,
VLC_VAR_STRING
|
VLC_VAR_DOINHERIT
);
var_Create
(
mp
,
"mute"
,
VLC_VAR_BOOL
);
var_Create
(
mp
,
"mute"
,
VLC_VAR_BOOL
);
var_Create
(
mp
,
"volume"
,
VLC_VAR_
INTEGER
);
var_Create
(
mp
,
"volume"
,
VLC_VAR_
FLOAT
);
var_Create
(
mp
,
"find-input-callback"
,
VLC_VAR_ADDRESS
);
var_Create
(
mp
,
"find-input-callback"
,
VLC_VAR_ADDRESS
);
var_SetAddress
(
mp
,
"find-input-callback"
,
find_input
);
var_SetAddress
(
mp
,
"find-input-callback"
,
find_input
);
var_Create
(
mp
,
"amem-data"
,
VLC_VAR_ADDRESS
);
var_Create
(
mp
,
"amem-data"
,
VLC_VAR_ADDRESS
);
...
...
modules/control/rc.c
View file @
9778203f
...
@@ -902,7 +902,8 @@ static int VolumeChanged( vlc_object_t *p_this, char const *psz_cmd,
...
@@ -902,7 +902,8 @@ static int VolumeChanged( vlc_object_t *p_this, char const *psz_cmd,
intf_thread_t
*
p_intf
=
(
intf_thread_t
*
)
p_data
;
intf_thread_t
*
p_intf
=
(
intf_thread_t
*
)
p_data
;
vlc_mutex_lock
(
&
p_intf
->
p_sys
->
status_lock
);
vlc_mutex_lock
(
&
p_intf
->
p_sys
->
status_lock
);
msg_rc
(
STATUS_CHANGE
"( audio volume: %"
PRId64
" )"
,
newval
.
i_int
);
msg_rc
(
STATUS_CHANGE
"( audio volume: %ld )"
,
lroundf
(
newval
.
f_float
*
AOUT_VOLUME_DEFAULT
)
);
vlc_mutex_unlock
(
&
p_intf
->
p_sys
->
status_lock
);
vlc_mutex_unlock
(
&
p_intf
->
p_sys
->
status_lock
);
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
...
...
modules/gui/qt4/input_manager.cpp
View file @
9778203f
...
@@ -958,7 +958,7 @@ MainInputManager::MainInputManager( intf_thread_t *_p_intf )
...
@@ -958,7 +958,7 @@ MainInputManager::MainInputManager( intf_thread_t *_p_intf )
repeat
.
addCallback
(
this
,
SLOT
(
notifyRepeatLoop
(
bool
))
);
repeat
.
addCallback
(
this
,
SLOT
(
notifyRepeatLoop
(
bool
))
);
loop
.
addCallback
(
this
,
SLOT
(
notifyRepeatLoop
(
bool
))
);
loop
.
addCallback
(
this
,
SLOT
(
notifyRepeatLoop
(
bool
))
);
volume
.
addCallback
(
this
,
SLOT
(
notifyVolume
(
qlonglong
))
);
volume
.
addCallback
(
this
,
SLOT
(
notifyVolume
(
float
))
);
mute
.
addCallback
(
this
,
SLOT
(
notifyMute
(
bool
))
);
mute
.
addCallback
(
this
,
SLOT
(
notifyMute
(
bool
))
);
/* Warn our embedded IM about input changes */
/* Warn our embedded IM about input changes */
...
@@ -1217,9 +1217,9 @@ static int LeafToParent( vlc_object_t *p_this, const char *psz_var,
...
@@ -1217,9 +1217,9 @@ static int LeafToParent( vlc_object_t *p_this, const char *psz_var,
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
void
MainInputManager
::
notifyVolume
(
qlonglong
volume
)
void
MainInputManager
::
notifyVolume
(
float
volume
)
{
{
emit
volumeChanged
(
volume
/
(
float
)
AOUT_VOLUME_DEFAULT
);
emit
volumeChanged
(
volume
);
}
}
void
MainInputManager
::
notifyMute
(
bool
mute
)
void
MainInputManager
::
notifyMute
(
bool
mute
)
...
...
modules/gui/qt4/input_manager.hpp
View file @
9778203f
...
@@ -274,7 +274,7 @@ private:
...
@@ -274,7 +274,7 @@ private:
input_thread_t
*
p_input
;
input_thread_t
*
p_input
;
intf_thread_t
*
p_intf
;
intf_thread_t
*
p_intf
;
QVLCBool
random
,
repeat
,
loop
;
QVLCBool
random
,
repeat
,
loop
;
QVLC
Integer
volume
;
QVLC
Float
volume
;
QVLCBool
mute
;
QVLCBool
mute
;
public
slots
:
public
slots
:
...
@@ -292,7 +292,7 @@ public slots:
...
@@ -292,7 +292,7 @@ public slots:
private
slots
:
private
slots
:
void
notifyRandom
(
bool
);
void
notifyRandom
(
bool
);
void
notifyRepeatLoop
(
bool
);
void
notifyRepeatLoop
(
bool
);
void
notifyVolume
(
qlonglong
);
void
notifyVolume
(
float
);
void
notifyMute
(
bool
);
void
notifyMute
(
bool
);
signals:
signals:
void
inputChanged
(
input_thread_t
*
);
void
inputChanged
(
input_thread_t
*
);
...
...
src/audio_output/common.c
View file @
9778203f
...
@@ -55,16 +55,6 @@ static int var_Copy (vlc_object_t *src, const char *name, vlc_value_t prev,
...
@@ -55,16 +55,6 @@ static int var_Copy (vlc_object_t *src, const char *name, vlc_value_t prev,
return
var_Set
(
dst
,
name
,
value
);
return
var_Set
(
dst
,
name
,
value
);
}
}
static
int
var_CopyVolume
(
vlc_object_t
*
src
,
const
char
*
name
,
vlc_value_t
prev
,
vlc_value_t
value
,
void
*
data
)
{
vlc_object_t
*
dst
=
data
;
long
volume
=
lroundf
(
value
.
f_float
*
(
float
)
AOUT_VOLUME_DEFAULT
);
(
void
)
src
;
(
void
)
prev
;
return
var_SetInteger
(
dst
,
name
,
volume
);
}
#undef aout_New
#undef aout_New
/*****************************************************************************
/*****************************************************************************
* aout_New: initialize aout structure
* aout_New: initialize aout structure
...
@@ -95,7 +85,7 @@ audio_output_t *aout_New( vlc_object_t * p_parent )
...
@@ -95,7 +85,7 @@ audio_output_t *aout_New( vlc_object_t * p_parent )
char
*
str
;
char
*
str
;
var_Create
(
aout
,
"volume"
,
VLC_VAR_FLOAT
);
var_Create
(
aout
,
"volume"
,
VLC_VAR_FLOAT
);
var_AddCallback
(
aout
,
"volume"
,
var_Copy
Volume
,
p_parent
);
var_AddCallback
(
aout
,
"volume"
,
var_Copy
,
p_parent
);
var_Create
(
aout
,
"mute"
,
VLC_VAR_BOOL
|
VLC_VAR_DOINHERIT
);
var_Create
(
aout
,
"mute"
,
VLC_VAR_BOOL
|
VLC_VAR_DOINHERIT
);
var_AddCallback
(
aout
,
"mute"
,
var_Copy
,
p_parent
);
var_AddCallback
(
aout
,
"mute"
,
var_Copy
,
p_parent
);
...
@@ -206,7 +196,8 @@ void aout_Destroy (audio_output_t *aout)
...
@@ -206,7 +196,8 @@ void aout_Destroy (audio_output_t *aout)
aout_Shutdown
(
aout
);
aout_Shutdown
(
aout
);
var_DelCallback
(
aout
,
"mute"
,
var_Copy
,
aout
->
p_parent
);
var_DelCallback
(
aout
,
"mute"
,
var_Copy
,
aout
->
p_parent
);
var_DelCallback
(
aout
,
"volume"
,
var_CopyVolume
,
aout
->
p_parent
);
var_SetFloat
(
aout
,
"volume"
,
-
1
.
f
);
var_DelCallback
(
aout
,
"volume"
,
var_Copy
,
aout
->
p_parent
);
vlc_object_release
(
aout
);
vlc_object_release
(
aout
);
}
}
...
...
src/playlist/engine.c
View file @
9778203f
...
@@ -437,7 +437,8 @@ static void VariablesInit( playlist_t *p_playlist )
...
@@ -437,7 +437,8 @@ static void VariablesInit( playlist_t *p_playlist )
/* Audio output parameters */
/* Audio output parameters */
var_Create
(
p_playlist
,
"mute"
,
VLC_VAR_BOOL
);
var_Create
(
p_playlist
,
"mute"
,
VLC_VAR_BOOL
);
var_Create
(
p_playlist
,
"volume"
,
VLC_VAR_INTEGER
);
var_Create
(
p_playlist
,
"volume"
,
VLC_VAR_FLOAT
);
var_SetFloat
(
p_playlist
,
"volume"
,
-
1
.
f
);
/* FIXME: horrible hack for audio output interface code */
/* FIXME: horrible hack for audio output interface code */
var_Create
(
p_playlist
,
"find-input-callback"
,
VLC_VAR_ADDRESS
);
var_Create
(
p_playlist
,
"find-input-callback"
,
VLC_VAR_ADDRESS
);
var_SetAddress
(
p_playlist
,
"find-input-callback"
,
playlist_FindInput
);
var_SetAddress
(
p_playlist
,
"find-input-callback"
,
playlist_FindInput
);
...
...
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