HephAudio v3.1.0
A cross-platform C++ library for recording, playing, and processing audio on Windows, Android, Linux, iOS, and macOS.
Loading...
Searching...
No Matches
TimeStretcher.h
Go to the documentation of this file.
1#pragma once
2#include "HephAudioShared.h"
3#include "OlaEffect.h"
4
7namespace HephAudio
8{
14 {
15 protected:
20 double speed;
21
22 public:
25
32 explicit TimeStretcher(double speed);
33
41 TimeStretcher(double speed, size_t hopSize);
42
51 TimeStretcher(double speed, size_t hopSize, const Window& wnd);
52
54 virtual ~TimeStretcher() = default;
55
56 virtual std::string Name() const override;
57 virtual bool HasRTSupport() const override;
58 virtual size_t CalculateRequiredFrameCount(size_t outputFrameCount, const AudioFormatInfo& formatInfo) const override;
59 virtual size_t CalculateOutputFrameCount(size_t inputFrameCount, const AudioFormatInfo& formatInfo) const override;
60
65 virtual double GetSpeed() const;
66
73 virtual void SetSpeed(double speed);
74
75 protected:
76 virtual void ProcessST(const AudioBuffer& inputBuffer, AudioBuffer& outputBuffer, size_t startIndex, size_t frameCount) override;
77 };
78}
#define HEPH_API
Definition HephShared.h:124
class for storing the audio samples in internal format.
Definition AudioBuffer.h:16
base class for effects that use overlap-add method.
Definition OlaEffect.h:16
changes the playback speed of the audio data without changing the pitch.
Definition TimeStretcher.h:14
TimeStretcher(double speed)
TimeStretcher(double speed, size_t hopSize, const Window &wnd)
TimeStretcher(double speed, size_t hopSize)
virtual size_t CalculateRequiredFrameCount(size_t outputFrameCount, const AudioFormatInfo &formatInfo) const override
double speed
Definition TimeStretcher.h:20
virtual ~TimeStretcher()=default
virtual void SetSpeed(double speed)
virtual double GetSpeed() const
virtual std::string Name() const override
virtual void ProcessST(const AudioBuffer &inputBuffer, AudioBuffer &outputBuffer, size_t startIndex, size_t frameCount) override
virtual size_t CalculateOutputFrameCount(size_t inputFrameCount, const AudioFormatInfo &formatInfo) const override
virtual bool HasRTSupport() const override
base class for windows.
Definition Window.h:14
stores the properties of the audio signals
Definition AudioFormatInfo.h:20