-
Notifications
You must be signed in to change notification settings - Fork 2
/
LameVST.h
37 lines (31 loc) · 1.19 KB
/
LameVST.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#pragma once
#include "audioeffectx.h"
#include "MP3Processor.h"
#include <atomic>
#include <vector>
class LameVST : public AudioEffectX {
public:
explicit LameVST(audioMasterCallback) noexcept;
~LameVST() noexcept;
virtual void processReplacing(float **, float **, VstInt32) noexcept override;
virtual bool getEffectName(char *) noexcept override;
virtual bool getVendorString(char *) noexcept override;
virtual bool getProductString(char *) noexcept override;
void setParameter(VstInt32, float) noexcept override;
virtual VstPlugCategory getPlugCategory() noexcept override;
virtual VstInt32 getVendorVersion() noexcept override;
virtual void getParameterLabel(VstInt32, char *) noexcept override;
virtual void getParameterName(VstInt32, char *) noexcept override;
virtual void getParameterDisplay(VstInt32, char *) noexcept override;
virtual float getParameter(VstInt32) noexcept override;
private:
std::atomic<int> bitrateValue;
int lastBitrateValue;
std::atomic<int> channelValue;
int lastChannelValue;
MP3Processor mp3Processor;
std::vector<float> inputStereoBuffer;
std::vector<float> outputStereoBuffer;
size_t inputStereoPos = 0;
bool readyToOutput = false;
};