LMMS
Loading...
Searching...
No Matches
PresetPreviewPlayHandle.h
Go to the documentation of this file.
1/*
2 * PresetPreviewPlayHandle.h - a PlayHandle specialization for playback of a short
3 * preview of a preset or a file processed by a plugin
4 *
5 * Copyright (c) 2005-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_PRESET_PREVIEW_PLAY_HANDLE_H
27#define LMMS_PRESET_PREVIEW_PLAY_HANDLE_H
28
29#include "NotePlayHandle.h"
30
31namespace lmms
32{
33
34
35class DataFile;
36class InstrumentTrack;
38
39class LMMS_EXPORT PresetPreviewPlayHandle : public PlayHandle
40{
41public:
42 PresetPreviewPlayHandle( const QString& presetFile, bool loadByPlugin = false, DataFile *dataFile = 0 );
43 ~PresetPreviewPlayHandle() override;
44
45 inline bool affinityMatters() const override
46 {
47 return true;
48 }
49
50 void play( SampleFrame* buffer ) override;
51 bool isFinished() const override;
52
53 bool isFromTrack( const Track * _track ) const override;
54
55 static void init();
56 static void cleanup();
57 static ConstNotePlayHandleList nphsOfInstrumentTrack( const InstrumentTrack* instrumentTrack );
58
59 static bool isPreviewing();
60
61
62private:
64
66
67} ;
68
69
70} // namespace lmms
71
72#endif // LMMS_PRESET_PREVIEW_PLAY_HANDLE_H
Definition DataFile.h:44
Definition InstrumentTrack.h:62
Definition NotePlayHandle.h:48
PlayHandle(const Type type, f_cnt_t offset=0)
Definition PlayHandle.cpp:36
PresetPreviewPlayHandle(const QString &presetFile, bool loadByPlugin=false, DataFile *dataFile=0)
Definition PresetPreviewPlayHandle.cpp:118
bool affinityMatters() const override
Definition PresetPreviewPlayHandle.h:45
static PreviewTrackContainer * s_previewTC
Definition PresetPreviewPlayHandle.h:63
NotePlayHandle * m_previewNote
Definition PresetPreviewPlayHandle.h:65
Definition PresetPreviewPlayHandle.cpp:43
Definition SampleFrame.h:41
Base-class for all tracks.
Definition Track.h:68
static void cleanup(void)
Definition lilv_test.c:152
Definition AudioAlsa.cpp:35
QList< const NotePlayHandle * > ConstNotePlayHandleList
Definition NotePlayHandle.h:45
ZCONST uch * init
Definition extract.c:2392