LMMS
Loading...
Searching...
No Matches
InstrumentPlayHandle.h
Go to the documentation of this file.
1/*
2 * InstrumentPlayHandle.h - play-handle for driving an instrument
3 *
4 * Copyright (c) 2005-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
5 *
6 * This file is part of LMMS - https://lmms.io
7 *
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.
12 *
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.
17 *
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.
22 *
23 */
24
25#ifndef LMMS_INSTRUMENT_PLAY_HANDLE_H
26#define LMMS_INSTRUMENT_PLAY_HANDLE_H
27
28#include "PlayHandle.h"
29#include "lmms_export.h"
30
31namespace lmms
32{
33
34class Instrument;
35class InstrumentTrack;
36
37class LMMS_EXPORT InstrumentPlayHandle : public PlayHandle
38{
39public:
40 InstrumentPlayHandle(Instrument * instrument, InstrumentTrack* instrumentTrack);
41
42 ~InstrumentPlayHandle() override = default;
43
44 void play(SampleFrame* working_buffer) override;
45
46 bool isFinished() const override
47 {
48 return false;
49 }
50
51 bool isFromTrack(const Track* track) const override;
52
53private:
55};
56
57} // namespace lmms
58
59#endif // LMMS_INSTRUMENT_PLAY_HANDLE_H
Definition Instrument.h:52
void play(SampleFrame *working_buffer) override
Definition InstrumentPlayHandle.cpp:43
Instrument * m_instrument
Definition InstrumentPlayHandle.h:54
~InstrumentPlayHandle() override=default
bool isFinished() const override
Definition InstrumentPlayHandle.h:46
InstrumentPlayHandle(Instrument *instrument, InstrumentTrack *instrumentTrack)
Definition InstrumentPlayHandle.cpp:36
Definition InstrumentTrack.h:62
PlayHandle(const Type type, f_cnt_t offset=0)
Definition PlayHandle.cpp:36
Definition SampleFrame.h:41
Base-class for all tracks.
Definition Track.h:68
Definition AudioAlsa.cpp:35