2 * preset_preview_play_handle.h - play-handle for playing a short preview-sound
3 * of a preset or a file processed by a plugin
5 * Copyright (c) 2005-2008 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.
27 #ifndef _PRESET_PREVIEW_PLAY_HANDLE_H
28 #define _PRESET_PREVIEW_PLAY_HANDLE_H
30 #include "note_play_handle.h"
33 class InstrumentTrack
;
34 class previewTrackContainer
;
37 class presetPreviewPlayHandle
: public playHandle
40 presetPreviewPlayHandle( const QString
& _preset_file
,
41 bool _load_by_plugin
= false );
42 virtual ~presetPreviewPlayHandle();
44 virtual void play( sampleFrame
* _working_buffer
);
45 virtual bool done( void ) const;
47 virtual bool isFromTrack( const track
* _track
) const;
49 static void init( void );
50 static void cleanup( void );
51 static ConstNotePlayHandleList
nphsOfInstrumentTrack(
52 const InstrumentTrack
* _ct
);
56 static previewTrackContainer
* s_previewTC
;
58 notePlayHandle
* m_previewNote
;