Etterna 0.74.4
Loading...
Searching...
No Matches
RageSoundReader_PitchChange.h
1/* RageSoundReader_PitchChange - change the pitch and speed of an audio stream
2 * independently. */
3
4#ifndef RAGE_SOUND_READER_PITCH_CHANGE_H
5#define RAGE_SOUND_READER_PITCH_CHANGE_H
6
7#include "RageSoundReader_Filter.h"
8
12
14{
15 public:
18
19 int Read(float* pBuf, int iFrames) override;
20 bool SetProperty(const std::string& sProperty, float fValue) override;
21
22 void SetSpeedRatio(float fRatio) { m_fSpeedRatio = fRatio; }
23 void SetPitchRatio(float fRatio) { m_fPitchRatio = fRatio; }
24
25 RageSoundReader_PitchChange* Copy() const override
26 {
27 return new RageSoundReader_PitchChange(*this);
28 }
29
30 private:
32 m_pSpeedChange; // freed by RageSoundReader_Filter
34 m_pSpeedChangeGood; // freed by RageSoundReader_Filter
36 m_pResample; // freed by RageSoundReader_Filter
37
38 float m_fSpeedRatio;
39 float m_fPitchRatio;
40 float m_fLastSetSpeedRatio;
41 float m_fLastSetPitchRatio;
42 // Swallow up warnings. If they must be used, define them.
44 const RageSoundReader_PitchChange& rhs) = delete;
45};
46
47#endif
Definition RageSoundReader_Filter.h:10
Definition RageSoundReader_PitchChange.h:14
This class changes the sampling rate of a sound.
Definition RageSoundReader_Resample_Good.h:12
Definition RageSoundReader_SpeedChange_Good.h:15
Definition RageSoundReader_SpeedChange.h:13
Definition RageSoundReader.h:7