MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / Process

Method Process

Source/DebugAudioSource.cpp:39–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39void DebugAudioSource::Process(double time)
40{
41 PROFILER(DebugAudioSource);
42
43 IAudioReceiver* target = GetTarget();
44 if (!mEnabled || target == nullptr)
45 return;
46
47 int bufferSize = target->GetBuffer()->BufferSize();
48 float* out = target->GetBuffer()->GetChannel(0);
49 assert(bufferSize == gBufferSize);
50
51 for (int i = 0; i < bufferSize; ++i)
52 {
53 float sample = 1;
54 out[i] += sample;
55 GetVizBuffer()->Write(sample, 0);
56 }
57}
58
59void DebugAudioSource::DrawModule()
60{

Callers

nothing calls this directly

Calls 4

BufferSizeMethod · 0.80
GetBufferMethod · 0.80
GetChannelMethod · 0.80
WriteMethod · 0.45

Tested by

no test coverage detected