File: k3bmpcwrapper.h

package info (click to toggle)
k3b 25.12.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 55,840 kB
  • sloc: cpp: 99,202; xml: 372; sh: 84; makefile: 10
file content (50 lines) | stat: -rw-r--r-- 786 bytes parent folder | download | duplicates (3)
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
/*
    SPDX-FileCopyrightText: 1998-2007 Sebastian Trueg <trueg@k3b.org>
    SPDX-License-Identifier: GPL-2.0-or-later
*/

#ifndef _K3B_MPC_WRAPPER_H_
#define _K3B_MPC_WRAPPER_H_

#include "k3bmpc_config.h"

#include <QString>

#include "k3bmsf.h"

#include MPC_HEADER_FILE

class QFile;


class K3bMpcWrapper
{
 public:
  K3bMpcWrapper();
  ~K3bMpcWrapper();

  bool open( const QString& filename );
  void close();

  int decode( char*, int max );

  bool seek( const K3b::Msf& );

  K3b::Msf length() const;
  int samplerate() const;
  unsigned int channels() const;

  QFile* input() const { return m_input; }

 private:
  QFile* m_input;
  mpc_reader* m_reader;
#ifdef MPC_OLD_API
  mpc_decoder* m_decoder;
#else
  mpc_demux* m_decoder;
#endif
  mpc_streaminfo* m_info;
};

#endif