Line data Source code
1 : /*
2 : * SPDX-License-Identifier: GPL-3.0-only
3 : * MuseScore-Studio-CLA-applies
4 : *
5 : * MuseScore Studio
6 : * Music Composition & Notation
7 : *
8 : * Copyright (C) 2021 MuseScore Limited and others
9 : *
10 : * This program is free software: you can redistribute it and/or modify
11 : * it under the terms of the GNU General Public License version 3 as
12 : * published by the Free Software Foundation.
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
17 : * GNU General Public License for more details.
18 : *
19 : * You should have received a copy of the GNU General Public License
20 : * along with this program. If not, see <https://www.gnu.org/licenses/>.
21 : */
22 : #ifndef MU_PLAYBACK_IPLAYBACKCONFIGURATION_H
23 : #define MU_PLAYBACK_IPLAYBACKCONFIGURATION_H
24 :
25 : #include "modularity/imoduleinterface.h"
26 : #include "async/channel.h"
27 : #include "async/notification.h"
28 : #include "playbacktypes.h"
29 :
30 : namespace mu::playback {
31 : class IPlaybackConfiguration : MODULE_GLOBAL_INTERFACE
32 : {
33 45 : INTERFACE_ID(IPlaybackConfiguration)
34 :
35 : public:
36 9 : virtual ~IPlaybackConfiguration() = default;
37 :
38 : virtual bool playNotesWhenEditing() const = 0;
39 : virtual void setPlayNotesWhenEditing(bool value) = 0;
40 : virtual muse::async::Notification playNotesWhenEditingChanged() const = 0;
41 :
42 : virtual bool playChordWhenEditing() const = 0;
43 : virtual void setPlayChordWhenEditing(bool value) = 0;
44 : virtual muse::async::Channel<bool> playChordWhenEditingChanged() const = 0;
45 :
46 : virtual bool playHarmonyWhenEditing() const = 0;
47 : virtual void setPlayHarmonyWhenEditing(bool value) = 0;
48 : virtual muse::async::Channel<bool> playHarmonyWhenEditingChanged() const = 0;
49 :
50 : virtual bool playNotesOnMidiInput() const = 0;
51 : virtual void setPlayNotesOnMidiInput(bool value) = 0;
52 : virtual muse::async::Channel<bool> playNotesOnMidiInputChanged() const = 0;
53 :
54 : virtual PlaybackCursorType cursorType() const = 0;
55 :
56 : virtual bool isMixerSectionVisible(MixerSectionType sectionType) const = 0;
57 : virtual void setMixerSectionVisible(MixerSectionType sectionType, bool visible) = 0;
58 : virtual muse::async::Channel<MixerSectionType, bool> isMixerSectionVisibleChanged() const = 0;
59 :
60 : virtual bool isAuxSendVisible(muse::audio::aux_channel_idx_t index) const = 0;
61 : virtual void setAuxSendVisible(muse::audio::aux_channel_idx_t index, bool visible) = 0;
62 : virtual muse::async::Channel<muse::audio::aux_channel_idx_t, bool> isAuxSendVisibleChanged() const = 0;
63 :
64 : virtual bool isAuxChannelVisible(muse::audio::aux_channel_idx_t index) const = 0;
65 : virtual void setAuxChannelVisible(muse::audio::aux_channel_idx_t index, bool visible) const = 0;
66 : virtual muse::async::Channel<muse::audio::aux_channel_idx_t, bool> isAuxChannelVisibleChanged() const = 0;
67 :
68 : virtual muse::audio::gain_t defaultAuxSendValue(muse::audio::aux_channel_idx_t index, muse::audio::AudioSourceType sourceType,
69 : const muse::String& instrumentSoundId) const = 0;
70 :
71 : virtual bool muteHiddenInstruments() const = 0;
72 : virtual void setMuteHiddenInstruments(bool mute) = 0;
73 : virtual muse::async::Channel<bool> muteHiddenInstrumentsChanged() const = 0;
74 :
75 : virtual const SoundProfileName& basicSoundProfileName() const = 0;
76 : virtual const SoundProfileName& museSoundsProfileName() const = 0;
77 : virtual const SoundProfileName& compatMuseSoundsProfileName() const = 0;
78 :
79 : virtual SoundProfileName defaultProfileForNewProjects() const = 0;
80 : virtual void setDefaultProfileForNewProjects(const SoundProfileName& name) = 0;
81 :
82 : virtual bool soundPresetsMultiSelectionEnabled() const = 0;
83 : virtual void setSoundPresetsMultiSelectionEnabled(bool enabled) = 0;
84 :
85 : virtual bool needToShowResetSoundFlagsWhenChangeSoundWarning() const = 0;
86 : virtual void setNeedToShowResetSoundFlagsWhenChangeSoundWarning(bool show) = 0;
87 :
88 : virtual bool needToShowResetSoundFlagsWhenChangePlaybackProfileWarning() const = 0;
89 : virtual void setNeedToShowResetSoundFlagsWhenChangePlaybackProfileWarning(bool show) = 0;
90 :
91 : virtual bool shouldShowOnlineSoundsProcessingError() const = 0;
92 : virtual void setShouldShowOnlineSoundsProcessingError(bool show) = 0;
93 : virtual muse::async::Notification shouldShowOnlineSoundsProcessingErrorChanged() const = 0;
94 :
95 : virtual muse::String onlineSoundsHandbookUrl() const = 0;
96 :
97 : virtual OnlineSoundsShowProgressBarMode onlineSoundsShowProgressBarMode() const = 0;
98 : virtual void setOnlineSoundsShowProgressBarMode(OnlineSoundsShowProgressBarMode mode) = 0;
99 : virtual muse::async::Notification onlineSoundsShowProgressBarModeChanged() const = 0;
100 :
101 : virtual bool shouldMeasureInputLag() const = 0;
102 : };
103 : }
104 :
105 : #endif // MU_PLAYBACK_IPLAYBACKCONFIGURATION_H
|