]> git.sesse.net Git - vlc/commitdiff
* AudioOutput.cpp: added sanity tests;
authorEric Petit <titer@videolan.org>
Mon, 9 Dec 2002 13:37:38 +0000 (13:37 +0000)
committerEric Petit <titer@videolan.org>
Mon, 9 Dec 2002 13:37:38 +0000 (13:37 +0000)
 * VlcWrapper.h, Interface.cpp: removed an unused variable.

modules/gui/beos/AudioOutput.cpp
modules/gui/beos/Interface.cpp
modules/gui/beos/VlcWrapper.h

index 5606d6508235edd116428f0fb38a121a1bbe0de7..eface39172196af0199d0e558be4f0de1aefe08d 100644 (file)
@@ -2,7 +2,7 @@
  * AudioOutput.cpp: BeOS audio output
  *****************************************************************************
  * Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: AudioOutput.cpp,v 1.19 2002/12/09 07:57:04 titer Exp $
+ * $Id: AudioOutput.cpp,v 1.20 2002/12/09 13:37:38 titer Exp $
  *
  * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -66,6 +66,11 @@ int E_(OpenAudio) ( vlc_object_t * p_this )
     int i_nb_channels;
     aout_instance_t *p_aout = (aout_instance_t*) p_this;
     p_aout->output.p_sys = (aout_sys_t *) malloc( sizeof( aout_sys_t ) );
+    if( p_aout->output.p_sys == NULL )
+    {
+        msg_Err( p_aout, "Not enough memory" );
+        return -1;
+    }
 
     aout_sys_t *p_sys = p_aout->output.p_sys;
 
@@ -101,6 +106,14 @@ int E_(OpenAudio) ( vlc_object_t * p_this )
     
     p_sys->p_player = new BSoundPlayer( p_format, "player",
                                         Play, NULL, p_aout );
+    if( p_sys->p_player->InitCheck() != B_OK )
+    {
+        msg_Err( p_aout, "BSoundPlayer InitCheck failed" );
+        delete p_sys->p_player;
+        free( p_sys );
+        return -1;
+    }
+    
     p_sys->p_player->Start();
     p_sys->p_player->SetHasData( true );
         
index b5247fa1d0a355480f5fed740bd860a790fe26c4..90bce24cf33370b4dfd85646c3fef8bea2e35438 100644 (file)
@@ -2,13 +2,14 @@
  * intf_beos.cpp: beos interface
  *****************************************************************************
  * Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: Interface.cpp,v 1.6 2002/11/27 05:36:41 titer Exp $
+ * $Id: Interface.cpp,v 1.7 2002/12/09 13:37:38 titer Exp $
  *
  * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
  *          Tony Castley <tony@castley.net>
  *          Richard Shepherd <richard@rshepherd.demon.co.uk>
  *          Stephan Aßmus <stippi@yellowbites.com>
+ *          Eric Petit <titer@videolan.org>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -90,7 +91,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->b_disabled_menus = 0;
     p_intf->p_sys->i_saved_volume = AOUT_VOLUME_DEFAULT;
     p_intf->p_sys->b_loop = 0;
     p_intf->p_sys->b_mute = 0;
index 508186537cb57f5e10f0006bbb59fc8286d166ef..4f2f1ce414a82f62c39e3bcb1d0d7c98cdc38821 100644 (file)
@@ -2,7 +2,7 @@
  * VlcWrapper.h: BeOS plugin for vlc (derived from MacOS X port)
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: VlcWrapper.h,v 1.9 2002/12/09 07:57:04 titer Exp $
+ * $Id: VlcWrapper.h,v 1.10 2002/12/09 13:37:38 titer Exp $
  *
  * Authors: Florian G. Pflug <fgp@phlo.org>
  *          Jon Lech Johansen <jon-vl@nanocrew.net>
@@ -37,7 +37,6 @@ struct intf_sys_t
 {
     InterfaceWindow * p_window;
     
-    vlc_bool_t        b_disabled_menus;
     vlc_bool_t        b_loop;
     vlc_bool_t        b_mute;
     int                      i_part;