lmms
Cross-platform music production software
Toggle main menu visibility
Loading...
Searching...
No Matches
include
AudioSampleRecorder.h
Go to the documentation of this file.
1
/*
2
* AudioSampleRecorder.h - device-class that implements recording
3
* audio-buffers into RAM
4
*
5
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
6
*
7
* This file is part of LMMS - https://lmms.io
8
*
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.
13
*
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.
18
*
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.
23
*
24
*/
25
26
#ifndef LMMS_AUDIO_SAMPLE_RECORDER_H
27
#define LMMS_AUDIO_SAMPLE_RECORDER_H
28
29
#include <QList>
30
#include <QPair>
31
#include <memory>
32
33
#include "
AudioDevice.h
"
34
35
namespace
lmms
36
{
37
38
class
SampleBuffer
;
39
40
41
class
AudioSampleRecorder
:
public
AudioDevice
42
{
43
public
:
44
AudioSampleRecorder
(
const
ch_cnt_t
_channels,
bool
& _success_ful,
AudioEngine
*
audioEngine
);
45
~AudioSampleRecorder
()
override
;
46
47
f_cnt_t
framesRecorded
()
const
;
48
std::shared_ptr<const SampleBuffer>
createSampleBuffer
();
49
50
private
:
51
void
writeBuffer
(
const
SampleFrame
* _ab,
const
f_cnt_t
_frames);
52
53
using
BufferList
= QList<QPair<SampleFrame*, f_cnt_t>>;
54
BufferList
m_buffers
;
55
56
} ;
57
58
}
// namespace lmms
59
60
#endif
// LMMS_AUDIO_SAMPLE_RECORDER_H
AudioDevice.h
lmms::AudioDevice::audioEngine
AudioEngine * audioEngine()
Definition
AudioDevice.h:84
lmms::AudioDevice::AudioDevice
AudioDevice(const ch_cnt_t _channels, AudioEngine *audioEngine)
Definition
AudioDevice.cpp:33
lmms::AudioEngine
Definition
AudioEngine.h:66
lmms::AudioSampleRecorder::AudioSampleRecorder
AudioSampleRecorder(const ch_cnt_t _channels, bool &_success_ful, AudioEngine *audioEngine)
Definition
AudioSampleRecorder.cpp:35
lmms::AudioSampleRecorder::writeBuffer
void writeBuffer(const SampleFrame *_ab, const f_cnt_t _frames)
Definition
AudioSampleRecorder.cpp:87
lmms::AudioSampleRecorder::m_buffers
BufferList m_buffers
Definition
AudioSampleRecorder.h:54
lmms::AudioSampleRecorder::createSampleBuffer
std::shared_ptr< const SampleBuffer > createSampleBuffer()
Definition
AudioSampleRecorder.cpp:69
lmms::AudioSampleRecorder::BufferList
QList< QPair< SampleFrame *, f_cnt_t > > BufferList
Definition
AudioSampleRecorder.h:53
lmms::AudioSampleRecorder::framesRecorded
f_cnt_t framesRecorded() const
Definition
AudioSampleRecorder.cpp:59
lmms::SampleBuffer
Definition
SampleBuffer.h:39
lmms::SampleFrame
Definition
SampleFrame.h:41
lmms
Definition
RemotePluginBase.cpp:34
lmms::ch_cnt_t
std::uint16_t ch_cnt_t
Definition
LmmsTypes.h:44
lmms::f_cnt_t
std::uint64_t f_cnt_t
Definition
LmmsTypes.h:43
Generated on
for lmms by
1.18.0