summaryrefslogtreecommitdiffstats
path: root/amarok/src/engine/kdemm/kdemmengine.h
blob: 9eb16408b532c429a5e9167a8e6c44507e279cc8 (plain)
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
/***************************************************************************
          kdemmengine.h  -  KDEMM audio interface
                         -------------------
begin                : Jul 04 2004
copyright            : (C) 2004 by Roland Gigler
email                : rolandg@web.de
what                 : interface to KDE Multimedia (KDEMM)
***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef AMAROK_KDEMMENGINE_H
#define AMAROK_KDEMMENGINE_H

#include "enginebase.h"

#include <vector>

#include <tqguardedptr.h>
#include <tqmap.h>
#include <tqstringlist.h>
#include <tqwidget.h>


class TQTimer;
class KURL;

namespace KDE { namespace Multimedia { class SimplePlayer; } }

class KDEMMEngine : public Engine::Base
{
    Q_OBJECT
  TQ_OBJECT

    public:
        KDEMMEngine();
        ~KDEMMEngine();

        bool init();

        bool initMixer( bool hardware );
        bool canDecode( const KURL& ) const;
        uint position() const;
        Engine::State state() const {return m_state;}
//        std::vector<float>* scope();
//        bool decoderConfigurable();
//        void configureDecoder();
        bool supportsXFade() const     { return false; }

    public slots:
        bool load( const KURL&, bool stream );
        bool play( unsigned int offset = 0);
        void stop();
        void pause();
        void seek( unsigned int ms );
        void setVolumeSW( unsigned int percent );
    private slots:
	void playingTimeout();
    private:
        //void startXfade();
        /////////////////////////////////////////////////////////////////////////////////////
        // ATTRIBUTES
        /////////////////////////////////////////////////////////////////////////////////////
        Engine::State m_state;
        //long m_scopeId;
        //int  m_scopeSize;
        //bool m_xfadeFadeout;
        //float m_xfadeValue;
        //TQString m_xfadeCurrent;
        KURL m_url;
	KDE::Multimedia::SimplePlayer *m_player;

	TQTimer* m_pPlayingTimer;
};

#endif // AMAROK_KDEMM_ENGINE