MCPcopy Create free account
hub / github.com/LabSound/LabSound / AudioBus

Method AudioBus

src/core/AudioBus.cpp:22–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20const unsigned MaxBusChannels = 32;
21
22AudioBus::AudioBus(int numberOfChannels, int length, bool allocate)
23 : m_length(length)
24{
25 ASSERT(numberOfChannels <= MaxBusChannels);
26 if (numberOfChannels > MaxBusChannels)
27 return;
28
29 for (int i = 0; i < numberOfChannels; ++i)
30 {
31 AudioChannel * newChannel;
32 if (allocate)
33 newChannel = new AudioChannel(length);
34 else
35 newChannel = new AudioChannel(nullptr, length);
36
37 m_channels.emplace_back(std::unique_ptr<AudioChannel>(newChannel));
38 }
39}
40
41void AudioBus::setChannelMemory(int channelIndex, float * storage, int length)
42{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected