Audacity 3.2.0
WaveClipUtilities.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 WaveClipUtilities.h
7
8 Paul Licameli
9
10 @brief Various operations on WaveClip, needing only its public interface
11
12**********************************************************************/
13#ifndef __AUDACITY_WAVE_CLIP_UTILITIES__
14#define __AUDACITY_WAVE_CLIP_UTILITIES__
15
16enum class sampleFormat : unsigned;
17
18#include "WaveTrack.h"
19#include <cstddef>
20
25WAVE_TRACK_API bool GetFloatAtTime(const WaveClip &clip,
26 double t, size_t iChannel, float& value, bool mayThrow);
27
30// clang-format off
40// clang-format on
41WAVE_TRACK_API void SetFloatsFromTime(WaveClip &clip,
42 double t, size_t iChannel, const float* buffer, size_t numSamples,
43 sampleFormat effectiveFormat);
44
46
51WAVE_TRACK_API bool SharesBoundaryWithNextClip(
52 const WaveTrack::Interval &prev, const WaveTrack::Interval& next);
53}
54
55#endif
sampleFormat
The ordering of these values with operator < agrees with the order of increasing bit width.
Definition: SampleFormat.h:30
This allows multiple clips to be a part of one WaveTrack.
Definition: WaveClip.h:238
WAVE_TRACK_API void SetFloatsFromTime(WaveClip &clip, double t, size_t iChannel, const float *buffer, size_t numSamples, sampleFormat effectiveFormat)
Considers buffer as audio starting at TimeToSamples(t) (relative to clip play start time) and with eq...
WAVE_TRACK_API bool SharesBoundaryWithNextClip(const WaveTrack::Interval &prev, const WaveTrack::Interval &next)
used by commands which interact with clips using the keyboard
WAVE_TRACK_API bool GetFloatAtTime(const WaveClip &clip, double t, size_t iChannel, float &value, bool mayThrow)