]> git.sesse.net Git - vlc/blobdiff - modules/misc/dummy/aout.c
Typo
[vlc] / modules / misc / dummy / aout.c
index d8f12abe0880f73926b0ea3db7b72a801563fe94..e988e1928e4d75e3113fbe87d293bd448d3aa9bd 100644 (file)
@@ -1,5 +1,5 @@
 /*****************************************************************************
- * aout_dummy.c : dummy audio output plugin
+ * aout.c : dummy audio output plugin
  *****************************************************************************
  * Copyright (C) 2002 the VideoLAN team
  * $Id$
@@ -10,7 +10,7 @@
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include <string.h>
-#include <stdlib.h>
 
-#include <vlc/vlc.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <vlc_common.h>
 #include <vlc_aout.h>
 
+#include "dummy.h"
+
 #define FRAME_SIZE 2048
 #define A52_FRAME_NB 1536
 
@@ -41,14 +45,14 @@ static void    Play        ( aout_instance_t * );
 /*****************************************************************************
  * OpenAudio: open a dummy audio device
  *****************************************************************************/
-int E_(OpenAudio) ( vlc_object_t * p_this )
+int OpenAudio ( vlc_object_t * p_this )
 {
     aout_instance_t * p_aout = (aout_instance_t *)p_this;
 
     p_aout->output.pf_play = Play;
     aout_VolumeSoftInit( p_aout );
 
-    if ( p_aout->output.output.i_format == VLC_FOURCC('s','p','d','i') )
+    if ( p_aout->output.output.i_format == VLC_CODEC_SPDIFL )
     {
         p_aout->output.i_nb_samples = A52_FRAME_NB;
         p_aout->output.output.i_bytes_per_frame = AOUT_SPDIF_SIZE;
@@ -58,7 +62,11 @@ int E_(OpenAudio) ( vlc_object_t * p_this )
     {
         p_aout->output.i_nb_samples = FRAME_SIZE;
     }
-    return 0;
+
+    /* Create the variable for the audio-device */
+    var_Create( p_aout, "audio-device", VLC_VAR_INTEGER | VLC_VAR_HASCHOICE );
+
+    return VLC_SUCCESS;
 }
 
 /*****************************************************************************