- save the volume when exiting
* intf_beos.cpp: beos interface
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* 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>
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
message.AddPointer("window", p_intf->p_sys->p_window);
be_app->PostMessage(&message);
}
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;
p_intf->p_sys->b_loop = 0;
p_intf->p_sys->b_mute = 0;
* InterfaceWindow.cpp: beos interface
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* 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>
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
void
InterfaceWindow::_StoreSettings()
{
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() )
if ( fSettings->ReplaceRect( "main frame", Frame() ) != B_OK )
fSettings->AddRect( "main frame", Frame() );
if ( fPlaylistWindow->Lock() )
* MediaControlView.cpp: beos interface
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
* 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>
*
* Authors: Tony Castley <tony@castley.net>
* Stephan Aßmus <stippi@yellowbites.com>
kVolumeSliderBitmapHeight - 1.0),
"volume slider", 1, AOUT_VOLUME_MAX,
new BMessage(VOLUME_CHG));
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
AddChild( fVolumeSlider );
// Position Info View
* VlcWrapper.cpp: BeOS plugin for vlc (derived from MacOS X port)
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* 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>
*
* Authors: Florian G. Pflug <fgp@phlo.org>
* Jon Lech Johansen <jon-vl@nanocrew.net>
void VlcWrapper::VolumeMute()
{
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_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;
}
p_intf->p_sys->b_mute = 0;
}
* VlcWrapper.h: BeOS plugin for vlc (derived from MacOS X port)
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* 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>
*
* Authors: Florian G. Pflug <fgp@phlo.org>
* Jon Lech Johansen <jon-vl@nanocrew.net>
vlc_bool_t b_loop;
vlc_bool_t b_mute;
int i_part;
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;
int i_channel;
VlcWrapper * p_wrapper;