summaryrefslogtreecommitdiff
path: root/src/effects/peak_meter_effect.h
blob: 905bcda56d21135310f1b9858f3f4f6fc90fe6b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Peak meter overlay for audio debugging
// Renders red horizontal bar showing audio_intensity

#pragma once
#include "gpu/effect.h"
#include "gpu/uniform_helper.h"

class PeakMeterEffect : public Effect {
 public:
  PeakMeterEffect(const GpuContext& ctx,
                  const std::vector<std::string>& inputs,
                  const std::vector<std::string>& outputs);
  ~PeakMeterEffect() override;

  void render(WGPUCommandEncoder encoder,
              const UniformsSequenceParams& params,
              NodeRegistry& nodes) override;

 private:
  WGPURenderPipeline pipeline_;
  WGPUBindGroup bind_group_;
  UniformBuffer<UniformsSequenceParams> uniforms_buffer_;
};