]> git.sesse.net Git - vlc/blobdiff - modules/codec/adpcm.c
Fix Duck DK3/DK4 ADPCM mappings
[vlc] / modules / codec / adpcm.c
index e34fe15408d4f5534c10ccaea3fe8adef5214950..f3bfffd66ebce2dd4ce747cc0a79703a5f4b6dbe 100644 (file)
@@ -1,25 +1,25 @@
 /*****************************************************************************
  * adpcm.c : adpcm variant audio decoder
  *****************************************************************************
- * Copyright (C) 2001, 2002 the VideoLAN team
+ * Copyright (C) 2001, 2002 VLC authors and VideoLAN
  * $Id$
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *          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
- * the Free Software Foundation; either version 2 of the License, or
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 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
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
  *
- * 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 /*****************************************************************************
@@ -41,7 +41,7 @@
 static int  OpenDecoder( vlc_object_t * );
 static void CloseDecoder( vlc_object_t * );
 
-static aout_buffer_t *DecodeBlock( decoder_t *, block_t ** );
+static block_t *DecodeBlock( decoder_t *, block_t ** );
 
 vlc_module_begin ()
     set_description( N_("ADPCM audio decoder") )
@@ -141,8 +141,8 @@ static int OpenDecoder( vlc_object_t *p_this )
         case VLC_FOURCC('i','m','a', '4'): /* IMA ADPCM */
         case VLC_FOURCC('m','s',0x00,0x02): /* MS ADPCM */
         case VLC_FOURCC('m','s',0x00,0x11): /* IMA ADPCM */
-        case VLC_FOURCC('m','s',0x00,0x61): /* Duck DK4 ADPCM */
-        case VLC_FOURCC('m','s',0x00,0x62): /* Duck DK3 ADPCM */
+        case VLC_CODEC_ADPCM_DK3:
+        case VLC_CODEC_ADPCM_DK4:
         case VLC_FOURCC('X','A','J', 0): /* EA ADPCM */
             break;
         default:
@@ -179,10 +179,10 @@ static int OpenDecoder( vlc_object_t *p_this )
         case VLC_CODEC_ADPCM_MS: /* MS ADPCM */
             p_sys->codec = ADPCM_MS;
             break;
-        case VLC_FOURCC('m','s',0x00,0x61): /* Duck DK4 ADPCM */
+        case VLC_CODEC_ADPCM_DK4: /* Duck DK4 ADPCM */
             p_sys->codec = ADPCM_DK4;
             break;
-        case VLC_FOURCC('m','s',0x00,0x62): /* Duck DK3 ADPCM */
+        case VLC_CODEC_ADPCM_DK3: /* Duck DK3 ADPCM */
             p_sys->codec = ADPCM_DK3;
             break;
         case VLC_FOURCC('X','A','J', 0): /* EA ADPCM */
@@ -264,7 +264,7 @@ static int OpenDecoder( vlc_object_t *p_this )
 /*****************************************************************************
  * DecodeBlock:
  *****************************************************************************/
-static aout_buffer_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
+static block_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
 {
     decoder_sys_t *p_sys  = p_dec->p_sys;
     block_t *p_block;
@@ -290,7 +290,7 @@ static aout_buffer_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
 
     if( p_block->i_buffer >= p_sys->i_block )
     {
-        aout_buffer_t *p_out;
+        block_t *p_out;
 
         p_out = decoder_NewAudioBuffer( p_dec, p_sys->i_samplesperblock );
         if( p_out == NULL )