Audacity 3.2.0
TimeStretching.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/*!********************************************************************
3
4 Audacity: A Digital Audio Editor
5
6 TimeStretching.h
7
8 Paul Licameli split from WaveTrackUtilities.h
9
10 @brief Various operations on WaveTrack, related to time stretching
11
12**********************************************************************/
13#ifndef __AUDACITY_TIME_STRETCHING__
14#define __AUDACITY_TIME_STRETCHING__
15
16#include "Internat.h"
17#include "IteratorX.h"
18#include "TranslatableString.h"
19#include "WaveTrack.h"
20#include <unordered_set>
21
22class WaveTrack;
23using ProgressReporter = std::function<void(double)>;
24
25namespace TimeStretching {
26
29WAVE_TRACK_API
30bool HasPitchOrSpeed(const WaveTrack &track, double t0, double t1);
31
32extern WAVE_TRACK_API const TranslatableString defaultStretchRenderingTitle;
33
34// Calls UserException::WithCancellableProgress supplying title and caption
35WAVE_TRACK_API void WithClipRenderingProgress(
36 std::function<void(const ProgressReporter&)> action,
38
39WAVE_TRACK_API bool SetClipStretchRatio(
40 const WaveTrack& track, WaveTrack::Interval& interval, double stretchRatio);
41}
42
43#endif
static const auto title
std::function< void(double)> ProgressReporter
Definition: Track.h:48
Holds a msgid for the translation catalog; may also bind format arguments.
This allows multiple clips to be a part of one WaveTrack.
Definition: WaveClip.h:238
A Track that contains audio waveform data.
Definition: WaveTrack.h:203
WAVE_TRACK_API const TranslatableString defaultStretchRenderingTitle
WAVE_TRACK_API void WithClipRenderingProgress(std::function< void(const ProgressReporter &)> action, TranslatableString title=defaultStretchRenderingTitle)
WAVE_TRACK_API bool SetClipStretchRatio(const WaveTrack &track, WaveTrack::Interval &interval, double stretchRatio)
WAVE_TRACK_API bool HasPitchOrSpeed(const WaveTrack &track, double t0, double t1)