2 #include <Process/Dataflow/Port.hpp>
3 #include <Process/Process.hpp>
5 #include <Media/MediaFileHandle.hpp>
6 #include <Media/Sound/SoundMetadata.hpp>
9 #include <score/serialization/JSONVisitor.hpp>
12 #include <ossia/dataflow/audio_stretch_mode.hpp>
16 Q_DECLARE_METATYPE(ossia::audio_stretch_mode)
17 W_REGISTER_ARGTYPE(ossia::audio_stretch_mode)
26 ,
public Nano::Observer
28 SCORE_SERIALIZE_FRIENDS
40 QString prettyName()
const noexcept
override;
42 template <
typename Impl>
45 , m_file{std::make_shared<AudioFile>()}
54 void setFile(
const QString& file);
55 QString userFilePath()
const noexcept;
62 void setFileForced(
const QString& file,
int stream = -1);
64 std::shared_ptr<AudioFile>& file();
65 const std::shared_ptr<AudioFile>& file()
const;
67 int stream()
const noexcept;
68 int upmixChannels()
const noexcept;
69 int startChannel()
const noexcept;
70 double nativeTempo()
const noexcept;
71 ossia::audio_stretch_mode stretchMode()
const noexcept;
73 void setUpmixChannels(
int upmixChannels);
74 void setStartChannel(
int startChannel);
75 void setStream(
int stream);
76 void setNativeTempo(
double);
77 void setStretchMode(ossia::audio_stretch_mode);
79 void on_mediaChanged();
81 std::unique_ptr<Process::AudioOutlet> outlet;
84 void fileChanged() W_SIGNAL(fileChanged);
85 void scoreTempoChanged() W_SIGNAL(scoreTempoChanged);
86 void nativeTempoChanged(
double t) W_SIGNAL(nativeTempoChanged, t);
87 void streamChanged(
int stream) W_SIGNAL(streamChanged, stream);
88 void upmixChannelsChanged(
int upmixChannels)
89 W_SIGNAL(upmixChannelsChanged, upmixChannels);
90 void startChannelChanged(
int startChannel) W_SIGNAL(startChannelChanged, startChannel);
91 void stretchModeChanged(ossia::audio_stretch_mode mode)
92 W_SIGNAL(stretchModeChanged, mode);
94 PROPERTY(
int, stream READ stream WRITE setStream NOTIFY streamChanged, W_Final)
97 startChannel READ startChannel WRITE setStartChannel NOTIFY startChannelChanged,
101 upmixChannels READ upmixChannels WRITE setUpmixChannels NOTIFY
102 upmixChannelsChanged,
106 nativeTempo READ nativeTempo WRITE setNativeTempo NOTIFY nativeTempoChanged,
109 ossia::audio_stretch_mode,
110 stretchMode READ stretchMode WRITE setStretchMode NOTIFY stretchModeChanged,
114 void loadFile(
const QString& str,
int stream = -1);
118 void ancestorStartDateChanged()
override;
119 void ancestorTempoChanged()
override;
121 QString m_userFilePath{};
122 std::shared_ptr<AudioFile> m_file;
123 int m_upmixChannels{};
124 int m_startChannel{};
125 ossia::audio_stretch_mode m_mode{};
126 double m_nativeTempo{};
The Process class.
Definition: score-lib-process/Process/Process.hpp:61
The id_base_t class.
Definition: Identifier.hpp:57
Definition: TimeValue.hpp:21