2 * sample_record_handle.h - play-handle for recording a sample
4 * Copyright (c) 2008 Csaba Hruska <csaba.hruska/at/gmail.com>
6 * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
18 * You should have received a copy of the GNU General Public
19 * License along with this program (see COPYING); if not, write to the
20 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301 USA.
26 #ifndef _SAMPLE_RECORD_HANDLE_H
27 #define _SAMPLE_RECORD_HANDLE_H
29 #include <QtCore/QList>
30 #include <QtCore/QPair>
34 #include "sample_buffer.h"
42 class sampleRecordHandle
: public playHandle
45 sampleRecordHandle( sampleTCO
* _tco
);
46 virtual ~sampleRecordHandle();
48 virtual void play( sampleFrame
* _working_buffer
);
49 virtual bool done() const;
51 virtual bool isFromTrack( const track
* _track
) const;
53 f_cnt_t
framesRecorded() const;
54 void createSampleBuffer( sampleBuffer
* * _sample_buf
);
58 virtual void writeBuffer( const sampleFrame
* _ab
,
59 const f_cnt_t _frames
);
61 typedef QList
<QPair
<sampleFrame
*, f_cnt_t
> > bufferList
;
63 f_cnt_t m_framesRecorded
;