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

« back to all changes in this revision

Viewing changes to include/sample_play_handle.h

  • Committer: Bazaar Package Importer
  • Author(s): Tobias Doerffel
  • Date: 2007-09-17 15:00:24 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070917150024-mo0zk4ks81jawqii
Tags: 0.3.0-1ubuntu1
* Resynchronized with Debian (LP: #139759, LP: #90806, LP: #102639,
  LP: #113447, LP: #121172, LP: #124890)
* reverted changes from 0.2.1-1.1ubuntu1 as upstream merged/included them

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * sample_play_handle.h - play-handle for playing a sample
3
3
 *
4
 
 * Copyright (c) 2005-2006 Tobias Doerffel <tobydox/at/users.sourceforge.net>
 
4
 * Copyright (c) 2005-2007 Tobias Doerffel <tobydox/at/users.sourceforge.net>
5
5
 * 
6
6
 * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
7
7
 *
17
17
 *
18
18
 * You should have received a copy of the GNU General Public
19
19
 * License along with this program (see COPYING); if not, write to the
20
 
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21
 
 * Boston, MA 02111-1307, USA.
 
20
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 
21
 * Boston, MA 02110-1301 USA.
22
22
 *
23
23
 */
24
24
 
26
26
#ifndef _SAMPLE_PLAY_HANDLE_H
27
27
#define _SAMPLE_PLAY_HANDLE_H
28
28
 
 
29
#include <qobject.h>
 
30
 
29
31
#include "play_handle.h"
30
 
#include "types.h"
31
 
#include "engine.h"
 
32
#include "sample_buffer.h"
32
33
 
33
 
class sampleBuffer;
 
34
class bbTrack;
 
35
class pattern;
 
36
class sampleTCO;
 
37
class track;
34
38
class audioPort;
35
39
 
36
40
 
37
 
class samplePlayHandle : public playHandle, public engineObject
 
41
class samplePlayHandle : public QObject, public playHandle
38
42
{
 
43
        Q_OBJECT
39
44
public:
40
 
        samplePlayHandle( const QString & _sample_file, engine * _engine );
 
45
        samplePlayHandle( const QString & _sample_file );
41
46
        samplePlayHandle( sampleBuffer * _sample_buffer );
 
47
        samplePlayHandle( sampleTCO * _tco );
 
48
        samplePlayHandle( pattern * _pattern );
42
49
        virtual ~samplePlayHandle();
43
50
 
44
 
        virtual void play( void );
 
51
        virtual void play( bool _try_parallelizing );
45
52
        virtual bool done( void ) const;
46
53
 
 
54
        virtual bool isFromTrack( const track * _track ) const;
 
55
 
47
56
        f_cnt_t totalFrames( void ) const;
48
57
        inline f_cnt_t framesDone( void ) const
49
58
        {
54
63
                m_doneMayReturnTrue = _enable;
55
64
        }
56
65
 
 
66
        void setBBTrack( bbTrack * _bb_track )
 
67
        {
 
68
                m_bbTrack = _bb_track;
 
69
        }
 
70
 
 
71
 
 
72
public slots:
 
73
        void setVolume( float _new_volume );
 
74
 
57
75
 
58
76
private:
59
77
        sampleBuffer * m_sampleBuffer;
60
 
        const bool m_ownSampleBuffer;
61
78
        bool m_doneMayReturnTrue;
62
79
 
63
80
        f_cnt_t m_frame;
 
81
        sampleBuffer::handleState m_state;
64
82
 
65
83
        audioPort * m_audioPort;
 
84
        const bool m_ownAudioPort;
 
85
 
 
86
        float m_volume;
 
87
        track * m_track;
 
88
 
 
89
        bbTrack * m_bbTrack;
66
90
 
67
91
} ;
68
92