aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/General/hal/CMakeLists.txt
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2011-04-10 20:50:28 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2011-04-10 20:50:28 +0000
commitd797b6af7c3d86cffd26ff8a1d4844dc5cc730b5 (patch)
treee9609cb08d6953c18be48bb3d7592c36c7ae5e8b /src/plugins/General/hal/CMakeLists.txt
parentde2cf5e954ce3a1166deede76a539446f85a9e08 (diff)
downloadqmmp-d797b6af7c3d86cffd26ff8a1d4844dc5cc730b5.tar.gz
qmmp-d797b6af7c3d86cffd26ff8a1d4844dc5cc730b5.tar.bz2
qmmp-d797b6af7c3d86cffd26ff8a1d4844dc5cc730b5.zip
fixed regression, fixed signals synchronization (Fixes issue 447), fixed
mplayer engine bugs git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@2152 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General/hal/CMakeLists.txt')
0 files changed, 0 insertions, 0 deletions
user02@90c681e8-e032-0410-971d-27865f9a5e38> 2008-10-25 20:58:48 +0000 committer trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> 2008-10-25 20:58:48 +0000 aac plugin' href='/qmmp/commit/src/plugins/Input/aac/decoder_aac.cpp?h=main&id=bed87bc89a1258d3b3dc429f3df114c8c2655a6a'>bed87bc89
bed87bc89






bed87bc89

bed87bc89
7ec5b791c
bed87bc89

bed87bc89

7ec5b791c

bed87bc89



11b7655bb
bed87bc89


bed87bc89





304dc519d
11b7655bb
bed87bc89

304dc519d



11b7655bb
304dc519d
0b46e2db0
304dc519d
bed87bc89













304dc519d
bed87bc89
304dc519d



bed87bc89
304dc519d







bed87bc89
7ec5b791c

41342d544
7ec5b791c




304dc519d



11b7655bb
304dc519d
7ec5b791c
304dc519d

11b7655bb
304dc519d

bed87bc89

435f1da1d
bed87bc89
013ee07b5
bed87bc89

6dc1e536f
bed87bc89


7ec5b791c
11b7655bb
bed87bc89














7ec5b791c

311224cda




bed87bc89



0b46e2db0
bed87bc89
bed87bc89


7ec5b791c
bed87bc89
7ec5b791c
bed87bc89

6dc1e536f
bed87bc89
7ec5b791c


bed87bc89
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
                                                                            
                                                                            






















                                                                             










                            

                                    
 
                  
                    







                         






                                           

                              
                    
                  

 

                             

                    



                                                              
                     


                                                





                                                
                                                                            
                         

         



                                                     
                     
     
                                           
                                   













                                                           
 
                                                                     



                                       
     







                                                                                                      
     

                        
                     




                                                                                                    



                                                      
                     
     
                       

                                                         
                     

     

                                                              
                                           
                                            
                

 
                                                    


                                   
                  
                     














                                                                                                            

                                                                   




                                                                                



                
                              
 


                       
                         
 
                     

 
                                 
 


                                                       
 
/***************************************************************************
 *   Copyright (C) 2006-2009 by Ilya Kotov                                 *
 *   forkotov02@hotmail.ru                                                 *
 *                                                                         *
 *   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     *
 *   (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.                          *
 *                                                                         *
 *   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-1307, USA.             *
 ***************************************************************************/


#include <QObject>
#include <QIODevice>
#include <QtGlobal>

#include <qmmp/buffer.h>
#include <qmmp/output.h>
#include <qmmp/recycler.h>

#include "decoder_aac.h"
#include "aacfile.h"

#define AAC_BUFFER_SIZE 4096

// Decoder class

DecoderAAC::DecoderAAC(QIODevice *i)
        : Decoder(i)
{
    m_bitrate = 0;
    m_totalTime = 0;
    m_data = 0;
    m_input_buf = 0;
    m_input_at = 0;
}


DecoderAAC::~DecoderAAC()
{
    if (data())
    {
        if (data()->handle)
            NeAACDecClose (data()->handle);
        delete data();
        m_data = 0;
    }
    if (m_input_buf)
        delete [] m_input_buf;
    m_input_buf = 0;
    m_bitrate = 0;
}

bool DecoderAAC::initialize()
{
    m_bitrate = 0;
    m_totalTime = 0;

    if (!input())
    {
        qWarning("DecoderAAC: cannot initialize.  No input.");
        return false;
    }
    if (!m_input_buf)
        m_input_buf = new char[AAC_BUFFER_SIZE];
    m_input_at = 0;

    if (!input()->isOpen())
    {
        if (!input()->open(QIODevice::ReadOnly))
        {
            qWarning("DecoderAAC: %s", qPrintable(input()->errorString ()));
            return false;
        }
    }
    AACFile aac_file(input());
    if (!aac_file.isValid())
    {
        qWarning("DecoderAAC: unsupported AAC file");
        return false;
    }
    m_totalTime = aac_file.length() * 1000;
    m_bitrate = aac_file.bitrate();

    if (!m_data)
        m_data = new aac_data;

    data()->handle = NeAACDecOpen();

    NeAACDecConfigurationPtr conf;
    conf = NeAACDecGetCurrentConfiguration(data()->handle);
    conf->downMatrix = 1;
    conf->defSampleRate = 44100;
    conf->dontUpSampleImplicitSBR = 0;
    conf->defObjectType = LC;
    conf->outputFormat = FAAD_FMT_16BIT;
    NeAACDecSetConfiguration(data()->handle, conf);

    m_input_at = input()->read((char *)m_input_buf, AAC_BUFFER_SIZE);

    //skip id3 tag
    int tag_size = 0;
    if (!memcmp(m_input_buf, "ID3", 3))
    {
        /* high bit is not used */
        tag_size = (m_input_buf[6] << 21) | (m_input_buf[7] << 14) |