lmms
Cross-platform music production software
Toggle main menu visibility
Loading...
Searching...
No Matches
include
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
31
namespace
lmms
32
{
33
34
35
class
DataFile
;
36
class
InstrumentTrack
;
37
class
PreviewTrackContainer
;
38
39
class
LMMS_EXPORT
PresetPreviewPlayHandle
:
public
PlayHandle
40
{
41
public
:
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
62
private
:
63
static
PreviewTrackContainer
*
s_previewTC
;
64
65
NotePlayHandle
*
m_previewNote
;
66
67
} ;
68
69
70
}
// namespace lmms
71
72
#endif
// LMMS_PRESET_PREVIEW_PLAY_HANDLE_H
NotePlayHandle.h
lmms::DataFile
Definition
DataFile.h:44
lmms::InstrumentTrack
Definition
InstrumentTrack.h:62
lmms::NotePlayHandle
Definition
NotePlayHandle.h:48
lmms::PlayHandle::PlayHandle
PlayHandle(const Type type, f_cnt_t offset=0)
Definition
PlayHandle.cpp:36
lmms::PresetPreviewPlayHandle::PresetPreviewPlayHandle
PresetPreviewPlayHandle(const QString &presetFile, bool loadByPlugin=false, DataFile *dataFile=0)
Definition
PresetPreviewPlayHandle.cpp:118
lmms::PresetPreviewPlayHandle::affinityMatters
bool affinityMatters() const override
Definition
PresetPreviewPlayHandle.h:45
lmms::PresetPreviewPlayHandle::s_previewTC
static PreviewTrackContainer * s_previewTC
Definition
PresetPreviewPlayHandle.h:63
lmms::PresetPreviewPlayHandle::m_previewNote
NotePlayHandle * m_previewNote
Definition
PresetPreviewPlayHandle.h:65
lmms::PreviewTrackContainer
Definition
PresetPreviewPlayHandle.cpp:43
lmms::SampleFrame
Definition
SampleFrame.h:41
lmms::Track
Base-class for all tracks.
Definition
Track.h:67
lmms
Definition
RemotePluginBase.cpp:34
lmms::ConstNotePlayHandleList
QList< const NotePlayHandle * > ConstNotePlayHandleList
Definition
NotePlayHandle.h:45
Generated on
for lmms by
1.18.0