]> git.sesse.net Git - vlc/blobdiff - modules/demux/voc.c
Removes trailing spaces. Removes tabs.
[vlc] / modules / demux / voc.c
index 8ffd7b36102932ea6fca714c0dfbf86fd505a0b2..af211f0a737ce09df9806205157b7e3f86092b5f 100644 (file)
@@ -1,10 +1,10 @@
 /*****************************************************************************
  * voc.c : Creative Voice File (.VOC) demux module for vlc
  *****************************************************************************
- * Copyright (C) 2005 the VideoLAN team
+ * Copyright (C) 2005 Rémi Denis-Courmont
  * $Id$
  *
- * Authors: Remi Denis-Courmont <rem # videolan.org>
+ * Authors: Rémi Denis-Courmont <rem # 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
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include <stdlib.h>                                      /* malloc(), free() */
 
 #include <vlc/vlc.h>
-#include <vlc/input.h>
-#include <vlc/aout.h>
+#include <vlc_demux.h>
+#include <vlc_aout.h>
 
-#include <codecs.h>
+#include <vlc_codecs.h>
 
 /*****************************************************************************
  * Module descriptor
@@ -76,7 +75,7 @@ static int Open( vlc_object_t * p_this )
 {
     demux_t     *p_demux = (demux_t*)p_this;
     demux_sys_t *p_sys;
-    uint8_t     *p_buf;
+    const uint8_t *p_buf;
     uint16_t    i_data_offset, i_version;
 
     if( stream_Peek( p_demux->s, &p_buf, 26 ) < 26 )
@@ -156,7 +155,6 @@ static unsigned int fix_voc_sr( unsigned int sr )
     }
     return sr;
 }
-        
 
 static int ReadBlockHeader( demux_t *p_demux )
 {
@@ -189,7 +187,7 @@ static int ReadBlockHeader( demux_t *p_demux )
 
             if( buf[1] )
             {
-                msg_Err( p_demux, "Unsupported compression" );
+                msg_Err( p_demux, "unsupported compression" );
                 return VLC_EGENERIC;
             }
 
@@ -251,8 +249,8 @@ static int ReadBlockHeader( demux_t *p_demux )
             }
             break;
 
-        case 8: 
-            /* 
+        case 8:
+            /*
              * Block 8 is a big kludge to add stereo support to block 1 :
              * A block of type 8 is always followed by a block of type 1
              * and specifies the number of channels in that 1-block
@@ -265,7 +263,7 @@ static int ReadBlockHeader( demux_t *p_demux )
 
             if( buf[2] )
             {
-                msg_Err( p_demux, "Unsupported compression" );
+                msg_Err( p_demux, "unsupported compression" );
                 return VLC_EGENERIC;
             }
 
@@ -282,7 +280,7 @@ static int ReadBlockHeader( demux_t *p_demux )
             /* read subsequent block 1 */
             if( stream_Read( p_demux->s, buf, 4 ) < 4 )
                 return VLC_EGENERIC; /* EOF */
-        
             i_block_size = GetDWLE( buf ) >> 8;
             msg_Dbg( p_demux, "new block: type: %u, size: %u",
                     (unsigned)*buf, i_block_size );
@@ -295,7 +293,7 @@ static int ReadBlockHeader( demux_t *p_demux )
 
             if( buf[1] )
             {
-                msg_Err( p_demux, "Unsupported compression" );
+                msg_Err( p_demux, "unsupported compression" );
                 return VLC_EGENERIC;
             }
 
@@ -328,7 +326,7 @@ static int ReadBlockHeader( demux_t *p_demux )
                             break;
 
                         default:
-                            msg_Err( p_demux, "Unsupported bit res.: %u bits",
+                            msg_Err( p_demux, "unsupported bit res.: %u bits",
                                      new_fmt.audio.i_bitspersample );
                             return VLC_EGENERIC;
                     }
@@ -346,14 +344,14 @@ static int ReadBlockHeader( demux_t *p_demux )
                             break;
 
                         default:
-                            msg_Err( p_demux, "Unsupported bit res.: %u bits",
+                            msg_Err( p_demux, "unsupported bit res.: %u bits",
                                      new_fmt.audio.i_bitspersample );
                             return VLC_EGENERIC;
                     }
                     break;
 
-                default: 
-                    msg_Err( p_demux, "Unsupported compression" );
+                default:
+                    msg_Err( p_demux, "unsupported compression" );
                     return VLC_EGENERIC;
             }
 
@@ -366,7 +364,7 @@ static int ReadBlockHeader( demux_t *p_demux )
             break;
 
         default:
-            msg_Dbg( p_demux, "Unknown block type %u - skipping block",
+            msg_Dbg( p_demux, "unknown block type %u - skipping block",
                      (unsigned)*buf);
         case 4: /* blocks of non-audio types can be skipped */
         case 5: