aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/CommandLineOptions/PlayListOption/translations/playlist_plugin_lt.ts
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2012-01-27 12:37:35 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2012-01-27 12:37:35 +0000
commitd3cf5a6e80a07ba8dddfc300ea6126f3bed62dc0 (patch)
tree1dbd488d66ff673f0f174029dccf555cc199f000 /src/plugins/CommandLineOptions/PlayListOption/translations/playlist_plugin_lt.ts
parentcac7335cd42cca31eca33422a621d6d8817a77d6 (diff)
downloadqmmp-d3cf5a6e80a07ba8dddfc300ea6126f3bed62dc0.tar.gz
qmmp-d3cf5a6e80a07ba8dddfc300ea6126f3bed62dc0.tar.bz2
qmmp-d3cf5a6e80a07ba8dddfc300ea6126f3bed62dc0.zip
fixed mms plugin build (patch by Karel Volný)
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@2568 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/CommandLineOptions/PlayListOption/translations/playlist_plugin_lt.ts')
0 files changed, 0 insertions, 0 deletions
itle='author trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> 2007-12-02 10:00:43 +0000 committer trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> 2007-12-02 10:00:43 +0000 added libsndfile support plugin' href='/qmmp/commit/lib/qmmp/Input/sndfile/decoder_sndfile.cpp?id=d46d6e4f34db559f215dd4c1a4bc895a4a83f69c'>d46d6e4f3
136ed47da
d46d6e4f3
136ed47da
d46d6e4f3

d46d6e4f3




d46d6e4f3

136ed47da
d46d6e4f3


d46d6e4f3

e48a196c8
d46d6e4f3

e48a196c8
11b7655bb
d46d6e4f3


136ed47da
0b46e2db0
0b46e2db0
d46d6e4f3
aa12e69d3


435f1da1d
d46d6e4f3

013ee07b5
d46d6e4f3

136ed47da








d46d6e4f3
0b46e2db0
d46d6e4f3
d46d6e4f3


136ed47da
d46d6e4f3
136ed47da
d46d6e4f3

74fe5b8ff
d46d6e4f3
136ed47da
d46d6e4f3

c9d69d13e
d46d6e4f3
136ed47da
d46d6e4f3
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
                                                                            
                                                                            














                                                                            
                                                                            




                                                                             

                        



                            

                                                   
 
                  
                  
                    
                  
               

 




                                 

                                 
                  


                      

                                            
                                                                   

                   
                                                                           
                     


                                 
                                 
                                                  
                                                                     
 


                                                                            
                                             

                                                                     
                

 








                             
 
                                  
 


                       
                             
 
                     

 
                                                                 
 
                                                                                              

 
                                     
 
                                                    
 
/***************************************************************************
 *   Copyright (C) 2007-2012 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.,                                       *
 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
 ***************************************************************************/

#include <QObject>
#include <QFile>
#include <QFileInfo>
#include <qmmp/buffer.h>
#include <qmmp/output.h>
#include "decoder_sndfile.h"

// Decoder class

DecoderSndFile::DecoderSndFile(const QString &path)
        : Decoder()
{
    m_path = path;
    m_bitrate = 0;
    m_totalTime = 0;
    m_sndfile = 0;
    m_freq = 0;
}

DecoderSndFile::~DecoderSndFile()
{
    deinit();
}

bool DecoderSndFile::initialize()
{
    m_bitrate = 0;
    m_totalTime = 0.0;
    SF_INFO snd_info;

    memset (&snd_info, 0, sizeof(snd_info));
    snd_info.format=0;
    m_sndfile = sf_open(m_path.toLocal8Bit(), SFM_READ, &snd_info);
    if (!m_sndfile)
    {
        qWarning("DecoderSndFile: failed to open: %s", qPrintable(m_path));
        return false;
    }

    m_freq = snd_info.samplerate;
    int chan = snd_info.channels;
    m_totalTime = snd_info.frames * 1000 / m_freq;
    m_bitrate =  QFileInfo(m_path).size () * 8.0 / m_totalTime + 0.5;

    if((snd_info.format & SF_FORMAT_SUBMASK) == SF_FORMAT_FLOAT)
        sf_command (m_sndfile, SFC_SET_SCALE_FLOAT_INT_READ, NULL, SF_TRUE);

    configure(m_freq, chan, Qmmp::PCM_S16LE);