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"
37 class AudioSampleRecorder
: public AudioDevice
40 AudioSampleRecorder( const ch_cnt_t _channels
, bool & _success_ful
,
42 virtual ~AudioSampleRecorder();
44 f_cnt_t
framesRecorded() const;
45 void createSampleBuffer( sampleBuffer
* * _sample_buf
);
49 virtual void writeBuffer( const surroundSampleFrame
* _ab
,
51 const float _master_gain
);
53 typedef QList
<QPair
<sampleFrame
*, fpp_t
> > BufferList
;