public interface BlockAllocator
BlockAllocator
interface allows the use of different
implementations of allocators for audio and control busses by the
Server
class. Busses are identified by their address or
position (an integer number) and a number of channels. An instance of
of a block allocator is obtained through a helper class that implements
the Factory
sub interface.Modifier and Type | Interface and Description |
---|---|
static interface |
BlockAllocator.Block
This sub interface describes a class which represents
a block of indices in a
BlockAllocator . |
static interface |
BlockAllocator.Factory
This sub interface describes a class which is
capable of producing a new
BlockAllocator . |
Modifier and Type | Method and Description |
---|---|
int |
alloc(int numChannels)
Allocates a new bus.
|
void |
free(int address)
Frees a bus, that is makes it available again for
new re-allocation.
|
List |
getAllocatedBlocks()
Queries a list of allocated blocks.
|
int alloc(int numChannels)
numChannels
- the number of
channels to allocate. must
be greater than zero.-1
if the allocator ran out of busses.void free(int address)
address
- the index of the busList getAllocatedBlocks()
Block
Copyright © 2015–2022 SciJava. All rights reserved.