Commit da65bd50 authored by Eric Petit's avatar Eric Petit

beos/* : - cleaned the way to mute/unmute

          - save the volume when exiting
parent 1decbca7
......@@ -2,7 +2,7 @@
* intf_beos.cpp: beos interface
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: Interface.cpp,v 1.14 2003/06/13 00:15:40 titer Exp $
* $Id: Interface.cpp,v 1.15 2003/06/22 00:40:18 titer Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -93,7 +93,6 @@ int E_(OpenIntf) ( vlc_object_t *p_this )
message.AddPointer("window", p_intf->p_sys->p_window);
be_app->PostMessage(&message);
}
p_intf->p_sys->i_saved_volume = AOUT_VOLUME_DEFAULT;
p_intf->p_sys->b_loop = 0;
p_intf->p_sys->b_mute = 0;
......
......@@ -2,7 +2,7 @@
* InterfaceWindow.cpp: beos interface
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: InterfaceWindow.cpp,v 1.41 2003/05/30 18:43:31 titer Exp $
* $Id: InterfaceWindow.cpp,v 1.42 2003/06/22 00:40:18 titer Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -1011,6 +1011,11 @@ InterfaceWindow::_RestoreSettings()
void
InterfaceWindow::_StoreSettings()
{
/* Save the volume */
config_PutInt( p_intf, "volume", p_mediaControl->GetVolume() );
config_SaveConfigFile( p_intf, "main" );
/* Save the windows positions */
if ( fSettings->ReplaceRect( "main frame", Frame() ) != B_OK )
fSettings->AddRect( "main frame", Frame() );
if ( fPlaylistWindow->Lock() )
......
......@@ -2,7 +2,7 @@
* MediaControlView.cpp: beos interface
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: MediaControlView.cpp,v 1.18 2003/05/30 17:30:54 titer Exp $
* $Id: MediaControlView.cpp,v 1.19 2003/06/22 00:40:18 titer Exp $
*
* Authors: Tony Castley <tony@castley.net>
* Stephan Aßmus <stippi@yellowbites.com>
......@@ -172,7 +172,7 @@ MediaControlView::MediaControlView(BRect frame, intf_thread_t *p_interface)
kVolumeSliderBitmapHeight - 1.0),
"volume slider", 1, AOUT_VOLUME_MAX,
new BMessage(VOLUME_CHG));
fVolumeSlider->SetValue(AOUT_VOLUME_DEFAULT);
fVolumeSlider->SetValue( config_GetInt( p_intf, "volume" ) );
AddChild( fVolumeSlider );
// Position Info View
......
......@@ -2,7 +2,7 @@
* VlcWrapper.cpp: BeOS plugin for vlc (derived from MacOS X port)
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: VlcWrapper.cpp,v 1.34 2003/06/08 16:04:30 titer Exp $
* $Id: VlcWrapper.cpp,v 1.35 2003/06/22 00:40:18 titer Exp $
*
* Authors: Florian G. Pflug <fgp@phlo.org>
* Jon Lech Johansen <jon-vl@nanocrew.net>
......@@ -749,14 +749,14 @@ void VlcWrapper::SetVolume( int value )
void VlcWrapper::VolumeMute()
{
aout_VolumeGet( p_intf, &p_intf->p_sys->i_saved_volume );
aout_VolumeMute( p_intf, NULL );
p_intf->p_sys->b_mute = 1;
}
void VlcWrapper::VolumeRestore()
{
aout_VolumeSet( p_intf, p_intf->p_sys->i_saved_volume );
audio_volume_t dummy;
aout_VolumeMute( p_intf, &dummy );
p_intf->p_sys->b_mute = 0;
}
......
......@@ -2,7 +2,7 @@
* VlcWrapper.h: BeOS plugin for vlc (derived from MacOS X port)
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: VlcWrapper.h,v 1.25 2003/05/30 18:43:31 titer Exp $
* $Id: VlcWrapper.h,v 1.26 2003/06/22 00:40:18 titer Exp $
*
* Authors: Florian G. Pflug <fgp@phlo.org>
* Jon Lech Johansen <jon-vl@nanocrew.net>
......@@ -44,7 +44,6 @@ struct intf_sys_t
vlc_bool_t b_loop;
vlc_bool_t b_mute;
int i_part;
audio_volume_t i_saved_volume;
int i_channel;
VlcWrapper * p_wrapper;
......
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