#pragma once #include "audioclip.h" #include "biquad.h" #include "buffer.h" #include "marshalvector.h" #include "meter.h" #include "rendercontext.h" #include #include class Track { private: const std::vector> clips; BufferF32 tempBuffer, silentBuffer; float gain; float pan; uint32_t muted; public: Track(int sampleRate, float vuAlpha, float gain, float pan, bool muted, const std::shared_ptr &meter, const std::shared_ptr &filterChain, const std::vector> &clips); float getGain() const; void setGain(float gain); float getPan() const; void setPan(float pan); bool isMuted() const; void setMuted(bool muted); int getClipCount() const { return clips.size(); } std::shared_ptr getClip(int index) const; void readSegment(const RenderContext *renderContext, BufferF32 output); void progressSegment(int channelCount, int frameCount); const std::shared_ptr meter; const std::shared_ptr filterChain; };