MuseScore/src/project/iprojectaudiosettings.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

70 lines
2.5 KiB
C
Raw Normal View History

2021-07-13 11:42:06 +02:00
/*
* SPDX-License-Identifier: GPL-3.0-only
* MuseScore-CLA-applies
*
* MuseScore
* Music Composition & Notation
*
* Copyright (C) 2021 MuseScore BVBA and others
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
2021-07-14 14:18:19 +02:00
#ifndef MU_PROJECT_IPROJECTAUDIOSETTINGS_H
#define MU_PROJECT_IPROJECTAUDIOSETTINGS_H
2021-07-13 11:42:06 +02:00
#include <memory>
#include "audio/audiotypes.h"
2022-03-01 18:17:09 +01:00
#include "engraving/types/types.h"
2021-07-14 14:18:19 +02:00
namespace mu::project {
2021-07-13 11:42:06 +02:00
class IProjectAudioSettings
{
public:
virtual ~IProjectAudioSettings() = default;
virtual audio::AudioOutputParams masterAudioOutputParams() const = 0;
virtual void setMasterAudioOutputParams(const audio::AudioOutputParams& params) = 0;
2022-03-01 18:17:09 +01:00
virtual audio::AudioInputParams trackInputParams(const engraving::InstrumentTrackId& trackId) const = 0;
virtual void setTrackInputParams(const engraving::InstrumentTrackId& trackId, const audio::AudioInputParams& params) = 0;
2022-03-01 18:17:09 +01:00
virtual audio::AudioOutputParams trackOutputParams(const engraving::InstrumentTrackId& trackId) const = 0;
virtual void setTrackOutputParams(const engraving::InstrumentTrackId& trackId, const audio::AudioOutputParams& params) = 0;
2022-03-16 13:02:37 +01:00
struct SoloMuteState {
bool mute = false;
bool solo = false;
bool operator ==(const SoloMuteState& other) const
{
return mute == other.mute
&& solo == other.solo;
}
};
virtual SoloMuteState soloMuteState(const engraving::InstrumentTrackId& trackId) const = 0;
virtual void setSoloMuteState(const engraving::InstrumentTrackId& trackId, const SoloMuteState& soloMuteState) = 0;
virtual async::Channel<engraving::InstrumentTrackId, SoloMuteState> soloMuteStateChanged() const = 0;
2022-03-01 18:17:09 +01:00
virtual void removeTrackParams(const engraving::InstrumentTrackId& trackId) = 0;
virtual mu::ValNt<bool> needSave() const = 0;
2021-07-13 11:42:06 +02:00
};
using IProjectAudioSettingsPtr = std::shared_ptr<IProjectAudioSettings>;
}
2021-07-14 14:18:19 +02:00
#endif // MU_PROJECT_IPROJECTAUDIOSETTINGS_H