PageRenderTime 48ms CodeModel.GetById 35ms app.highlight 8ms RepoModel.GetById 0ms app.codeStats 1ms

/libtunepimp-0.5.3/plugins/vorbis/vorbisdecode.h

#
C Header | 64 lines | 30 code | 8 blank | 26 comment | 0 complexity | 4f422ca21f5a0515e034f4a1bce6020e MD5 | raw file
Possible License(s): LGPL-2.1, LGPL-3.0, GPL-2.0, LGPL-2.0
 1/*----------------------------------------------------------------------------
 2
 3   libtunepimp -- The MusicBrainz tagging library.  
 4                  Let a thousand taggers bloom!
 5   
 6   Copyright (C) Robert Kaye 2003
 7   
 8   This file is part of libtunepimp.
 9
10   libtunepimp is free software; you can redistribute it and/or modify
11   it under the terms of the GNU General Public License as published by
12   the Free Software Foundation; either version 2 of the License, or
13   (at your option) any later version.
14
15   libtunepimp is distributed in the hope that it will be useful,
16   but WITHOUT ANY WARRANTY; without even the implied warranty of
17   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18   GNU General Public License for more details.
19
20   You should have received a copy of the GNU General Public License
21   along with libtunepimp; if not, write to the Free Software
22   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
23
24   $Id: vorbisdecode.h 1390 2005-06-14 17:46:40Z robert $
25
26----------------------------------------------------------------------------*/
27#ifndef __VORBIS_DECODE_H
28#define __VORBIS_DECODE_H
29
30#include <vorbis/vorbisfile.h>
31#include <string>
32using namespace std;
33#include "metadata.h"
34#include "decode_plugin.h"
35#include "fileio.h"
36
37class VorbisDecode : public DecodePlugin
38{
39    public:
40
41                VorbisDecode(const string &file, const string &encoding);
42       virtual ~VorbisDecode(void);
43
44       int      getInfo(unsigned long &duration, 
45                        unsigned int &samplesPerSecond,
46                        unsigned int &bitsPerSample,
47                        unsigned int &channels);
48       int      read    (char *data, int maxBytes);
49
50    private:
51
52       unsigned int  duration; 
53       unsigned int  samplesPerSecond;
54       unsigned int  bitsPerSample;
55       unsigned int  channels;
56
57       OggVorbis_File   vf;
58       vorbis_info     *vi;
59       ov_callbacks     callbacks;
60       TFILE           *in;
61       string           encoding;
62};
63
64#endif