]> git.sesse.net Git - vlc/blob - src/lpcm_decoder/lpcm_decoder.c
754d21a9a953f719a0dbe2b979178e0a6fa1c693
[vlc] / src / lpcm_decoder / lpcm_decoder.c
1 /*****************************************************************************
2  * lpcm_decoder.c: core lpcm decoder
3  *****************************************************************************
4  * Copyright (C) 1999, 2000 VideoLAN
5  *
6  * Authors:
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  * 
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
21  *****************************************************************************/
22 #include <stdio.h>
23 #include "defs.h"
24
25 #include "config.h"
26 #include "common.h"
27 #include "threads.h"
28 #include "mtime.h"
29
30 #include "intf_msg.h"
31
32 //#include "int_types.h"
33 #include "lpcm_decoder.h"
34
35 int lpcm_init (lpcmdec_t * p_lpcmdec)
36 {
37     intf_DbgMsg( "LPCM Debug: lpmcm init called" );
38     return 0;
39 }
40
41 int lpcm_decode_frame (lpcmdec_t * p_lpcmdec, s16 * buffer)
42 {
43 /*
44  * XXX was part of ac3dec, is to change
45     
46     int i;
47
48     if (parse_bsi (p_ac3dec))
49         return 1;
50
51     for (i = 0; i < 6; i++) {
52         if (parse_audblk (p_ac3dec, i))
53             return 1;
54         if (exponent_unpack (p_ac3dec))
55             return 1;
56         bit_allocate (p_ac3dec);
57         mantissa_unpack (p_ac3dec);
58         if  (p_ac3dec->bsi.acmod == 0x2)
59             rematrix (p_ac3dec);
60         imdct (p_ac3dec);
61         downmix (p_ac3dec, buffer);
62
63         buffer += 2*256;
64     }
65
66     parse_auxdata (p_ac3dec);
67 */
68     
69     return 0;
70 }