LMMS
Loading...
Searching...
No Matches
VstSyncController.h
Go to the documentation of this file.
1/*
2 * VstSyncController.h - type declarations needed for VST to lmms host sync
3 *
4 * Copyright (c) 2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
5 * Copyright (c) 2013 Mike Choi <rdavidian71/at/gmail/dot/com>
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_VST_SYNC_CONTROLLER_H
27#define LMMS_VST_SYNC_CONTROLLER_H
28
29#include <QObject>
30
31#include "SharedMemory.h"
32#include "VstSyncData.h" // IWYU pragma: keep
33
34namespace lmms
35{
36
37class VstSyncController : public QObject
38{
39 Q_OBJECT
40public:
42
43 void setAbsolutePosition(double ticks);
44 void setPlaybackState(bool enabled);
45 void setTempo(int newTempo);
46 void setTimeSignature(int num, int denom);
47 void startCycle(int startTick, int endTick);
48 void stopCycle();
49 void setPlaybackJumped(bool jumped);
50 void update();
51
52 const std::string& sharedMemoryKey() const noexcept { return m_syncData.key(); }
53
54private slots:
55 void updateSampleRate();
56
57private:
59};
60
61
62} // namespace lmms
63
64#endif // LMMS_VST_SYNC_CONTROLLER_H
#define noexcept
Definition DistrhoDefines.h:72
Definition SharedMemory.h:147
SharedMemory< VstSyncData > m_syncData
Definition VstSyncController.h:58
void update()
Definition VstSyncController.cpp:138
void startCycle(int startTick, int endTick)
Definition VstSyncController.cpp:109
VstSyncController()
Definition VstSyncController.cpp:40
void updateSampleRate()
Definition VstSyncController.cpp:151
const std::string & sharedMemoryKey() const noexcept
Definition VstSyncController.h:52
void setTempo(int newTempo)
Definition VstSyncController.cpp:85
void setPlaybackJumped(bool jumped)
Definition VstSyncController.cpp:129
void stopCycle()
Definition VstSyncController.cpp:120
void setAbsolutePosition(double ticks)
Definition VstSyncController.cpp:63
void setPlaybackState(bool enabled)
Definition VstSyncController.cpp:76
void setTimeSignature(int num, int denom)
Definition VstSyncController.cpp:99
Definition AudioAlsa.cpp:35
#define const
Definition zconf.h:137