Updated SWH plugins and added missing hermes_filter plugin
[lmms/mlankhorst.git] / include / AudioSampleRecorder.h
blobe1e732f809bad7cc967b45aa0fc39c1650b31a16
1 /*
2 * AudioSampleRecorder.h - device-class that implements recording
3 * audio-buffers into RAM
5 * Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
7 * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public
11 * License as published by the Free Software Foundation; either
12 * version 2 of the License, or (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
19 * You should have received a copy of the GNU General Public
20 * License along with this program (see COPYING); if not, write to the
21 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 * Boston, MA 02110-1301 USA.
26 #ifndef _AUDIO_SAMPLE_RECORDER_H
27 #define _AUDIO_SAMPLE_RECORDER_H
29 #include <QtCore/QList>
30 #include <QtCore/QPair>
32 #include "AudioDevice.h"
34 class sampleBuffer;
37 class AudioSampleRecorder : public AudioDevice
39 public:
40 AudioSampleRecorder( const ch_cnt_t _channels, bool & _success_ful,
41 mixer * _mixer );
42 virtual ~AudioSampleRecorder();
44 f_cnt_t framesRecorded() const;
45 void createSampleBuffer( sampleBuffer * * _sample_buf );
48 private:
49 virtual void writeBuffer( const surroundSampleFrame * _ab,
50 const fpp_t _frames,
51 const float _master_gain );
53 typedef QList<QPair<sampleFrame *, fpp_t> > BufferList;
54 BufferList m_buffers;
56 } ;
59 #endif