aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Output/jack/outputjack.h
blob: 825c41f66c273b496a41be1813353872f6d22cb4 (plain) (blame)
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
#ifndef   OUTPUTJACK_H
#define   OUTPUTJACK_H

class OutputJACK;

#include <qmmp/output.h>
#include <QObject>
extern "C"
{
#include <jack/jack.h>
}

#include "bio2jack.h"

class OutputJACK : public Output
{
    Q_OBJECT
public:
    OutputJACK(QObject * parent = 0, bool useVolume = TRUE);
    ~OutputJACK();
    bool initialize();
    bool isInitialized() const
    {
        return m_inited;
    }
    void uninitialize();
    void configure(long, int, int, int);
    void stop();
    void pause();
    long written();
    long latency();
    void seek(long);

private:
    // thread run function
    void run();
    // helper functions
    void status();
    QString audio_device;
    bool m_inited, m_configure, m_pause, m_play, m_userStop;
    long m_totalWritten, m_currentSeconds, m_bps;
    int m_rate, m_frequency, m_channels, m_precision, jack_device;
    bool do_select;
    int audio_fd;
};


#endif