Commit 63c9e90d authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont
Browse files

LUA: set volume on playlist

parent 00f8067d
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
*****************************************************************************/ *****************************************************************************/
static int vlclua_volume_set( lua_State *L ) static int vlclua_volume_set( lua_State *L )
{ {
vlc_object_t *p_this = vlclua_get_this( L ); playlist_t *p_this = vlclua_get_playlist_internal( L );
int i_volume = luaL_checkint( L, 1 ); int i_volume = luaL_checkint( L, 1 );
/* Do we need to check that i_volume is in the AOUT_VOLUME_MIN->MAX range?*/ /* Do we need to check that i_volume is in the AOUT_VOLUME_MIN->MAX range?*/
return vlclua_push_ret( L, aout_VolumeSet( p_this, i_volume ) ); return vlclua_push_ret( L, aout_VolumeSet( p_this, i_volume ) );
...@@ -59,7 +59,7 @@ static int vlclua_volume_set( lua_State *L ) ...@@ -59,7 +59,7 @@ static int vlclua_volume_set( lua_State *L )
static int vlclua_volume_get( lua_State *L ) static int vlclua_volume_get( lua_State *L )
{ {
vlc_object_t *p_this = vlclua_get_this( L ); playlist_t *p_this = vlclua_get_playlist_internal( L );
audio_volume_t i_volume; audio_volume_t i_volume;
if( aout_VolumeGet( p_this, &i_volume ) == VLC_SUCCESS ) if( aout_VolumeGet( p_this, &i_volume ) == VLC_SUCCESS )
lua_pushnumber( L, i_volume ); lua_pushnumber( L, i_volume );
...@@ -71,7 +71,7 @@ static int vlclua_volume_get( lua_State *L ) ...@@ -71,7 +71,7 @@ static int vlclua_volume_get( lua_State *L )
static int vlclua_volume_up( lua_State *L ) static int vlclua_volume_up( lua_State *L )
{ {
audio_volume_t i_volume; audio_volume_t i_volume;
aout_VolumeUp( vlclua_get_this( L ), aout_VolumeUp( vlclua_get_playlist_internal( L );
luaL_optint( L, 1, 1 ), luaL_optint( L, 1, 1 ),
&i_volume ); &i_volume );
lua_pushnumber( L, i_volume ); lua_pushnumber( L, i_volume );
...@@ -81,7 +81,7 @@ static int vlclua_volume_up( lua_State *L ) ...@@ -81,7 +81,7 @@ static int vlclua_volume_up( lua_State *L )
static int vlclua_volume_down( lua_State *L ) static int vlclua_volume_down( lua_State *L )
{ {
audio_volume_t i_volume; audio_volume_t i_volume;
aout_VolumeDown( vlclua_get_this( L ), aout_VolumeDown( vlclua_get_playlist_internal( L ),
luaL_optint( L, 1, 1 ), luaL_optint( L, 1, 1 ),
&i_volume ); &i_volume );
lua_pushnumber( L, i_volume ); lua_pushnumber( L, i_volume );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment