1 #ifndef AudioSource_hxx
2 #define AudioSource_hxx
32 typedef std::vector<Port>
Ports;
48 void LoadFrom(
Storage & storage)
51 if (not HasNSources())
77 for (
unsigned port = 0; port < _ports.size(); ++port)
78 delete _ports[port].mPort;
83 CLAM_ASSERT(index < _ports.size(),
"AudioOutPort index out of range");
84 Port& port = _ports[index];
85 port.mPort->SetSize(val);
86 port.mPort->SetHop(val);
104 unsigned sources = _config.GetNSources();
106 ResizePorts(sources);
115 std::string
const Portname(
unsigned port)
const
117 std::ostringstream os;
122 void ResizePorts(
unsigned sources)
124 if (sources == _ports.size())
127 for (
unsigned port = sources; port < _ports.size(); ++port)
128 delete _ports[port].mPort;
130 unsigned oldSize = _ports.size();
131 _ports.resize(sources);
133 for (
unsigned port = oldSize; port < sources; ++port)
134 _ports[port] = Port(
new AudioOutPort(Portname(port),
this));