1 /* 2 SPDX-FileCopyrightText: 1998-2007 Sebastian Trueg <trueg@k3b.org> 3 SPDX-License-Identifier: GPL-2.0-or-later 4 */ 5 6 #ifndef _K3B_MPC_WRAPPER_H_ 7 #define _K3B_MPC_WRAPPER_H_ 8 9 #include "k3bmpc_config.h" 10 11 #include <QString> 12 13 #include "k3bmsf.h" 14 15 #include MPC_HEADER_FILE 16 17 class QFile; 18 19 20 class K3bMpcWrapper 21 { 22 public: 23 K3bMpcWrapper(); 24 ~K3bMpcWrapper(); 25 26 bool open( const QString& filename ); 27 void close(); 28 29 int decode( char*, int max ); 30 31 bool seek( const K3b::Msf& ); 32 33 K3b::Msf length() const; 34 int samplerate() const; 35 unsigned int channels() const; 36 input()37 QFile* input() const { return m_input; } 38 39 private: 40 QFile* m_input; 41 mpc_reader* m_reader; 42 #ifdef MPC_OLD_API 43 mpc_decoder* m_decoder; 44 #else 45 mpc_demux* m_decoder; 46 #endif 47 mpc_streaminfo* m_info; 48 }; 49 50 #endif 51