~ubuntu-branches/ubuntu/hardy/lmms/hardy

« back to all changes in this revision

Viewing changes to include/audio_jack.h

  • Committer: Bazaar Package Importer
  • Author(s): Florian Ragwitz
  • Date: 2005-12-22 16:22:50 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20051222162250-key3p7x0212jy6dn
Tags: 0.1.2-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * audio_jack.h - support for JACK-transport
3
3
 *
4
 
 * Linux MultiMedia Studio
5
 
 * Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
 
4
 * Copyright (c) 2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
 
5
 * 
 
6
 * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
6
7
 *
7
8
 * This program is free software; you can redistribute it and/or
8
9
 * modify it under the terms of the GNU General Public
43
44
#include <QMutex>
44
45
#include <QVector>
45
46
#include <QList>
 
47
#include <QMap>
46
48
 
47
49
#else
48
50
 
49
51
#include <qmutex.h>
50
52
#include <qvaluevector.h>
51
53
#include <qvaluelist.h>
 
54
#include <qmap.h>
52
55
 
53
56
#endif
54
57
 
89
92
 
90
93
 
91
94
private:
92
 
        virtual void FASTCALL writeBufferToDev( surroundSampleFrame * _ab,
93
 
                                                Uint32 _frames,
94
 
                                                float _master_output );
 
95
        virtual void startProcessing( void );
 
96
        virtual void stopProcessing( void );
95
97
 
96
 
        void clearBuffer( void );
 
98
        virtual void registerPort( audioPort * _port );
 
99
        virtual void unregisterPort( audioPort * _port );
 
100
        virtual void renamePort( audioPort * _port );
97
101
 
98
102
        static int processCallback( jack_nframes_t _nframes, void * _udata );
99
 
        static int bufSizeCallback( jack_nframes_t _nframes, void * _udata );
 
103
        static void shutdownCallback( void * _udata );
100
104
 
101
105
 
102
106
        jack_client_t * m_client;
 
107
 
 
108
        bool m_stopped;
 
109
 
 
110
        QMutex m_processCallbackMutex;
 
111
 
103
112
        vvector<jack_port_t *> m_outputPorts;
104
 
        struct bufset
105
 
        {
106
 
                sampleType * buf;
107
 
                Uint32 frames;
108
 
        } ;
109
 
 
110
 
        vlist<vvector<bufset> > m_bufferSets;
 
113
        surroundSampleFrame * m_outBuf;
 
114
 
 
115
 
111
116
        Uint32 m_framesDoneInCurBuf;
112
 
        volatile Uint32 m_frameSync;
113
 
 
114
 
        Uint32 m_jackBufSize;
115
 
 
116
 
        QMutex m_bufMutex;
 
117
        Uint32 m_framesToDoInCurBuf;
 
118
 
 
119
 
 
120
        struct stereoPort
 
121
        {
 
122
                jack_port_t * ports[2];
 
123
        } ;
 
124
 
 
125
        typedef QMap<audioPort *, stereoPort> jackPortMap;
 
126
        jackPortMap m_portMap;
117
127
 
118
128
} ;
119
129